[issue9205] Parent process hanging in multiprocessing if children terminate unexpectedly

Greg Brockman report at bugs.python.org
Fri Jul 16 01:07:52 CEST 2010

Greg Brockman <gdb at ksplice.com> added the comment:

Started looking at your patch.  It seems to behave reasonably, although it still doesn't catch all of the failure cases.  In particular, as you note, crashed jobs won't be noticed until the pool shuts down... but if you make a blocking call such as in the following program, you'll get a hang:
#!/usr/bin/env python
import multiprocessing, os, signal
def foo(x):
  os.kill(os.getpid(), signal.SIGKILL)
multiprocessing.Pool(1).apply(foo, [1])

The tests also occasionally hang in e.g.
test_job_killed_by_signal (__main__.WithProcessesTestPoolSupervisor) ...


Python tracker <report at bugs.python.org>

More information about the Python-bugs-list mailing list