New submission from Thomas Buhrmann <thomas.buehrm...@gmail.com>:
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. ---------- files: subprocess_asyncio_deadlock.py messages: 391386 nosy: thomas priority: normal severity: normal status: open title: Deadlock when mixing event loops and subprocesses type: behavior versions: Python 3.8 Added file: https://bugs.python.org/file49967/subprocess_asyncio_deadlock.py _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue43890> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com