[issue18808] Thread.join returns before PyThreadState is destroyed

2013-08-24 Thread Tamas K
Tamas K added the comment: After a quick glance, I can't see how this patch would fix the problem. It still depends on threading's Thread.join, which is affected by the race condition in __bootstrap_inner. We already did a Thread.join before calling Py_EndInterpreter and still got

[issue18808] Thread.join returns before PyThreadState is destroyed

2013-08-22 Thread Tamas K
Tamas K added the comment: Removing the last thread check sounds good, what we actually need is a Py_EndInterpreter that does not casually abort() on us, we don't really care about PyThreadStates that much. -- ___ Python tracker

[issue18808] Thread.join returns before PyThreadState is destroyed

2013-08-22 Thread Tamas K
Tamas K added the comment: The bug was found in 2.6.5, but after a quick eyeballing, current HEAD has the same problem. -- ___ Python tracker <http://bugs.python.org/issue18

[issue18808] Thread.join returns before PyThreadState is destroyed

2013-08-22 Thread Tamas K
New submission from Tamas K: When a thread is started in CPython, t_bootstrap [Modules/threadmodule.c] creates a PyThreadState object and then calls Thread.__bootstrap_inner [Lib/threading.py] which calls Thread.run, protected with self.__block, a Condition. Thread.join uses the same __block