Message317382
> 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? |
|
Date |
User |
Action |
Args |
2018-05-23 10:37:19 | vstinner | set | recipients:
+ vstinner, pitrou, benjamin.peterson, hroncok |
2018-05-23 10:37:18 | vstinner | set | messageid: <1527071838.96.0.682650639539.issue31463@psf.upfronthosting.co.za> |
2018-05-23 10:37:18 | vstinner | link | issue31463 messages |
2018-05-23 10:37:18 | vstinner | create | |
|