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 pitrou
Recipients Delgan, pitrou, vstinner
Date 2020-04-28.10:43:09
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
I can reproduce on Ubuntu 18.04 with git master.

Here is a better example which clearly shows the issue:

After a few runs, you'll see that the child Process hangs when trying to flush the standard streams:
Timeout (0:00:01)!
Thread 0x00007efbff6c0080 (most recent call first):
  File "/home/antoine/cpython/default/Lib/multiprocessing/", line 435 in _flush_std_streams
  File "/home/antoine/cpython/default/Lib/multiprocessing/", line 335 in _bootstrap
  File "/home/antoine/cpython/default/Lib/multiprocessing/", line 71 in _launch
  File "/home/antoine/cpython/default/Lib/multiprocessing/", line 19 in __init__
  File "/home/antoine/cpython/default/Lib/multiprocessing/", line 276 in _Popen
  File "/home/antoine/cpython/default/Lib/multiprocessing/", line 224 in _Popen
  File "/home/antoine/cpython/default/Lib/multiprocessing/", line 121 in start
  File "/home/antoine/cpython/default/", line 25 in <module>
Child process failed!

@Delgan, mixing processes and threads is problematic with the default settings.  See here:

"""Note that safely forking a multithreaded process is problematic."""

If you call `multiprocessing.set_start_method("forkserver")` at the start of your program, the problem will disappear.
Date User Action Args
2020-04-28 10:43:10pitrousetrecipients: + pitrou, vstinner, Delgan
2020-04-28 10:43:10pitrousetmessageid: <>
2020-04-28 10:43:10pitroulinkissue40399 messages
2020-04-28 10:43:09pitroucreate