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 Andrew.Lutomirski
Recipients Andrew.Lutomirski
Date 2014-01-20.20:30:18
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1390249819.03.0.991344131396.issue20318@psf.upfronthosting.co.za>
In-reply-to
Content
Running python python_thread_bug.py -j4 often results in one of the threads failing to start until another thread finishes.

The bug appears to be that subprocess's pipe_cloexec function is racy: if another thread forks between os.pipe() and _set_cloexec_flag, then the resulting process could hang on to the write end of the pipe.  That will cause the Popen call that got rudely interrupted to wait until the whole resulting process tree dies.
History
Date User Action Args
2014-01-20 20:30:19Andrew.Lutomirskisetrecipients: + Andrew.Lutomirski
2014-01-20 20:30:19Andrew.Lutomirskisetmessageid: <1390249819.03.0.991344131396.issue20318@psf.upfronthosting.co.za>
2014-01-20 20:30:18Andrew.Lutomirskilinkissue20318 messages
2014-01-20 20:30:18Andrew.Lutomirskicreate