This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author neologix
Recipients Martijn.van.Oosterhout, glaubich, neologix, pitrou, rosslagerwall
Date 2012-02-01.22:12:07
SpamBayes Score 2.7653482e-07
Marked as misclassified No
Message-id <1328134328.54.0.84386058306.issue13817@psf.upfronthosting.co.za>
In-reply-to
Content
I thought about this a bit more, and I realized that a slight variation
of this bug also affects 2.7, and also older versions (i.e. before
_PyGILState_Reinit() was introduced), because any code that gets called
from PyOS_AfterFork() and uses the TLS API suffers from the same
problem.
I had the new test deadlock once, in theading._after_fork(): when trying
to acquire an (unlocked) lock, it got stuck in Py_END_ALLOW_THREADS,
which calls indirectly PyGILState_GetThisThreadState(), which calls
find_key().
Although less likely, this bug has been present for a *long* time, it's
surprising it had never been noticed before.
So the fix - calling PyThread_ReInitTLS() right at the beginning of PyOS_AfterFork() - should also be applied to 2.7.
I'll commit it tomorrow.
History
Date User Action Args
2012-02-01 22:12:08neologixsetrecipients: + neologix, pitrou, rosslagerwall, Martijn.van.Oosterhout, glaubich
2012-02-01 22:12:08neologixsetmessageid: <1328134328.54.0.84386058306.issue13817@psf.upfronthosting.co.za>
2012-02-01 22:12:07neologixlinkissue13817 messages
2012-02-01 22:12:07neologixcreate