Skip to content

[3.10] gh-90622: Do not spawn ProcessPool workers on demand via the "fork" spawn method (GH-91598) #92497

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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 8, 2022

Conversation

gpshead
Copy link
Member

@gpshead gpshead commented May 8, 2022

Do not spawn ProcessPool workers on demand when they spawn via fork.

This avoids potential deadlocks in the child processes due to forking from
a multithreaded process..
(cherry picked from commit ebb37fc)

Co-authored-by: Gregory P. Smith [email protected]

… fork method. (pythonGH-91598)

Do not spawn ProcessPool workers on demand when they spawn via fork.

This avoids potential deadlocks in the child processes due to forking from
a multithreaded process..
(cherry picked from commit ebb37fc)

Co-authored-by: Gregory P. Smith <[email protected]>
@gpshead gpshead added type-bug An unexpected behavior, bug, or error needs backport to 3.9 only security fixes labels May 8, 2022
@gpshead gpshead merged commit b795376 into python:3.10 May 8, 2022
@miss-islington
Copy link
Contributor

Thanks @gpshead for the PR 🌮🎉.. I'm working now to backport this PR to: 3.9.
🐍🍒⛏🤖

@gpshead gpshead deleted the backport-ebb37fc-3.10 branch May 8, 2022 17:12
miss-islington pushed a commit to miss-islington/cpython that referenced this pull request May 8, 2022
… fork method. (pythonGH-91598) (pythonGH-92497)

Do not spawn ProcessPool workers on demand when they spawn via fork.

This avoids potential deadlocks in the child processes due to forking from
a multithreaded process..
(cherry picked from commit ebb37fc)

Co-authored-by: Gregory P. Smith <[email protected]>
(cherry picked from commit b795376)

Co-authored-by: Gregory P. Smith <[email protected]>
@bedevere-bot bedevere-bot removed the needs backport to 3.9 only security fixes label May 8, 2022
@bedevere-bot
Copy link

GH-92499 is a backport of this pull request to the 3.9 branch.

gpshead added a commit that referenced this pull request May 8, 2022
…method. (GH-91598) (GH-92497) (#92499)

Do not spawn ProcessPool workers on demand when they spawn via fork.

This avoids potential deadlocks in the child processes due to forking from
a multithreaded process..
(cherry picked from commit ebb37fc)

Co-authored-by: Gregory P. Smith <[email protected]>
(cherry picked from commit b795376)

Co-authored-by: Gregory P. Smith <[email protected]>

Co-authored-by: Gregory P. Smith <[email protected]>
hello-adam pushed a commit to hello-adam/cpython that referenced this pull request Jun 2, 2022
… fork method. (pythonGH-91598) (pythonGH-92497) (python#92499)

Do not spawn ProcessPool workers on demand when they spawn via fork.

This avoids potential deadlocks in the child processes due to forking from
a multithreaded process..
(cherry picked from commit ebb37fc)

Co-authored-by: Gregory P. Smith <[email protected]>
(cherry picked from commit b795376)

Co-authored-by: Gregory P. Smith <[email protected]>

Co-authored-by: Gregory P. Smith <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type-bug An unexpected behavior, bug, or error
Projects
None yet
Development

Successfully merging this pull request may close these issues.

concurrent.futures.ProcessPoolExecutor can deadlock when tcmalloc is used
3 participants