STINNER Victor <vstin...@redhat.com> added the comment: > It looks like test_multiprocessing_fork doesn't clean up some of its > subprocesses and then test_subprocess hangs on waitpid(0) forever.
Oh strange. This issue was supposed to be fixed. I spent a lot of time to fix such bug, but also make sure that not test leak any child process. "test_subprocess hangs on waitpid(0) forever" I recall a similar bug that I fixed recently. I spent time on test.support.reap_children() and test.support.threading_cleanup() to make sure that tests don't leak threads no child processes. It seems like I missed some tests. In Lib/test/libregrtest/runtest.py, I added: def post_test_cleanup(): support.reap_children() which is run after each test. But currently, support.reap_children() calls os.waitpid(-1, os.WNOHANG) to check for child processes which already completed. It doesn't warn if there are child processes which are still running. During my tests, I modified reap_children() to add a sleep(1). Maybe on Linux we could use a cgroup to really check for all child processes? ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue31463> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com