Antoine Pitrou added the comment:
Also, a reliable fix is to use the "forkserver" (or "spawn", but it is much
slower) method:
https://docs.python.org/3/library/multiprocessing.html#contexts-and-start-methods
--
___
Python tracker
Antoine Pitrou added the comment:
Ok, after a bit of diagnosing, the issue is combining multi-threading with use
of fork(). The problem is file objects (such as sys.stdout) have locks but
those locks may be taken at the exact point where fork() happens, in which case
the child will block