8000 bpo-38546: multiprocessing tests stop the resource tracker by vstinner · Pull Request #17641 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

bpo-38546: multiprocessing tests stop the resource tracker #17641

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

Merged
merged 2 commits into from
Dec 17, 2019
Merged

bpo-38546: multiprocessing tests stop the resource tracker #17641

merged 2 commits into from
Dec 17, 2019

Conversation

vstinner
Copy link
Member
@vstinner vstinner commented Dec 17, 2019

Multiprocessing tests now stop the resource tracker process, to
prevent leaking a child process after tests complete.

Add _cleanup_tests() helper function to multiprocessing.util: share
code between multiprocessing and concurrent.futures tests.

https://bugs.python.org/issue38546

Multiprocessing and concurrent.futures tests now stop the resource
tracker process when tests complete.

Add ResourceTracker._stop() method to
multiprocessing.resource_tracker.

Add _cleanup_tests() helper function to multiprocessing.util: share
code between multiprocessing and concurrent.futures tests.
@vstinner
Copy link
Member Author
vstinner commented Dec 17, 2019

Last July, I wrote a similar fix for forkserver in bpo-37421: commit 8fbeb14.

@vstinner vstinner merged commit 9707e8e into python:master Dec 17, 2019
@vstinner vstinner deleted the mp_stop_res_tracker branch December 17, 2019 17:37
@miss-islington
Copy link
Contributor

Thanks @vstinner for the PR 🌮🎉.. I'm working now to backport this PR to: 3.8.
🐍🍒⛏🤖

@miss-islington
Copy link
Contributor

Sorry, @vstinner, I could not cleanly backport this to 3.8 due to a conflict.
Please backport using cherry_picker on command line.
cherry_picker 9707e8e22d80ca97bf7a9812816701cecde6d226 3.8

@bedevere-bot
Copy link

GH-17647 is a backport of this pull request to the 3.8 branch.

vstinner added a commit that referenced this pull request Dec 18, 2019
…GH-17647)

Multiprocessing and concurrent.futures tests now stop the resource
tracker process when tests complete.

Add ResourceTracker._stop() method to
multiprocessing.resource_tracker.

Add _cleanup_tests() helper function to multiprocessing.util: share
code between multiprocessing and concurrent.futures tests.

(cherry picked from commit 9707e8e)
shihai1991 pushed a commit to shihai1991/cpython that referenced this pull request Jan 31, 2020
…17641)

Multiprocessing and concurrent.futures tests now stop the resource
tracker process when tests complete.

Add ResourceTracker._stop() method to
multiprocessing.resource_tracker.

Add _cleanup_tests() helper function to multiprocessing.util: share
code between multiprocessing and concurrent.futures tests.
vstinner added a commit that referenced this pull request Apr 23, 2020
…-19689)

* bpo-37421: multiprocessing tests call _run_finalizers() (GH-14527)

multiprocessing tests now call explicitly _run_finalizers() to remove
immediately temporary directories created by
multiprocessing.util.get_temp_dir().
(cherry picked from commit 039fb49)

Co-authored-by: Victor Stinner <vstinner@redhat.com>
(cherry picked from commit 632cb36)

* bpo-37421: multiprocessing tests now stop ForkServer (GH-14601)

multiprocessing tests now stop the ForkServer instance if it's
running: close the "alive" file descriptor to ask the server to stop
and then remove its UNIX address.
(cherry picked from commit 8fbeb14)

Co-authored-by: Victor Stinner <vstinner@redhat.com>
(cherry picked from commit 229f6e8)

* bpo-38546: multiprocessing tests stop the resource tracker (GH-17641) (GH-17647)

Multiprocessing and concurrent.futures tests now stop the resource
tracker process when tests complete.

Add ResourceTracker._stop() method to
multiprocessing.resource_tracker.

Add _cleanup_tests() helper function to multiprocessing.util: share
code between multiprocessing and concurrent.futures tests.

(cherry picked from commit 9707e8e)
(cherry picked from commit 35acb35)

* Remove NEWS about resource tracker

Python 3.7 multiprocessing does not have resource tracker.

Co-authored-by: Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants
0