Skip to content
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

[3.13] gh-125451: Fix deadlock in ProcessPoolExecutor shutdown (GH-125492) #125598

Merged
merged 1 commit into from
Oct 16, 2024

Commits on Oct 16, 2024

  1. pythongh-125451: Fix deadlock in ProcessPoolExecutor shutdown (python…

    …GH-125492)
    
    There was a deadlock when `ProcessPoolExecutor` shuts down at the same
    time that a queueing thread handles an error processing a task.
    
    Don't use `_shutdown_lock` to protect the `_ThreadWakeup` pipes -- use
    an internal lock instead. This fixes the ordering deadlock where the
    `ExecutorManagerThread` holds the `_shutdown_lock` and joins the
    queueing thread, while the queueing thread is attempting to acquire the
    `_shutdown_lock` while closing the `_ThreadWakeup`.
    (cherry picked from commit 760872e)
    
    Co-authored-by: Sam Gross <[email protected]>
    colesbury authored and miss-islington committed Oct 16, 2024
    Configuration menu
    Copy the full SHA
    aa2d81b View commit details
    Browse the repository at this point in the history