greenhouse icon indicating copy to clipboard operation
greenhouse copied to clipboard

threading.py somehow throws AssertionError even after being monkey patched.

Open dsully opened this issue 13 years ago • 2 comments

Exception AssertionError: AssertionError() in <module 'threading' from '/usr/lib64/python2.6/threading.pyc'> ignored

dsully avatar Sep 12 '12 13:09 dsully

Finally getting back at this code base - FYI, this error is still happening. Anything I can do to track it down?

dsully avatar Nov 11 '12 22:11 dsully

as usual, any code you can share will help -- a minimal reproduction case would be amazing.

short of that you might annotate your threading.py with print statements around assert statements and reproduce, to at least figure out which assert it is that fails.

My guess is that it's the assert in _DummyThread.join(), being called by _MainThread._exitfunc which iterates over all threads and join()s them at shutdown time (line 854: _shutdown = _MainThread()._exitfunc). The _DummyThread might have been introduced in a currentThread call where the real current thread couldn't be found because _active had been patched but no _get_ident (that appears to be missing from greenhouse emulation, but I don't want to introduce it before I'm sure it wouldn't break something else). So there are some things to look for.

--travis

teepark avatar Nov 12 '12 20:11 teepark