Maximum recursion depth exceeded in ipdevpoll
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.
2010-09-10 14:52:40,002 [DEBUG] [nav.ipdevpoll.
2010-09-10 14:52:40,069 [DEBUG] [nav.ipdevpoll.
17L, 7L, 18L, 19L, 20L]
Exception RuntimeError: 'maximum recursion depth exceeded while calling a Python object' in <type 'exceptions.
Unhandled error in Deferred:
Traceback (most recent call last):
File "/usr/lib/
self.
File "/usr/lib/
self.result = callback(
File "/usr/lib/
self.unpause()
File "/usr/lib/
self.
--- <exception caught here> ---
File "/usr/lib/
self.result = callback(
File "/usr/lib/
self.unpause()
File "/usr/lib/
self.
File "/usr/lib/
self.result = failure.Failure()
File "/usr/lib/
parentCs = reflect.
File "/usr/lib/
accumulateB
File "/usr/lib/
accumulateB
File "/usr/lib/
accumulateB
File "/usr/lib/
accumulateB
exceptions.
Changed in nav: | |
status: | Fix Committed → Fix Released |
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.