Maximum recursion depth exceeded in ipdevpoll

Bug #634944 reported by Morten Brekkevold
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Network Administration Visualized
Fix Released
High
Morten Brekkevold

Bug Description

NTNU reports that ipdevpoll on NAV 3.6.0b5 will log a "RuntimeError: maximum recursion depth exceeded" for some devices, and then stop all further jobs for that device.

The traceback looks like this:

...
2010-09-10 14:52:39,929 [DEBUG] [nav.ipdevpoll.plugins.bridge.bridge.(somewhere-sw.example.org)] Now querying 'vlan708'
2010-09-10 14:52:40,002 [DEBUG] [nav.ipdevpoll.plugins.bridge.bridge.(somewhere-sw.example.org)] Now querying 'vlan442'
2010-09-10 14:52:40,069 [DEBUG] [nav.ipdevpoll.plugins.bridge.bridge.(somewhere-sw.example.org)] Found 28 base (switch) ports: [21L, 22L, 23L, 8L, 9L, 10L, 11L, 12L, 13L, 24L, 14L, 25L, 15L, 26L, 27L, 1L, 28L, 2L, 3L, 4L, 5L, 16L, 6L,
17L, 7L, 18L, 19L, 20L]
Exception RuntimeError: 'maximum recursion depth exceeded while calling a Python object' in <type 'exceptions.AttributeError'> ignored
Unhandled error in Deferred:
Traceback (most recent call last):
  File "/usr/lib/python2.6/dist-packages/twisted/internet/defer.py", line 325, in unpause
    self._runCallbacks()
  File "/usr/lib/python2.6/dist-packages/twisted/internet/defer.py", line 371, in _runCallbacks
    self.result = callback(self.result, *args, **kw)
  File "/usr/lib/python2.6/dist-packages/twisted/internet/defer.py", line 330, in _continue
    self.unpause()
  File "/usr/lib/python2.6/dist-packages/twisted/internet/defer.py", line 325, in unpause
    self._runCallbacks()
--- <exception caught here> ---
  File "/usr/lib/python2.6/dist-packages/twisted/internet/defer.py", line 371, in _runCallbacks
    self.result = callback(self.result, *args, **kw)
  File "/usr/lib/python2.6/dist-packages/twisted/internet/defer.py", line 330, in _continue
    self.unpause()
  File "/usr/lib/python2.6/dist-packages/twisted/internet/defer.py", line 325, in unpause
    self._runCallbacks()
  File "/usr/lib/python2.6/dist-packages/twisted/internet/defer.py", line 387, in _runCallbacks
    self.result = failure.Failure()
  File "/usr/lib/python2.6/dist-packages/twisted/python/failure.py", line 272, in __init__
    parentCs = reflect.allYourBase(self.type)
  File "/usr/lib/python2.6/dist-packages/twisted/python/reflect.py", line 587, in allYourBase
    accumulateBases(classObj, l, baseClass)
  File "/usr/lib/python2.6/dist-packages/twisted/python/reflect.py", line 595, in accumulateBases
    accumulateBases(base, l, baseClass)
  File "/usr/lib/python2.6/dist-packages/twisted/python/reflect.py", line 595, in accumulateBases
    accumulateBases(base, l, baseClass)
  File "/usr/lib/python2.6/dist-packages/twisted/python/reflect.py", line 595, in accumulateBases
    accumulateBases(base, l, baseClass)
exceptions.RuntimeError: maximum recursion depth exceeded

Revision history for this message
Morten Brekkevold (mbrekkevold) wrote :

The problem appears to be related to an issue in Twisted. Their issue tracker shows the problem has been worked on on-and-off for seven years: http://twistedmatrix.com/trac/ticket/411

A good summary of recursion problems in Twisted by Brian Warner can be found here: http://twistedmatrix.com/pipermail/twisted-python/2008-November/018693.html

Using Brian's analysis, it seems what is happening here is that the bridge plugin is creating a very long chain of callbacks, which blows up Python's stack usage. The number of callbacks depends on the number of active VLANs on the switch, and the switch from the traceback has ca. 339 VLANs.

Revision history for this message
Morten Brekkevold (mbrekkevold) wrote :
Changed in nav:
status: Confirmed → Fix Committed
Changed in nav:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.