[Buildbot-devel] buildbot-0.7.9 TypeError: self.startTime is NoneType

Jean-Paul Calderone exarkun at divmod.com
Thu Sep 25 19:29:30 UTC 2008


On Thu, 25 Sep 2008 15:02:47 -0400, Chris Shenton <chris.shenton at nasa.gov> wrote:
>I'm a bit of a buildbot newbie but noticed this when 0.7.9 came out. I 
>figured it was me, and went back to 0.7.8.
>Now that I've got a weeks experience, I figured I'd try 0.7.9 again.  Same 
>error.
>
>In my builder, rhel_x86_64, the twistd.log file shows the following, 
>whether by svn poll or manual click-to-build:
>
>2008-09-25 14:50:45-0400 [Broker,client]  environment: {...}
>2008-09-25 14:50:45-0400 [Broker,client]   closing stdin
>2008-09-25 14:50:45-0400 [Broker,client]   using PTY: True
>2008-09-25 14:50:45-0400 [-] Unhandled Error
>         Traceback (most recent call last):
>           File "/usr/local/home/cshenton/buildbot_buildout/eggs/ 
>Twisted-8.1.0-py2.4-linux-x86_64.egg/\
>twisted/internet/process.py", line 44, in reapAllProcesses
>             process.reapProcess()
>           File "/usr/local/home/cshenton/buildbot_buildout/eggs/ 
>Twisted-8.1.0-py2.4-linux-x86_64.egg/\
>twisted/internet/process.py", line 297, in reapProcess
>             self.processEnded(status)
>           File "/usr/local/home/cshenton/buildbot_buildout/eggs/ 
>Twisted-8.1.0-py2.4-linux-x86_64.egg/\
>twisted/internet/process.py", line 882, in processEnded
>             self.maybeCallProcessEnded()
>           File "/usr/local/home/cshenton/buildbot_buildout/eggs/ 
>Twisted-8.1.0-py2.4-linux-x86_64.egg/\
>twisted/internet/process.py", line 906, in maybeCallProcessEnded
>             _BaseProcess.maybeCallProcessEnded(self)
>         --- <exception caught here> ---
>           File "/usr/local/home/cshenton/buildbot_buildout/eggs/ 
>Twisted-8.1.0-py2.4-linux-x86_64.egg/\
>twisted/internet/process.py", line 333, in maybeCallProcessEnded
>             self.proto.processEnded(failure.Failure(e))
>           File "/usr/local/home/cshenton/buildbot_buildout/eggs/ 
>buildbot-0.7.9-py2.4.egg/buildbot/sla\
>ve/commands.py", line 158, in processEnded
>             self.command.finished(sig, rc)
>           File "/usr/local/home/cshenton/buildbot_buildout/eggs/ 
>buildbot-0.7.9-py2.4.egg/buildbot/sla\
>ve/commands.py", line 474, in finished
>             self.elapsedTime = time.time() - self.startTime
>         exceptions.TypeError: unsupported operand type(s) for -:  'float' 
>and 'NoneType'
>
>I am only guessing here but setting that class var to time.time()  might be 
>what was meant?

Notice that `_startCommand` does set `startTime` to `time.time()`.  If
`self.notreally` is true, then `_startCommand` will call `finished`
directly without ever setting `startTime`, so this could be a problem.
However, from your stack trace, this doesn't not appear to be the issue
you're encountering (since `processEnded` is above `finished` on the stack.

Setting `startTime` on the class will remove the exception, but it will
just replace it with incorrect output - not really an improvement. :)  It'd
be good to track down exactly how the child process for the command can end
and cause the `finished` method to be called without the `startTime`
assignment in `_startCommand` running.

Jean-Paul




More information about the devel mailing list