[issue874900] threading module can deadlock after fork
Adam Olsen
report at bugs.python.org
Wed Jul 9 19:46:21 CEST 2008
Adam Olsen <rhamph at gmail.com> added the comment:
In general I suggest replacing the lock with a new lock, rather than
trying to release the existing one. Releasing *might* work in this
case, only because it's really a semaphore underneath, but it's still
easier to think about by just replacing.
I also suggest deleting _active and recreating it with only the current
thread.
I don't understand how test_join_on_shutdown could succeed. The main
thread shouldn't be marked as done.. well, ever. The test should hang.
I suspect test_join_in_forked_process should call os.waitpid(childpid)
so it doesn't exit early, which would cause the original Popen.wait()
call to exit before the output is produced. The same problem of
test_join_on_shutdown also applies.
Ditto for test_join_in_forked_from_thread.
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue874900>
_______________________________________
More information about the Python-bugs-list
mailing list