Periodic pinger plugin fails after XMPP connection flap

Bug #1380972 reported by Phil Connell
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
EnDroid
Critical
Phil Connell

Bug Description

Some unreliability in periodic pinger:

- If endroid's connection to its XMPP server is lost, a *lot* of ping failures are reported (logging changed to report errors at ERROR level rather than DEBUG).
- Afterwards, an internal failure is hit in twisted (and unhandled by periodic pinger)
- This kills the LoopingCall, meaning no further pings are sent

00:17:08 endroid.plugins.periodicpinger DEBUG PeriodicPinger: Pinging set(['redacted.com', 'gmail.com'])...
00:17:18 endroid.plugins.periodicpinger DEBUG PeriodicPinger: Pinging set(['redacted.com', 'gmail.com'])...
00:17:28 endroid.plugins.periodicpinger DEBUG PeriodicPinger: Pinging set(['redacted.com', 'gmail.com'])...
00:17:38 endroid.plugins.periodicpinger DEBUG PeriodicPinger: Pinging set(['redacted.com', 'gmail.com'])...
00:17:48 endroid.plugins.periodicpinger DEBUG PeriodicPinger: Pinging set(['redacted.com', 'gmail.com'])...
00:17:58 endroid.plugins.periodicpinger DEBUG PeriodicPinger: Pinging set(['redacted.com', 'gmail.com'])...
00:17:58 root ERROR Failed to ping gmail.com: Connection to the other side was lost in a non-clean fashion.
00:17:58 root ERROR Failed to ping redacted.com: Connection to the other side was lost in a non-clean fashion.
00:17:58 root ERROR Failed to ping gmail.com: Connection to the other side was lost in a non-clean fashion.
00:17:58 root ERROR Failed to ping redacted.com: Connection to the other side was lost in a non-clean fashion.

[many identical logs]

00:17:58 root ERROR Failed to ping gmail.com: Connection to the other side was lost in a non-clean fashion.
00:17:58 root ERROR Failed to ping redacted.com: Connection to the other side was lost in a non-clean fashion.
00:17:58 root WARNING Lost connection to XMPP
00:18:08 endroid.plugins.periodicpinger DEBUG PeriodicPinger: Pinging set(['redacted.com', 'gmail.com'])...
Unhandled error in Deferred:
Unhandled Error
Traceback (most recent call last):
  File "/home/phconnel/dev/py2ve/lib/python2.7/site-packages/twisted/internet/base.py", line 1192, in run
    self.mainLoop()
  File "/home/phconnel/dev/py2ve/lib/python2.7/site-packages/twisted/internet/base.py", line 1201, in mainLoop
    self.runUntilCurrent()
  File "/home/phconnel/dev/py2ve/lib/python2.7/site-packages/twisted/internet/base.py", line 824, in runUntilCurrent
    call.func(*call.args, **call.kw)
  File "/home/phconnel/dev/py2ve/lib/python2.7/site-packages/twisted/internet/task.py", line 218, in __call__
    d = defer.maybeDeferred(self.f, *self.a, **self.kw)
--- <exception caught here> ---
  File "/home/phconnel/dev/py2ve/lib/python2.7/site-packages/twisted/internet/defer.py", line 139, in maybeDeferred
    result = f(*args, **kw)
  File "/home/phconnel/dev/endroid/trunk/src/endroid/plugins/periodicpinger.py", line 76, in _ping_servers
    d = self.usermanagement.ping(server)
  File "/home/phconnel/dev/endroid/trunk/src/endroid/usermanagement.py", line 286, in ping
    return self._ping_sender.ping(JID(jid))
  File "/home/phconnel/dev/endroid/trunk/lib/wokkel-0.7.1-py2.7.egg/wokkel/ping.py", line 61, in ping

  File "/home/phconnel/dev/py2ve/lib/python2.7/site-packages/twisted/words/protocols/jabber/xmlstream.py", line 806, in send
    upgradeWithIQResponseTracker(self._xmlstream)
  File "/home/phconnel/dev/py2ve/lib/python2.7/site-packages/twisted/words/protocols/jabber/xmlstream.py", line 751, in upgradeWithIQResponseTracker
    xs.iqDeferreds = {}
exceptions.AttributeError: 'NoneType' object has no attribute 'iqDeferreds'
00:19:29 root INFO Connected to XMPP
00:19:29 root INFO Initialised group all

Related branches

Phil Connell (pconnell)
Changed in endroid:
status: New → In Progress
assignee: nobody → Phil Connell (pconnell)
Phil Connell (pconnell)
Changed in endroid:
status: In Progress → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers