-
-
Notifications
You must be signed in to change notification settings - Fork 32.1k
gh-132969: Fix error/hang when shutdown(wait=False) and task exited abnormally #133222
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
+70
−0
Merged
Changes from all commits
Commits
Show all changes
31 commits
Select commit
Hold shift + click to select a range
8ac1fcf
gh-132969 Fix exception/hang when shutdown(wait=False) and a task ex…
ogbiggles 1774445
📜🤖 Added by blurb_it.
blurb-it[bot] 0938eeb
gh-132969 Skip forkserver-dependent test on Windows
blurb-it[bot] dbc0ba8
Merge branch 'origin/main' of github.com:ogbiggles/cpython-fix-132969…
ogbiggles 99ab321
gh-132969 Skip forkserver dependent tests on Windows
ogbiggles fe3650c
Merge branch 'main' into origin/main
ogbiggles 40cefc2
Merge branch 'python:main' into origin/main
ogbiggles c177c91
gh-132969 Added more verbiage to the explanation.
ogbiggles 2cd70b1
gh-132969 Add more verbiage explaining the change
ogbiggles 57265b5
gh-132969 Make test helper methods into private class methods, use @…
ogbiggles d0c2bb0
Merge branch 'origin/main' of github.com:ogbiggles/cpython-fix-132969…
ogbiggles 709d9fd
gh-132969 Fix Sphinx Lint error
ogbiggles 1a8919b
gh-132969: make unittest for gh-132969 runnable on windows by swichin…
ogbiggles 87eb623
gh-132969: Remove @unittest.skipIf annotations since spawn works on w…
ogbiggles ec2543a
gh-132969: Incorproate review suggestion to skip test when start_meth…
ogbiggles 3b3721f
gh-132969: Remove import of multiprocessing and use self.get_context(…
ogbiggles 7ef7872
gh-132969: use self.skipTest instead of unittest.SkipTest, shorten me…
ogbiggles efd0a1d
gh-132969: removed type annotations
ogbiggles b335d38
gh-132969: removed extraneous blank line
ogbiggles b060786
gh-132969: fix call to self.skipTest
ogbiggles c6457c3
gh-132969: Run gh-132969 tests only with "spawn" mp_context
ogbiggles 2beb0d9
Merge branch 'main' into origin/main
ogbiggles 65f30b0
gh-132969: Join executor_manager_thread after exercising shutdown(wai…
ogbiggles 54ae7b8
gh-132969: fix typo in skip message
ogbiggles e132f5e
gh-132969: Tweak the news entry for grammar and clarity.
ogbiggles 9908810
gh-132969: Run test with "spawn" on all platforms and "forkserver" if…
ogbiggles f5f3dc2
Update Lib/test/test_concurrent_futures/test_shutdown.py
ogbiggles 0fe743b
Update Misc/NEWS.d/next/Library/2025-04-30-19-32-18.gh-issue-132969.E…
ogbiggles 310765e
gh-132969: fixed typo in reference to shutdown method
ogbiggles 86d0c2a
gh-132969: fixed doc reference to shutdown method
ogbiggles 4f46875
gh-132969: Tweak comment for readability
ogbiggles File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7 changes: 7 additions & 0 deletions
7
Misc/NEWS.d/next/Library/2025-04-30-19-32-18.gh-issue-132969.EagQ3G.rst
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
Prevent the :class:`~concurrent.futures.ProcessPoolExecutor` executor thread, | ||
which remains running when :meth:`shutdown(wait=False) | ||
<concurrent.futures.Executor.shutdown>`, from | ||
attempting to adjust the pool's worker processes after the object state has already been reset during shutdown. | ||
A combination of conditions, including a worker process having terminated abormally, | ||
resulted in an exception and a potential hang when the still-running executor thread | ||
attempted to replace dead workers within the pool. |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.