Antoine Pitrou added the comment: I think I've found the answer: the thread is sometimes already stopped by the time the child is forked, so it doesn't appear in _enumerate() anymore (it left the _active dict). Therefore its locks are not reset in _after_fork().
Oh, I also get the following sporadic failure which is triggered by slight change in semantics with Thread.join(timeout) :-) ====================================================================== FAIL: test_various_ops (test.test_threading.ThreadTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/antoine/cpython/default/Lib/test/test_threading.py", line 113, in test_various_ops self.assertTrue(not t.is_alive()) AssertionError: False is not true ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue18808> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com