GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — gh-139462: Make the ProcessPoolExecutor BrokenProcessPool exception report which child process terminated by jberg5 · Pull Request #139486 · python/cpython

Conversation

@jberg5

@jberg5 jberg5 commented Oct 1, 2025 •
edited by bedevere-app Bot
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

See #139462 for more context.

Short summary: prior to this change, if a child process segfaulted when running in a concurrent.futures.ProcessPoolExecutor, the user would get a BrokenProcessPool exception with no information about which child process terminated or why.

In order to improve the debugging experience, this change attempts to report which child process terminated and with what exit code. For instance, if I have a worker process that segfaults, I'll now see something like:

Lib.concurrent.futures.process._RemoteTraceback: Process 48939 terminated abruptly with exit code -11

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
...
Lib.concurrent.futures.process.BrokenProcessPool: A process in the process pool was terminated abruptly while the future was running or pending.
  • Issue: Hard to debug subprocess crashes when using concurrent.futures.ProcessPoolExecutor #139462

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@jberg5
Report which process terminated as cause of BPE
e9c07b5
@bedevere-app

bedevere-app Bot commented Oct 1, 2025

Copy link
Copy Markdown

Most changes to Python require a NEWS entry. Add one using the blurb_it web app or the blurb command-line tool.

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

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@python-cla-bot

python-cla-bot Bot commented Oct 1, 2025 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown

All commit authors signed the Contributor License Agreement.

CLA signed

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@bedevere-app bedevere-app Bot added the awaiting review label Oct 1, 2025
@bedevere-app bedevere-app Bot mentioned this pull request Oct 1, 2025
Hard to debug subprocess crashes when using concurrent.futures.ProcessPoolExecutor #139462
Closed
@gpshead gpshead self-assigned this Oct 1, 2025
gpshead
gpshead reviewed Oct 1, 2025
View reviewed changes
Comment thread Lib/concurrent/futures/process.py Resolved

Uh oh!

There was an error while loading. Please reload this page.

ZeroIntensity
ZeroIntensity reviewed Oct 1, 2025
View reviewed changes

@ZeroIntensity ZeroIntensity left a comment

Copy link
Copy Markdown
Member

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.

Per the bot, please add a news entry, and please also update the "What's New in Python 3.15" document.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread Lib/concurrent/futures/process.py Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread Lib/test/test_concurrent_futures/test_process_pool.py Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread Lib/test/test_concurrent_futures/test_process_pool.py Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread Lib/test/test_concurrent_futures/test_process_pool.py Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread Lib/test/test_concurrent_futures/test_process_pool.py Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread Lib/test/test_concurrent_futures/test_process_pool.py Resolved

Uh oh!

There was an error while loading. Please reload this page.

@jberg5
PR feedback
0ece422
@bedevere-app

bedevere-app Bot commented Oct 2, 2025

Copy link
Copy Markdown

Most changes to Python require a NEWS entry. Add one using the blurb_it web app or the blurb command-line tool.

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

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

jberg5 added 2 commits October 2, 2025 22:30
@jberg5
Add a NEWS entry
c8fc9de
@jberg5
Add to whats new in python
f81efde
@jberg5
jberg5 requested a review from AA-Turner as a code owner October 2, 2025 21:39
jberg5 added 2 commits October 2, 2025 22:48
@jberg5
merge
c86be73
@jberg5
add back hack to get merge conflict checker to pass
206dfc4
ZeroIntensity
ZeroIntensity reviewed Oct 2, 2025
View reviewed changes

@ZeroIntensity ZeroIntensity left a comment

Copy link
Copy Markdown
Member

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.

Just down to docs nitpicks for me. The rest looks good.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

jberg5 reacted with hooray emoji
All reactions
  • 🎉 1 reaction
Comment thread Doc/whatsnew/3.15.rst Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread Misc/NEWS.d/next/Library/2025-10-02-22-29-00.gh-issue-139462.VZXUHe.rst Resolved

Uh oh!

There was an error while loading. Please reload this page.

@jberg5

jberg5 commented Oct 2, 2025

Copy link
Copy Markdown
Contributor Author

There was a fun issue where the precommit merge conflict checker thought that a perfectly legitimate string was a problem:

check for merge conflicts................................................Failed
Doc/whatsnew/3.15.rst:680: Merge conflict string '=======' found

I removed one of the = and it was happy again :) (and then added it back after)

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@jberg5
PR comments for docs
d80ebf1
@jberg5

jberg5 commented Oct 2, 2025

Copy link
Copy Markdown
Contributor Author

Thanks @ZeroIntensity, appreciate all the feedback!

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

ZeroIntensity
ZeroIntensity approved these changes Oct 2, 2025
View reviewed changes

@ZeroIntensity ZeroIntensity left a comment

Copy link
Copy Markdown
Member

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.

Thanks, this looks good to me. I'll wait for @gpshead as the multiprocessing expert to decide on the weird triple-quotes in the message.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

gpshead reacted with thumbs up emoji jberg5 reacted with heart emoji
All reactions
  • 👍 1 reaction
  • ❤️ 1 reaction
@bedevere-app bedevere-app Bot added awaiting merge and removed awaiting review labels Oct 2, 2025
@ZeroIntensity

ZeroIntensity commented Oct 2, 2025

Copy link
Copy Markdown
Member

Hmm, something seems to be causing the tests to hang.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

ZeroIntensity
ZeroIntensity reviewed Oct 2, 2025
View reviewed changes
Comment thread Lib/test/test_concurrent_futures/test_process_pool.py Resolved

Uh oh!

There was an error while loading. Please reload this page.

@jberg5
Simplify tests slightly and try fresh pool
a5d3266
@jberg5

jberg5 commented Oct 6, 2025

Copy link
Copy Markdown
Contributor Author

Hi @ZeroIntensity and @gpshead! Tests are passing, let me know if there are any other changes you'd like me to make, or if this is good to go.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

YvesDup
YvesDup reviewed Oct 7, 2025
View reviewed changes
Comment thread Lib/concurrent/futures/process.py Resolved

Uh oh!

There was an error while loading. Please reload this page.

@jberg5
better comment
208ea75
@jberg5
jberg5 requested a review from gpshead October 8, 2025 20:22
@jberg5

jberg5 commented Oct 14, 2025

Copy link
Copy Markdown
Contributor Author

@AA-Turner @ZeroIntensity @gpshead thanks for all the feedback thus far! Let me know if there's anything else you'd like me to change here.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@gpshead
Merge branch 'main' into jb-139462
5e04081
@gpshead
gpshead enabled auto-merge (squash) November 11, 2025 21:49
@gpshead
gpshead merged commit 9e7340c into python:main Nov 11, 2025
46 checks passed

Uh oh!

There was an error while loading. Please reload this page.

@bedevere-app bedevere-app Bot removed the awaiting merge label Nov 11, 2025
@jberg5
jberg5 deleted the jb-139462 branch November 11, 2025 22:11
StanFromIreland pushed a commit to StanFromIreland/cpython that referenced this pull request Dec 6, 2025
@jberg5 @StanFromIreland
pythongh-139462: Make the ProcessPoolExecutor BrokenProcessPool excep…
76a1b47
…tion report which child process terminated (pythonGH-139486)

Report which process terminated as cause of BPE
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@ZeroIntensity ZeroIntensity ZeroIntensity approved these changes
@AA-Turner AA-Turner Awaiting requested review from AA-Turner AA-Turner is a code owner
@gpshead gpshead Awaiting requested review from gpshead
+1 more reviewer
@YvesDup YvesDup YvesDup left review comments
Reviewers whose approvals may not affect merge requirements

Uh oh!

There was an error while loading. Please reload this page.

Assignees

@gpshead gpshead

Labels

None yet

Projects

None yet

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.

4 participants

@jberg5 @ZeroIntensity @gpshead @YvesDup
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.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.