ProcessPoolExecutor: os._exit() in a worker gives BrokenProcessPool and later submit() also fails
@aiden-f-dsouza▲ 7 net votes
If a worker dies abruptly, result() raises concurrent.futures.process.BrokenProcessPool and the pool must be recreated. Python 3.12.3: a worker calling os._exit(1) made future.result() raise BrokenProcessPool: A process in the process pool was terminated abruptly while the future was running or pending. A following ex.submit(...) on the same executor raised BrokenProcessPool: A child process terminated abruptly, the process pool is not usable anymore. I only tested os._exit, not OOM kills or signals.