Ticket #369 (closed defect: invalid)

Opened 2 months ago

Last modified 2 months ago

TypeError in buildbot.slave.commands.ShellCommand

Reported by: dokai Assigned to: zooko
Priority: critical Milestone: undecided
Component: other Version: 0.7.9
Keywords: Cc:

Description

The startTime variable in buildbot.slave.commands.ShellCommand? doesn't get initialized which results in an TypeError? in finished() when trying to calculate the elapsed time.

This happens on a vanilla 0.7.9 installation when trying run a test. Everything works fine on 0.7.8. The relevant traceback is below:

2008-10-11 22:14:11+0300 [-] Unhandled Error
        Traceback (most recent call last):
          File "/home/dokai/collective.buildbot/eggs/Twisted-8.1.0-py2.5-linux-i686.egg/twisted/internet/selectreactor.py", line 15
6, in _doReadOrWrite
            self._disconnectSelectable(selectable, why, method=="doRead")
          File "/home/dokai/collective.buildbot/eggs/Twisted-8.1.0-py2.5-linux-i686.egg/twisted/internet/posixbase.py", line 193, i
n _disconnectSelectable
            selectable.connectionLost(f)
          File "/home/dokai/collective.buildbot/eggs/Twisted-8.1.0-py2.5-linux-i686.egg/twisted/internet/process.py", line 915, in 
connectionLost
            self.maybeCallProcessEnded()
          File "/home/dokai/collective.buildbot/eggs/Twisted-8.1.0-py2.5-linux-i686.egg/twisted/internet/process.py", line 906, in 
maybeCallProcessEnded
            _BaseProcess.maybeCallProcessEnded(self)
        --- <exception caught here> ---
          File "/home/dokai/collective.buildbot/eggs/Twisted-8.1.0-py2.5-linux-i686.egg/twisted/internet/process.py", line 333, in 
maybeCallProcessEnded
            self.proto.processEnded(failure.Failure(e))
          File "/home/dokai/collective.buildbot/eggs/buildbot-0.7.9-py2.5.egg/buildbot/slave/commands.py", line 158, in processEnde
d
            self.command.finished(sig, rc)
          File "/home/dokai/collective.buildbot/eggs/buildbot-0.7.9-py2.5.egg/buildbot/slave/commands.py", line 474, in finished
            self.elapsedTime = time.time() - self.startTime
        exceptions.TypeError: unsupported operand type(s) for -: 'float' and 'NoneType'

Change History

10/12/08 05:48:28 changed by zooko

  • owner set to zooko.
  • status changed from new to assigned.

10/13/08 09:17:00 changed by zooko

  • status changed from assigned to closed.
  • resolution set to invalid.

The original reporter told me on IRC that this was actually a monkey-patch that they were running locally that was causing this problem. Don't know if it also applies to http://article.gmane.org/gmane.comp.python.buildbot.devel/3633 , but since I reviewed the code and couldn't see how it could be wrong I'm closing this ticket.