New submission from Andrew Lutomirski: 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. ---------- components: Library (Lib) files: python_thread_bug.py messages: 208577 nosy: Andrew.Lutomirski priority: normal severity: normal status: open title: subprocess.Popen can hang in threaded applications type: behavior versions: Python 2.7 Added file: http://bugs.python.org/file33571/python_thread_bug.py _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue20318> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com