[Buildbot] #3329: slave protocol Listenre class tries to set `self.master`
Buildbot trac
trac at buildbot.net
Wed Aug 5 16:02:09 UTC 2015
#3329: slave protocol Listenre class tries to set `self.master`
---------------------+---------------------
Reporter: dustin | Owner:
Type: defect | Status: new
Priority: critical | Milestone: 0.9.0b2
Version: master | Keywords:
---------------------+---------------------
{{{
Unhandled Error
Traceback (most recent call last):
File "/home/bbuser/venv/lib/python2.7/site-
packages/twisted/application/app.py", line 617, in run
runApp(config)
File "/home/bbuser/venv/lib/python2.7/site-
packages/twisted/scripts/twistd.py", line 25, in runApp
_SomeApplicationRunner(config).run()
File "/home/bbuser/venv/lib/python2.7/site-
packages/twisted/application/app.py", line 348, in run
self.application = self.createOrGetApplication()
File "/home/bbuser/venv/lib/python2.7/site-
packages/twisted/application/app.py", line 413, in createOrGetApplication
application = getApplication(self.config, passphrase)
--- <exception caught here> ---
File "/home/bbuser/venv/lib/python2.7/site-
packages/twisted/application/app.py", line 424, in getApplication
application = service.loadApplication(filename, style, passphrase)
File "/home/bbuser/venv/lib/python2.7/site-
packages/twisted/application/service.py", line 411, in loadApplication
passphrase)
File "/home/bbuser/venv/lib/python2.7/site-
packages/twisted/persisted/sob.py", line 207, in loadValueFromFile
eval(codeObj, d, d)
File "buildbot.tac", line 28, in <module>
m = BuildMaster(basedir, configfile, umask)
File "/usr/home/bbuser/buildbot/master/buildbot/master.py", line 95, in
__init__
self.create_child_services()
File "/usr/home/bbuser/buildbot/master/buildbot/master.py", line 141, in
create_child_services
self.buildslaves = bslavemanager.BuildslaveManager(self)
File "/usr/home/bbuser/buildbot/master/buildbot/buildslave/manager.py",
line 69, in __init__
self.pb = bbpb.Listener(master)
File
"/usr/home/bbuser/buildbot/master/buildbot/buildslave/protocols/pb.py",
line 30, in __init__
base.Listener.__init__(self, master)
File
"/usr/home/bbuser/buildbot/master/buildbot/buildslave/protocols/base.py",
line 24, in __init__
self.master = master
exceptions.AttributeError: can't set attribute
Failed to load application: can't set attribute
}}}
This is due to the switch to new-style classes, where properties can't be
set. Two things to worry about in fixing this: (1) all calls to the
Listener constructor need to be modified to not pass a master instance and
(2) there's a chance that something refers to `self.master` before the
service is added to the service hierarchy, which will lead to a runtime
exception.
I'm a bit curious how tests didn't catch this issue :(
--
Ticket URL: <http://trac.buildbot.net/ticket/3329>
Buildbot <http://buildbot.net/>
Buildbot: build/test automation
More information about the bugs
mailing list