GeezerVison is showing github.com — [3.12] gh-107219: Fix concurrent.futures terminate_broken() (GH-109244) by miss-islington · Pull Request #109254 · python/cpython
Conversation
miss-islington
commented
Sep 11, 2023
•
edited by bedevere-bot
Loading
Uh oh!
There was an error while loading. Please reload this page.
Fix a race condition in concurrent.futures. When a process in the
process pool was terminated abruptly (while the future was running or
pending), close the connection write end. If the call queue is
blocked on sending bytes to a worker process, closing the connection
write end interrupts the send, so the queue can be closed.
Changes:
- _ExecutorManagerThread.terminate_broken() now closes
call_queue._writer.
- multiprocessing PipeConnection.close() now interrupts
WaitForMultipleObjects() in _send_bytes() by cancelling the
overlapped operation.
(cherry picked from commit a9b1f84)
Co-authored-by: Victor Stinner [email protected]
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
…109244)
Fix a race condition in concurrent.futures. When a process in the
process pool was terminated abruptly (while the future was running or
pending), close the connection write end. If the call queue is
blocked on sending bytes to a worker process, closing the connection
write end interrupts the send, so the queue can be closed.
Changes:
* _ExecutorManagerThread.terminate_broken() now closes
call_queue._writer.
* multiprocessing PipeConnection.close() now interrupts
WaitForMultipleObjects() in _send_bytes() by cancelling the
overlapped operation.
(cherry picked from commit a9b1f84)
Co-authored-by: Victor Stinner <[email protected]>
This was referenced Sep 11, 2023
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
|
I don't know that this strictly needs to hold up 3.12.0, it'd be fine in 3.12.1... but the issue this addresses seems to be one that causes CI testing to fail frequently on windows. so it might help unblock things anyways.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
|
FYI, I'm delaying this until 3.12.1.
|
gpshead reacted with thumbs up emoji
vstinner reacted with confused emoji
All reactions
-
👍
1 reaction
-
😕
1 reaction
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Reviewers
gpshead
gpshead approved these changes
vstinner
vstinner approved these changes
Uh oh!
There was an error while loading. Please reload this page.
Milestone
No milestone
Development
Successfully merging this pull request may close these issues.
Uh oh!
There was an error while loading. Please reload this page.
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.