Skip to content

Conversation

@jberg5
Copy link
Contributor

@jberg5 jberg5 commented Oct 1, 2025

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
Copy link

bedevere-app bot commented Oct 1, 2025

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
Copy link

python-cla-bot bot commented Oct 1, 2025

All commit authors signed the Contributor License Agreement.

CLA signed

Copy link
Member

@ZeroIntensity ZeroIntensity left a 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.

@bedevere-app
Copy link

bedevere-app bot commented Oct 2, 2025

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 jberg5 requested a review from AA-Turner as a code owner October 2, 2025 21:39
Copy link
Member

@ZeroIntensity ZeroIntensity left a 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.

@jberg5
Copy link
Contributor Author

jberg5 commented Oct 2, 2025

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
Copy link
Contributor Author

jberg5 commented Oct 2, 2025

Thanks @ZeroIntensity, appreciate all the feedback!

Copy link
Member

@ZeroIntensity ZeroIntensity left a 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.

@ZeroIntensity
Copy link
Member

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

@jberg5
Copy link
Contributor Author

jberg5 commented Oct 6, 2025

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 jberg5 requested a review from gpshead October 8, 2025 20:22
@jberg5
Copy link
Contributor Author

jberg5 commented Oct 14, 2025

@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 gpshead enabled auto-merge (squash) November 11, 2025 21:49
@gpshead gpshead merged commit 9e7340c into python:main Nov 11, 2025
46 checks passed
@jberg5 jberg5 deleted the jb-139462 branch November 11, 2025 22:11
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