diff options
author | Sam Gross <colesbury@gmail.com> | 2024-10-16 15:39:17 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-10-16 15:39:17 (GMT) |
commit | 760872efecb95017db8e38a8eda614bf23d2a22c (patch) | |
tree | e6c2e1e9b9cf59074bdf95a1d04481d5faf3d109 /Misc/NEWS.d | |
parent | d83fcf8371f2f33c7797bc8f5423a8bca8c46e5c (diff) | |
download | cpython-760872efecb95017db8e38a8eda614bf23d2a22c.zip cpython-760872efecb95017db8e38a8eda614bf23d2a22c.tar.gz cpython-760872efecb95017db8e38a8eda614bf23d2a22c.tar.bz2 |
gh-125451: Fix deadlock in ProcessPoolExecutor shutdown (#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`.
Diffstat (limited to 'Misc/NEWS.d')
-rw-r--r-- | Misc/NEWS.d/next/Library/2024-10-14-17-29-34.gh-issue-125451.fmP3T9.rst | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/Misc/NEWS.d/next/Library/2024-10-14-17-29-34.gh-issue-125451.fmP3T9.rst b/Misc/NEWS.d/next/Library/2024-10-14-17-29-34.gh-issue-125451.fmP3T9.rst new file mode 100644 index 0000000..589988d --- /dev/null +++ b/Misc/NEWS.d/next/Library/2024-10-14-17-29-34.gh-issue-125451.fmP3T9.rst @@ -0,0 +1,2 @@ +Fix deadlock when :class:`concurrent.futures.ProcessPoolExecutor` shuts down +concurrently with an error when feeding a job to a worker process. |