Ticket #316 (closed defect: worksforme)

Opened 4 years ago

Last modified 3 years ago

scripts/logwatcher.py:48: PotentialZombieWarning

Reported by: igor Owned by:
Priority: major Milestone: undecided
Version: 0.7.7 Keywords:
Cc:

Description

Running buildbot 0.7.7 with Twisted 0.8.1 on Linux under Python 2.5.2 gives me the following warning on startup:

Following twistd.log until startup finished.. /home/roundbox/local/lib/python2.5/site-packages/buildbot/scripts/logwatcher.py:48: PotentialZombieWarning?: spawnProcess called, but the SIGCHLD handler is not installed. This probably means you have not yet called reactor.run, or called reactor.run(installSignalHandler=0). You will probably never see this process finish, and it may become a zombie process.

env=os.environ,

2008-07-14 12:44:05-0400 [-] Log opened. 2008-07-14 12:44:05-0400 [-] twistd 8.1.0 (/home/roundbox/local/bin/python 2.5.2) starting up 2008-07-14 12:44:05-0400 [-] reactor class: <class 'twisted.internet.selectreactor.SelectReactor?'>

Change History

comment:1 Changed 3 years ago by dustin

This is generally a harmless warning when it comes from scripts/logwatcher.py.

In this case (from IRC) it looks like the underlying cause (as seen in the logfile) was a bad username/password for the slave.

So, others seeing this error: check the logfile.

comment:2 Changed 3 years ago by exarkun

As dustin says, this is pretty much harmless. The log watcher is starting before the reactor starts. In the general, case, this merits a warning because the child process might exit before the reactor starts, in which case the exit will never be noticed. In this case, it seems unlikely that tail will ever exit so soon. It could if the filename to watch is given wrong or if it fails in some other bizarre way, but almost all the time tail will work fine and only exit after the reactor has really started.

To be completely correct, buildbot should only call spawnProcess after reactor.run. Or someone should contribute an enhancement upstream to Twisted to make it safe to call spawnProcess first.

Also, it seems that previous versions of buildbot didn't use tail in a child process to watch logs. Switching to run a child process adds a ton of extra complexity. Fixing #141 by emulating tail wouldn't have been extremely hard. It also wouldn't have broken log following on Solaris (which doesn't support all the options buildbot is trying to pass to tail).

comment:3 Changed 3 years ago by dustin

  • Status changed from new to closed
  • Resolution set to worksforme
Note: See TracTickets for help on using tickets.