Skip to content

Commit

Permalink
Reference GH issue 94777.
Browse files Browse the repository at this point in the history
  • Loading branch information
lpaulot committed Jul 10, 2023
1 parent 11c9c80 commit 2794188
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions Lib/concurrent/futures/process.py
Original file line number Diff line number Diff line change
Expand Up @@ -500,6 +500,7 @@ def terminate_broken(self, cause):
p.terminate()

# Prevent queue writing to a pipe which is no longer read.
# https://github.com/python/cpython/issues/94777
self.call_queue._reader.close()

# clean up resources
Expand Down
4 changes: 4 additions & 0 deletions Lib/test/test_concurrent_futures.py
Original file line number Diff line number Diff line change
Expand Up @@ -1377,6 +1377,10 @@ def test_shutdown_deadlock_pickle(self):
executor_manager.join()

def test_crash_big_data(self):
# Test that there is a clean exception instad of a deadlock when a
# child process crashes while some data is being written into the
# queue.
# https://github.com/python/cpython/issues/94777
self.executor.shutdown(wait=True)
data = "a" * support.PIPE_MAX_SIZE
with self.executor_type(max_workers=2,
Expand Down

0 comments on commit 2794188

Please sign in to comment.