Ticket #899 (closed defect: fixed)

Opened 3 years ago

Last modified 16 months ago

AttributeError on reconfig

Reported by: catlee Owned by:
Priority: critical Milestone: 0.8.+
Version: 0.8.0 Keywords: database reconfig
Cc:

Description

Occasionally seeing this when reconfiguring a master that is running all our schedulers.

2010-06-17 19:08:46-0700 [-] Unhandled Error
	Traceback (most recent call last):
	  File "/tools/buildbot-0.8.0/lib/python2.6/site-packages/Twisted-9.0.0-py2.6-linux-i686.egg/twisted/internet/base.py", line 1175, in mainLoop
	    self.runUntilCurrent()
	  File "/tools/buildbot-0.8.0/lib/python2.6/site-packages/Twisted-9.0.0-py2.6-linux-i686.egg/twisted/internet/base.py", line 779, in runUntilCurrent
	    call.func(*call.args, **call.kw)
	  File "/tools/buildbot-0.8.0/lib/python2.6/site-packages/buildbot-0.8.0-py2.6.egg/buildbot/util/eventual.py", line 31, in _turn
	    cb(*args, **kwargs)
	  File "/tools/buildbot-0.8.0/lib/python2.6/site-packages/buildbot-0.8.0-py2.6.egg/buildbot/util/loop.py", line 163, in _loop_next
	    d = defer.maybeDeferred(p)
	--- <exception caught here> ---
	  File "/tools/buildbot-0.8.0/lib/python2.6/site-packages/Twisted-9.0.0-py2.6-linux-i686.egg/twisted/internet/defer.py", line 102, in maybeDeferred
	    result = f(*args, **kw)
	  File "/tools/buildbot-0.8.0/lib/python2.6/site-packages/buildbot-0.8.0-py2.6.egg/buildbot/schedulers/basic.py", line 101, in run
	    db = self.parent.db
	exceptions.AttributeError: 'NoneType' object has no attribute 'db'

Change History

comment:1 Changed 3 years ago by dustin

  • Milestone changed from undecided to 0.8.2

So that means that the loop is running during the reconfig, right? This is basically a good old threading race condition, replicated in an event-based environment. Yay!

I wonder if we could make the reconfig "atomic" in the buildbot sense.

comment:2 Changed 3 years ago by dustin

  • Keywords database added
  • Priority changed from major to critical

comment:3 Changed 3 years ago by dustin

  • Keywords reconfig added
  • Milestone changed from 0.8.2 to 0.8.+

I meant, "atomic in the _Twisted_ sense"

We see a lot of bugs like this. They only occur during a reconfig, but if there is HTTP connection pipelining going on, they can last for quite a while longer. I don't know if it's possible to fix this without completely rebuilding the "reconfig" machinery.

comment:4 Changed 16 months ago by tom.prince

I suspect this may be at least partially fixed by the new config system. I suggest closing this, on the assumption that it has. We can then open a new bug, if the new system exhibits similar errors.

comment:5 Changed 16 months ago by dustin

  • Status changed from new to closed
  • Resolution set to fixed

Good idea.

This sort of error will be even better-handled by further improving the config system to reconfig status listeners, rather than destroy and re-create them.

Note: See TracTickets for help on using tickets.