[issue42097] Python 3.7.9 logging/threading/fork hang

Andrew de Quincey report at bugs.python.org
Mon Oct 26 07:23:10 EDT 2020


Andrew de Quincey <Adq at tvsquared.com> added the comment:

Hi, sorry, I was ill on Friday, apologies for the delayed reply.

We're not using os.fork() directly, and I'm afraid the multiprocessing thing I mentioned was a bit of a red herring.

We're using a capped pool of threads to spawn subprocesses (using subprocess.*) and wait for them to complete.. so we'll do something like spawn max 6 threads, each of which will kick off a subprocess and stuff them in a list. Then in the main loop, we wait for one of the threads to complete and start a new one when it has done so. I don't _believe_ this should trigger the os.fork()/logging bug?

This all worked fine in 2.* and in 3.5. Its only in 3.7 that we have started to have this hanging problem.

Unfortunately the (production) environment that has the problem is currently running 3.7. We do have plans to upgrade to 3.8, but I can't just switch it.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue42097>
_______________________________________


More information about the Python-bugs-list mailing list