This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author mikemccand
Date 2004-01-11.14:28:06
SpamBayes Score
Marked as misclassified
We have a Python HTTP server that, in the parent
process, uses os.fork to spawn new children, but at the
same time the parent could be spawning new threads (in
threads other than the main thread -- only the main
thread does forking).

Anwyay, it very rarely causes deadlock in a spawned
child when that child tries to start a new thread.

I believe I've tracked this down to the
_active_limbo_lock in the threading module. 
Specifically, if this lock is held by parent (because
another thread is spawning a thread), just as os.fork
happens, the child inherits the held lock and will then
block trying to do any threading.* operations.

Just like the global interp. lock is overwritten in the
child after fork, I think something similar should
happen to threading._active_limbo_lock?  (And more
generally the user needs to be aware of locks passing
through fork; but I think at least should
"do the right thing").

This thread looks quite relevant:
Date User Action Args
2008-01-20 09:56:41adminlinkissue874900 messages
2008-01-20 09:56:41admincreate