-
-
Notifications
You must be signed in to change notification settings - Fork 29.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
test_multiprocessing_spawn leaks QueueManager dangling processes #91231
Comments
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: test_rapid_restart (test.test_multiprocessing_spawn.WithProcessesTestManagerRestart) ... ok test_rapid_restart (test.test_multiprocessing_spawn.WithThreadsTestManagerRestart) ... ok ---------------------------------------------------------------------- OK == Tests result: ENV CHANGED == 1 test altered the execution environment: (...) Examples of similar old issues:
See also the old fixed bpo-31234 "Make support.threading_cleanup() stricter". |
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). |
Recent failures. AMD64 FreeBSD Non-Debug 3.x: 1 test altered the execution environment: |
I proposed #32112 for that. |
Add an optional keyword 'shutdown_timeout' parameter to the multiprocessing.BaseManager constructor. Kill the process if terminate() takes longer than the timeout. Multiprocessing tests pass test.support.SHORT_TIMEOUT to BaseManager.shutdown_timeout.
Shutting down a multiprocessing BaseManager now waits for 1 second until the process completes, rather than 0.1 second, after the process is terminated.
Shutting down a multiprocessing BaseManager now waits for 1 second until the process completes, rather than 0.1 second, after the process is terminated. (cherry picked from commit a885f10) Co-authored-by: Victor Stinner <vstinner@python.org>
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. |
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: