[Buildbot-commits] [Buildbot] #2395: test_master fails randomly

Buildbot nobody at buildbot.net
Wed Nov 14 03:24:16 UTC 2012


#2395: test_master fails randomly
-------------------+---------------------
Reporter:  dustin  |       Owner:  dustin
    Type:  defect  |      Status:  new
Priority:  major   |   Milestone:  0.8.8
 Version:  master  |  Resolution:
Keywords:          |
-------------------+---------------------

Comment (by dustin):

 The Python test suite, test_generator.py specifically, indicates that this
 error is generated when a generator raises an exception while it's being
 closed by gc:

 {{{
 Our ill-behaved code should be invoked during GC:

 >>> import sys, StringIO
 >>> old, sys.stderr = sys.stderr, StringIO.StringIO()
 >>> g = f()
 >>> g.next()
 >>> del g
 >>> sys.stderr.getvalue().startswith(
 ...     "Exception RuntimeError: 'generator ignored GeneratorExit' in "
 ... )
 True
 >>> sys.stderr = old
 }}}

 (the full text on stderr is:)
 {{{
 >>> del g
 Exception RuntimeError: 'generator ignored GeneratorExit' in <generator
 object f at 0x10049d320> ignored
 }}}

 which explains the on-again-off-again nature of the bug.

 So, somewhere, there's an @inlineCallback generator that's being GC'd
 before it's finished, probably because it's left hanging when the master
 is shut down.  It gets GC'd while it's in a bare try/except block, and
 that block is catching the exception and calling `defer.returnValue` which
 raises `defer._DefGen_Return`.

-- 
Ticket URL: <http://trac.buildbot.net/ticket/2395#comment:7>
Buildbot <http://buildbot.net/>
Buildbot: build/test automation


More information about the Commits mailing list