New submission from Antoine Pitrou <pit...@free.fr>: I'm not sure this is worth handling, but I had an interaction with a user who had weird deadlock problems in a glibc function (getaddrinfo) in worker processes launched with the forkserver method.
The explanation turned out to be that a sitecustomize.py did some stuff that eventually launched a helper thread, and that made the forkserver process's forking fundamentally unsafe (fork() is guaranteed to be safe if there's only one thread running in the parent process). It would be easy to check that threading.enumerate() returns only one thread, and otherwise warn the user about it. Note this only handles Python threads and not C threads invisible to Python... (a more complete solution would involve psutil :-)). ---------- components: Library (Lib) messages: 305323 nosy: davin, gregory.p.smith, pitrou priority: low severity: normal status: open title: forkserver could warn if several threads are running type: enhancement versions: Python 3.7 _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue31913> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com