FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

gh-139462: Make the ProcessPoolExecutor BrokenProcessPool exception report which child process terminated by jberg5 · Pull Request #139486 · python/cpython · GitHub

Repository navigation

gh-139462: Make the ProcessPoolExecutor BrokenProcessPool exception report which child process terminated - #139486

Merged
gpshead merged 10 commits into
python:mainfrom
jberg5:jb-139462
Nov 11, 2025
Merged

gpshead merged 10 commits into
python:mainfrom
jberg5:jb-139462

Conversation

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

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.

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.

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

Copy link
Copy Markdown

All commit authors signed the Contributor License Agreement.

Comment thread Lib/concurrent/futures/process.py Outdated

ZeroIntensity left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

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

Comment thread Lib/concurrent/futures/process.py Outdated

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.

jberg5 requested a review from AA-Turner as a code owner October 2, 2025 21:39

ZeroIntensity left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

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

Comment thread Doc/whatsnew/3.15.rst Outdated

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)

jberg5 commented Oct 2, 2025

Copy link
Copy Markdown
Contributor Author

Thanks @ZeroIntensity, appreciate all the feedback!

ZeroIntensity left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

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.

Copy link
Copy Markdown
Member

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

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.

jberg5 requested a review from gpshead October 8, 2025 20:22

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.

gpshead enabled auto-merge (squash) November 11, 2025 21:49
gpshead merged commit 9e7340c into python:main Nov 11, 2025
46 checks passed
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
…tion report which child process terminated (pythonGH-139486)

Report which process terminated as cause of BPE
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
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


Back | FazBrowse Home | New Git URL