cpython/Lib/multiprocessing
Miss Islington (bot) 2f8c80f531
[3.11] gh-107219: Fix concurrent.futures terminate_broken() (GH-109244) (#109255)
gh-107219: Fix concurrent.futures terminate_broken() (GH-109244)

Fix a race condition in concurrent.futures. When a process in the
process pool was terminated abruptly (while the future was running or
pending), close the connection write end. If the call queue is
blocked on sending bytes to a worker process, closing the connection
write end interrupts the send, so the queue can be closed.

Changes:

* _ExecutorManagerThread.terminate_broken() now closes
  call_queue._writer.
* multiprocessing PipeConnection.close() now interrupts
  WaitForMultipleObjects() in _send_bytes() by cancelling the
  overlapped operation.
(cherry picked from commit a9b1f84790)

Co-authored-by: Victor Stinner <vstinner@python.org>
2023-09-11 08:52:17 +00:00
..
dummy
__init__.py
connection.py [3.11] gh-107219: Fix concurrent.futures terminate_broken() (GH-109244) (#109255) 2023-09-11 08:52:17 +00:00
context.py gh-90549: Fix leak of global named resources using multiprocessing spawn (GH-30617) 2022-06-10 08:04:55 -07:00
forkserver.py [3.11] gh-107963: Fix set_forkserver_preload to check the type of given list (GH-107965) (gh-107976) 2023-08-15 23:53:25 +09:00
heap.py
managers.py gh-91231: Add shutdown_timeout to multiprocessing BaseManager (#32112) 2022-04-19 16:27:00 +02:00
pool.py GH-83658: make multiprocessing.Pool raise an exception if maxtasksperchild is not None or a positive int (GH-93364) (GH-93923) 2022-06-17 23:31:42 +01:00
popen_fork.py
popen_forkserver.py
popen_spawn_posix.py
popen_spawn_win32.py gh-98360: multiprocessing now spawns children on Windows with correct argv[0] in virtual environments (GH-98462) 2022-10-20 07:33:12 -07:00
process.py [3.11] gh-104536: Improve multiprocessing.process._cleanup logic (GH-104537) (#104737) 2023-05-22 12:49:33 +02:00
queues.py bpo-47029: Fix BrokenPipeError in multiprocessing.Queue at garbage collection and explicit close (#31913) 2022-05-03 17:49:57 -06:00
reduction.py
resource_sharer.py
resource_tracker.py gh-96819: multiprocessing.resource_tracker: check if length of pipe write <= 512 (GH-96890) 2022-10-02 18:09:58 -07:00
shared_memory.py [3.11] bpo-40882: Fix a memory leak in SharedMemory on Windows (GH-20684) (#99973) 2022-12-05 13:38:25 +01:00
sharedctypes.py
spawn.py [3.11] More actionable error message when spawn is incorrectly used. (GH-102203) (#107991) 2023-08-16 01:43:28 +00:00
synchronize.py [3.11] gh-108520: Fix bad fork detection in nested multiprocessing use case (GH-108568) (#108692) 2023-08-30 22:36:26 +02:00
util.py gh-82616: Add process_group support to subprocess.Popen (#23930) 2022-05-05 16:22:32 -07:00