You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
----------------------------------------------------------------------
Ran 3 tests in 5.404s
OK
Kill <TestWorkerProcess #2 running test=test_multiprocessing_spawn pid=438256 time=6.9 sec> process group
Kill <TestWorkerProcess #3 running test=test_multiprocessing_spawn pid=438259 time=6.9 sec> process group
Kill <TestWorkerProcess #4 running test=test_multiprocessing_spawn pid=438260 time=6.9 sec> process group
== Tests result: ENV CHANGED ==
1 test altered the execution environment:
test_multiprocessing_spawn
BaseManager._finalize_manager() timeout should be configurable, the test should use the same timeout than support.wait_process() (SHORT_TIMEOUT), and maybe the default timeout should be increased?
I propose to use the same timeout for the two process.join(timeout=xxx) calls (before/after terminate).
Activity
vstinner commentedon Mar 21, 2022
Apply attached manager_timeout.patch and run the command:
If you fail to reproduce the issue, replace -j4 with -j10 or use a larger number of concurrent jobs.
Output:
---
(...)
0:00:00 load avg: 2.85 Run tests in parallel using 4 child processes
0:00:06 load avg: 3.02 [ 1/1] test_multiprocessing_spawn failed (env changed)
test_rapid_restart (test.test_multiprocessing_spawn.WithManagerTestManagerRestart) ... ok
test_rapid_restart (test.test_multiprocessing_spawn.WithProcessesTestManagerRestart) ... ok
Warning -- Dangling processes: {<SpawnProcess name='QueueManager-5' pid=438355 parent=438255 stopped exitcode=-SIGTERM>, <SpawnProcess name='QueueManager-7' pid=438395 parent=438255 stopped exitcode=-SIGTERM>}
test_rapid_restart (test.test_multiprocessing_spawn.WithThreadsTestManagerRestart) ... ok
Warning -- Dangling processes: {<SpawnProcess name='QueueManager-8' pid=438423 parent=438255 stopped exitcode=-SIGTERM>, <SpawnProcess name='QueueManager-9' pid=438456 parent=438255 stopped exitcode=-SIGTERM>}
Warning -- Dangling processes: {<SpawnProcess name='QueueManager-8' pid=438423 parent=438255 stopped exitcode=-SIGTERM>, <SpawnProcess name='QueueManager-9' pid=438456 parent=438255 stopped exitcode=-SIGTERM>}
----------------------------------------------------------------------
Ran 3 tests in 5.404s
OK
Kill <TestWorkerProcess #2 running test=test_multiprocessing_spawn pid=438256 time=6.9 sec> process group
Kill <TestWorkerProcess #3 running test=test_multiprocessing_spawn pid=438259 time=6.9 sec> process group
Kill <TestWorkerProcess #4 running test=test_multiprocessing_spawn pid=438260 time=6.9 sec> process group
== Tests result: ENV CHANGED ==
1 test altered the execution environment:
test_multiprocessing_spawn
(...)
---
Examples of similar old issues:
See also the old fixed bpo-31234 "Make support.threading_cleanup() stricter".
vstinner commentedon Mar 21, 2022
BaseManager._finalize_manager() timeout should be configurable, the test should use the same timeout than support.wait_process() (SHORT_TIMEOUT), and maybe the default timeout should be increased?
I propose to use the same timeout for the two process.join(timeout=xxx) calls (before/after terminate).
vstinner commentedon Mar 21, 2022
Recent failures.
AMD64 FreeBSD Non-Debug 3.x:
https://buildbot.python.org/all/#/builders/172/builds/1654
---
Warning -- Dangling processes: {<SpawnProcess name='QueueManager-335' pid=15699 parent=14154 stopped exitcode=-SIGTERM>}
Warning -- Dangling processes: {<SpawnProcess name='QueueManager-335' pid=15699 parent=14154 stopped exitcode=-SIGTERM>}
1 test altered the execution environment:
test_multiprocessing_spawn
---
vstinner commentedon Mar 25, 2022
I proposed #32112 for that.
gh-91231: Add shutdown_timeout to multiprocessing BaseManager (#32112)
gh-91231: multiprocessing BaseManager waits 1.0 second (#91701)
pythongh-91231: multiprocessing BaseManager waits 1.0 second (pythonG…
gh-91231: multiprocessing BaseManager waits 1.0 second (GH-91701)
vstinner commentedon Apr 21, 2022
Merged. On Python 3.9 and 3.10, I increased the timeout from 0.1 to 1.0 second (10x longer!):
Let's say that it's enough for now.
pythongh-91231: multiprocessing BaseManager waits 1.0 second (pythonG…