Ticket #2028 (closed defect: fixed)

Opened 23 months ago

Last modified 23 months ago

startBuild failing with assertion, causes builder to never fire.

Reported by: bdbaddog Owned by:
Priority: major Milestone: undecided
Version: 0.8.4p1 Keywords:
Cc:

Description

Here's the stack trace.

djmitche sugguests that it's likely the right thing to remove the assertion in question as this might be caused by firing off a large number of the same builder in a row.

    2011-06-28 14:48:24-0700 [-] <Build verify_trunk>.startBuild
    2011-06-28 14:48:24-0700 [-] Unhandled error in Deferred:
    2011-06-28 14:48:24-0700 [-] Unhandled Error
        Traceback (most recent call last):
          File "/export/buildbot/bb_06_23_2011/lib/python2.5/site-packages/twisted/internet/defer.py", line 361, in callback
            self._startRunCallbacks(result)
          File "/export/buildbot/bb_06_23_2011/lib/python2.5/site-packages/twisted/internet/defer.py", line 455, in _startRunCallbacks
            self._runCallbacks()
          File "/export/buildbot/bb_06_23_2011/lib/python2.5/site-packages/twisted/internet/defer.py", line 542, in _runCallbacks
            current.result = callback(current.result, *args, **kw)
          File "/export/buildbot/bb_06_23_2011/lib/python2.5/site-packages/twisted/internet/defer.py", line 891, in gotResult
            _deferGenerator(g, deferred)
        --- <exception caught here> ---
          File "/export/buildbot/bb_06_23_2011/lib/python2.5/site-packages/twisted/internet/defer.py", line 866, in _deferGenerator
            result = g.next()
          File "/export/buildbot/bb_06_23_2011/lib/python2.5/site-packages/buildbot-latest-py2.5.egg/buildbot/process/builder.py", line 514, in _startBuildFor
            d = build.startBuild(bs, self.expectations, slavebuilder)
          File "/export/buildbot/bb_06_23_2011/lib/python2.5/site-packages/buildbot-latest-py2.5.egg/buildbot/process/build.py", line 268, in startBuild
            self.build_status.buildStarted(self)
          File "/export/buildbot/bb_06_23_2011/lib/python2.5/site-packages/buildbot-latest-py2.5.egg/buildbot/status/build.py", line 265, in buildStarted
            self.builder.buildStarted(self)
          File "/export/buildbot/bb_06_23_2011/lib/python2.5/site-packages/buildbot-latest-py2.5.egg/buildbot/status/builder.py", line 507, in buildStarted
            assert s.number == self.nextBuildNumber - 1
        exceptions.AssertionError:

Change History

comment:1 Changed 23 months ago by bdbaddog

Another stacktrace with info on s.number vs self.nextBuildNumber

2011-07-01 07:54:35-0700 [-] DEEGAN: s.number:768 s.nextBuildNumber:769
...
2011-07-01 07:54:37-0700 [-] DEEGAN: s.number:769 s.nextBuildNumber:770
...
2011-07-01 07:54:39-0700 [-] <Build verify_trunk>.startBuild
2011-07-01 07:54:39-0700 [-] DEEGAN: s.number:770 s.nextBuildNumber:772
2011-07-01 07:54:39-0700 [-] Unhandled error in Deferred:
2011-07-01 07:54:39-0700 [-] Unhandled Error
    Traceback (most recent call last):
      File "/export/buildbot/bb_06_23_2011/lib/python2.5/site-packages/twisted/internet/defer.py", line 361, in callback
        self._startRunCallbacks(result)
      File "/export/buildbot/bb_06_23_2011/lib/python2.5/site-packages/twisted/internet/defer.py", line 455, in _startRunCallbacks
        self._runCallbacks()
      File "/export/buildbot/bb_06_23_2011/lib/python2.5/site-packages/twisted/internet/defer.py", line 542, in _runCallbacks
        current.result = callback(current.result, *args, **kw)
      File "/export/buildbot/bb_06_23_2011/lib/python2.5/site-packages/twisted/internet/defer.py", line 891, in gotResult
        _deferGenerator(g, deferred)
    --- <exception caught here> ---
      File "/export/buildbot/bb_06_23_2011/lib/python2.5/site-packages/twisted/internet/defer.py", line 866, in _deferGenerator
        result = g.next()
      File "/export/buildbot/bb_06_23_2011/lib/python2.5/site-packages/buildbot-latest-py2.5.egg/buildbot/process/builder.py", line 514, in _startBuildFor
        d = build.startBuild(bs, self.expectations, slavebuilder)
      File "/export/buildbot/bb_06_23_2011/lib/python2.5/site-packages/buildbot-latest-py2.5.egg/buildbot/process/build.py", line 268, in startBuild
        self.build_status.buildStarted(self)
      File "/export/buildbot/bb_06_23_2011/lib/python2.5/site-packages/buildbot-latest-py2.5.egg/buildbot/status/build.py", line 265, in buildStarted
        self.builder.buildStarted(self)
      File "/export/buildbot/bb_06_23_2011/lib/python2.5/site-packages/buildbot-latest-py2.5.egg/buildbot/status/builder.py", line 508, in buildStarted
        assert s.number == self.nextBuildNumber - 1
    exceptions.AssertionError:

2011-07-01 07:54:40-0700 [-] <Build verify_trunk>.startBuild
2011-07-01 07:54:40-0700 [-] DEEGAN: s.number:771 s.nextBuildNumber:772

comment:2 Changed 23 months ago by dustin

That confirms what I thought - this assertion assumes that newBuild and startBuild will be called back-to-back, and in this case that doesn't happen. So removing the assertion is the correct fix.

comment:3 Changed 23 months ago by Dustin J. Mitchell

  • Status changed from new to closed
  • Resolution set to fixed

remove incorrect assertion

Fixes #2028.

Changeset: fea9229d523a3942f3ace9af48796882d375eaa3

comment:4 Changed 23 months ago by Dustin J. Mitchell

remove incorrect assertion

Fixes #2028.

Changeset: 37f64f5476e0da77ac5e1e5485657a456ab19290

Note: See TracTickets for help on using tickets.