Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

[3.12] gh-132969: Fix exception/hang shutdown(wait=False) and a task exited abnormally#133220

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Closed
ogbiggles wants to merge2 commits intopython:3.12fromogbiggles:3.12

Conversation

ogbiggles
Copy link

@ogbigglesogbiggles commentedApr 30, 2025
edited by bedevere-appbot
Loading

When shutdown is called with wait=False, the executor thread keeps running even after the ProcessPoolExecutor's state is reset. The executor then tries to replenish the worker processes pool resulting in an error and a potential hang when it comes across a worker that has died. Fixed the issue by having _adjust_process_count() return without doing anything if the ProcessPoolExecutor's state has been reset.

Added unit tests to validate two scenarios:
max_workers < num_tasks (exception)
max_workers > num_tasks (exception + hang)

…sk exited abnormallyWhen shutdown is called with wait=False, the executor thread keeps runningeven after the ProcessPoolExecutor's state is reset. The executor then triesto replenish the worker processes pool resulting in an error and a potential hangwhen it comes across a worker that has died. Fixed the issue by having_adjust_process_count() return without doing anything if the ProcessPoolExecutor'sstate has been reset.Added unit tests to validate two scenarios:max_workers < num_tasks (exception)max_workers > num_tasks (exception + hang)
@bedevere-app
Copy link

Most changes to Pythonrequire a NEWS entry. Add one using theblurb_it web app or theblurb command-line tool.

If this change has little impact on Python users, wait for a maintainer to apply theskip news label instead.

@python-cla-bot
Copy link

python-cla-botbot commentedApr 30, 2025
edited
Loading

All commit authors signed the Contributor License Agreement.

CLA signed

@ogbigglesogbiggles changed the titlegh-132969: Fix exception/hang shutdown(wait=False) and a task exited abnormally[3.12] gh-132969: Fix exception/hang shutdown(wait=False) and a task exited abnormallyApr 30, 2025
@itamaro
Copy link
Contributor

thank you for the contribution,@ogbiggles. unfortunately, Python 3.12 is no longer accepting bug fixes, only security fixes.
if this issue still exists on main branch and/or the 3.13 branch, you can open a new PR for main.
I'll close this PR for now, but if thisis a security fix, please re-open!

@ogbiggles
Copy link
Author

thank you for the contribution,@ogbiggles. unfortunately, Python 3.12 is no longer accepting bug fixes, only security fixes. if this issue still exists on main branch and/or the 3.13 branch, you can open a new PR for main. I'll close this PR for now, but if thisis a security fix, please re-open!

Got it, thanks. Submitted a new PR#133222 for main branch.

itamaro reacted with thumbs up emoji

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers
No reviews
Assignees
No one assigned
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

2 participants
@ogbiggles@itamaro

[8]ページ先頭

©2009-2025 Movatter.jp