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 thomas
Recipients thomas
Date 2021-04-19.18:36:19
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1618857379.44.0.428651349576.issue43890@roundup.psfhosted.org>
In-reply-to
Content
When mixing code that spawns subprocesses with code that creates event loops, Python appears to deadlock.

In the attached example, when WORKERS = 16 and ASYNC_WORKERS = 8, Python will sometimes (50% of the time?) deadlock, never exiting, with no exceptions raised. Oddly, if ASYNC_WORKERS is set to 0 or 16 (i.e., only subprocesses or only event loops), it runs reliably.

I tested this in an x86_64 Ubuntu 20.04.2 VM with Python 3.8.6. I was only able to reproduce it when the VM had more than one CPU, and I was unable to reproduce it on x86_64 MacOS.
History
Date User Action Args
2021-04-19 18:36:19thomassetrecipients: + thomas
2021-04-19 18:36:19thomassetmessageid: <1618857379.44.0.428651349576.issue43890@roundup.psfhosted.org>
2021-04-19 18:36:19thomaslinkissue43890 messages
2021-04-19 18:36:19thomascreate