STINNER Victor added the comment:
The creation of slave_popen is not protected by a lock, and so dummy_thread()
may spawn a new process (master) at the same time than the main process
(slave). If it occurs at the same time, the master may inherit a pipe of the
slave process used internally by
New submission from Owen Lin:
If we call two subprocess.Popen simultaneously, the second one is blocked until
the first one is finished.
The attached file is a code snippet to reproduce this bug. I can reproduce the
bug in version 2.7.3 and 2.7.6 very easily (in few seconds with the code). Bu