Warning: Can't synchronize with repository "(default)" (No changeset 96d22ec3fa3ef6de3ea8dc0d7d398adc9aa071cf in the repository). Look in the Trac log for more information.

Ticket #289 (closed defect: fixed)

Opened 5 years ago

Last modified 5 years ago

PDP context errouneously reported as released

Reported by: sdhillon Owned by: mickey
Priority: major Milestone:
Component: documentation Version:
Keywords: Cc:

Description

My app deactivates the PDP context, and then waits 20 or so seconds. Then it tries to reactivate the PDP context, but it indirectly reports the PDP context is still active. This is the latest FSO from the debian, though it has the patch from ticket 260. Attached is the FSO logs from the time.

So, this is the errors I get from my app: Context status: 'release' after 0.1 seconds 'RST' :connection:START connection acquiring parent lock Traceback (most recent call last):

File "/root/nagiostest/modem.py", line 144, in testpdp

self.gsm_pdp_iface.ActivateContext?("insigniavpn.globalm2m.net", "", "")

File "/var/lib/python-support/python2.5/dbus/proxies.py", line 140, in call

keywords)

File "/var/lib/python-support/python2.5/dbus/connection.py", line 622, in call_blocking

message, timeout)

DBusException: org.freedesktop.DBus.Python.Exception: Traceback (most recent call last):

File "/var/lib/python-support/python2.5/dbus/service.py", line 702, in _message_cb

retval = candidate_method(self, *args, keywords)

File "<string>", line 1, in <lambda> File "/var/lib/python-support/python2.5/framework/resource.py", line 34, in checkedmethod

return f(*args, kw)

File "/var/lib/python-support/python2.5/framework/subsystems/ogsmd/objects.py", line 663, in ActivateContext?

mediator.PdpActivateContext?( self, dbus_ok, dbus_error, apn=apn, user=user, password=password )

File "/var/lib/python-support/python2.5/framework/subsystems/ogsmd/modems/abstract/mediator.py", line 236, in init

AbstractYieldSupport?.init( self, *args, kwargs )

File "/var/lib/python-support/python2.5/framework/subsystems/ogsmd/modems/abstract/mediator.py", line 158, in init

self.generator = self.trigger()

File "/var/lib/python-support/python2.5/framework/subsystems/ogsmd/modems/abstract/mediator.py", line 1331, in trigger

pdpConnection.activate()

File "/var/lib/python-support/python2.5/framework/subsystems/ogsmd/modems/abstract/pdp.py", line 70, in activate

self._activate()

File "/var/lib/python-support/python2.5/framework/subsystems/ogsmd/modems/abstract/pdp.py", line 96, in _activate

raise Exception( "already active" )

Exception: already active

PDP Context test complete PDP Context failed Thu Dec 4 01:13:41 2008 cnav-prod-vpn cnav_e2e_modem 2 PDP Error

My code looks like this:

contextStatus=str( self.gsm_pdp_iface.GetContextStatus?() ) if contextStatus=='active':

pdpstatus=1 print "Deactivating context" self.gsm_pdp_iface.DeactivateContext?()

looptime=0 while looptime<20:

if contextStatus=='outgoing' or contextStatus=='incoming' or contextStatus=='active':

pdpstatus=1 try:

self.gsm_pdp_iface.DeactivateContext?()

except:

print "Error deactivating context" traceback.print_exc()

# break

pass

else:

print "Context changed" break

time.sleep(.1) looptime=looptime+.1 contextStatus=str( self.gsm_pdp_iface.GetContextStatus?())

if looptime>20:

print "PDP Context stuck" return "PDP Context stuck"

time.sleep(20.2-looptime) #assume that we never take more than .2 seconds to Get context status print "Context status: %s after %s seconds" % (repr( contextStatus), looptime) try:

self.gsm_pdp_iface.ActivateContext?("insigniavpn.globalm2m.net", "", "")

except:

traceback.print_exc() return "PDP Error"

looptime=0 while looptime<30:

contextStatus=self.gsm_pdp_iface.GetContextStatus?() if contextStatus=="released":

return "Error, could not bring up GSM connection (released)"

if contextStatus=="active":

return True

looptime=looptime+.1 time.sleep(.1)

if looptime>30:

return "Taking too long to bring up PDP context"

return True

Attachments

framework-01-02.log.bz2 (15.6 KB) - added by sdhillon 5 years ago.

Change History

Changed 5 years ago by sdhillon

comment:1 Changed 5 years ago by mickey

  • Status changed from new to assigned

See also #179

comment:2 Changed 5 years ago by mickey

Can you please recheck with HEAD? I did some major rewrites of the pdp handling.

comment:3 Changed 5 years ago by mickey

  • Status changed from assigned to closed
  • Resolution set to fixed
Note: See TracTickets for help on using tickets.