[issue6643] joining a child that forks can deadlock in the forked child process

Reid Kleckner report at bugs.python.org
Sat Jul 10 21:35:51 CEST 2010


Reid Kleckner <rnk at mit.edu> added the comment:

Here's an updated patch for py3k (3.2).  The test still fails without the fix, and passes with the fix.

Thinking more about this, I'll try summarizing the bug more coherently:

When the main thread joins the child threads, it acquires some locks.  If a fork in a child thread occurs while those locks are held, they remain locked in the child process.  My solution is to do here what we do elsewhere in CPython: abandon radioactive locks and allocate fresh ones.

----------
Added file: http://bugs.python.org/file17932/thread-fork-join.diff

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue6643>
_______________________________________


More information about the Python-bugs-list mailing list