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

2010-07-10 Thread Reid Kleckner
Reid Kleckner added the comment: I realized that in a later fix for unladen-swallow, we also cleared the condition variable waiters list, since it has radioactive synchronization primitives in it as well. Here's an updated patch that simplifies the fix by just using __init__() to completely

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

2010-07-10 Thread Reid Kleckner
Reid Kleckner 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

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

2009-08-11 Thread Collin Winter
Changes by Collin Winter : -- components: +Interpreter Core nosy: +collinwinter, jyasskin ___ Python tracker ___ ___ Python-bugs-list m

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

2009-08-04 Thread Reid Kleckner
Reid Kleckner added the comment: Here's a patch for 3.2 which adds the fix and a test case. I also verified that the problem exists in 3.1, 2.7, and 2.6 and backported the patch to those versions, but someone should review this one before I upload those. -- keywords: +patch versions: +

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

2009-08-04 Thread Reid Kleckner
New submission from Reid Kleckner : This bug is similar to the importlock deadlock, and it's really part of a larger problem that you should release all locks before you fork. However, we can fix this in the threading module directly by freeing and resetting the locks on the main thread after a