[Buildbot-devel] buildbot slave hangs on SunOS?

Brian Warner warner-buildbot at lothar.com
Tue Jan 27 22:37:39 UTC 2004


> 	  File "/opt/lib/python2.2/site-packages/twisted/internet/default.py", line 162, in spawnProcess
> 	    return process.PTYProcess(self, executable, args, env, path, processProtocol, uid, gid, usePTY)
> 	  File "/opt/lib/python2.2/site-packages/twisted/internet/process.py", line 509, in __init__
> 	    stderr.flush()
> 	exceptions.IOError: [Errno 9] Bad file number
> 	
> 2004/01/27 09:22 MST [-] Malformed file descriptor found.  Preening lists.
> 2004/01/27 09:22 MST [-] bad descriptor <twisted.internet.tcp.Client to ('rodney', 8007) at 82a2f74>
> 2004/01/27 09:22 MST [-] bad descriptor <twisted.internet.tcp.Client to ('rodney', 8007) at 82a2f74>

Eww. That's weird.

It looks like stderr.flush() is only called when the child process (after
fork) experienced some other error, like execvpe failing because it couldn't
find the command or something. There should have been a message written to
stdout or stderr with the exception.. it wouldn't be written to the log, but
rather to the stdout of the twistd process, which probably goes away when
twistd daemonizes. The error in .flush() might be related to twistd closing
fd 1, but then I don't know why the original os.fdopen didn't fail, and why
you're able to see the log message at all.

Try running that buildslave in the foreground (twistd -n) and watch the
stdout/stderr to see if it emits more information.

If that doesn't help, maybe it's something more esoteric. Does the Twisted
test suite pass on that system? (from the top of the Twisted source tree, do
'./bin/trial -v twisted.test'. It takes maybe 5 minutes).

If so, try editing slavecommand.py and set the 'usePTY = 1' at line 170ish to
=0. That will use regular pipes instead of a PTY for the child process. PTYs
are one of those funky system-dependent things, and maybe Solaris does it
just differently enough that it exposes a bug.

Also, if possible, try running the slave under python2.3 instead of 2.2,
maybe there's a difference in the behavior of the built-in python libraries
that are responsible for creating PTYs.

weird,
 -Brian




More information about the devel mailing list