GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing github.com — ProcessPoolExecutor.shutdown(wait=True) deadlocks when worker exit messages fill the result pipe · Issue #158570 · python/cpython Open Labels stdlibStandard Library Python modules in the Lib/ directoryStandard Library Python modules in the Lib/ directorytopic-multiprocessingtype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error DescriptionBug report
When shutting down, I found this when running LLVM's Reproducer. import concurrent.futures import fcntl import multiprocessing F_SETPIPE_SZ = 1031 def init(barrier): global _barrier _barrier = barrier def work(_): _barrier.wait() # every worker must be running a task at the same time if __name__ == "__main__": n = 400 ex = concurrent.futures.ProcessPoolExecutor( max_workers=n, initializer=init, initargs=(multiprocessing.Barrier(n),)) fcntl.fcntl(ex._result_queue._writer.fileno(), F_SETPIPE_SZ, 4096) list(ex.map(work, range(n))) # all n workers are now alive ex.shutdown(wait=True) # hangs print("done") With Stack of the manager thread while hung (main): Proposed fix: keep draining the result queue while joining the workers in The analysis and reproducer were prepared with help from an AI assistant (Claude). I reviewed and verified them. CPython versions tested on:3.10, 3.12, 3.13, 3.14, CPython main branch Operating systems tested on:Linux Linked PRsActivity
MetadataMetadataAssigneesLabelsstdlibStandard Library Python modules in the Lib/ directoryStandard Library Python modules in the Lib/ directorytopic-multiprocessingtype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error ProjectsMilestoneRelationshipsDevelopmentIssue actions |
| You are visitor 01402503 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |