Author neologix
Recipients bobbyi, gregory.p.smith, neologix, nirai, pitrou, sdaoden, vstinner
Date 2011-05-15.19:39:53
SpamBayes Score 4.13009e-12
Marked as misclassified No
Message-id <1305488396.46.0.602295464999.issue6721@psf.upfronthosting.co.za>
In-reply-to
Content
> Is it possible the following issue is related to this one?

It's hard to tell, the original report is rather vague.
But the comment about the usage of the maxtasksperchild argument reminds me of issue #10332 "Multiprocessing maxtasksperchild results in hang": basically, there's a race window in the Pool shutdown code where worker threads having completed their work can exit without being replaced.
So the connection with the current issue does not strike me, but you never know (that's the problem with those nasty race conditions ;-).

Concerning this issue, here's an updated patch.
I removed calls to pthread_mutex_destroy/pthread_condition_destroy/sem_destroy from the reinit functions: the reason is that I experienced a deadlock in test_concurrent_futures with the emulated semaphore code on Linux/NPTL inside pthread_condition_destroy: the new version strictly mimics what's done in glibc's malloc, and just calls pthrad_mutex_init and friends. It's safe, and shouldn't leak resources (and even if it does, it's way better than a deadlock).
I also placed the note on the interaction between locks and fork() at the top of Python/thread_pthread.h.
History
Date User Action Args
2011-05-15 19:39:57neologixsetrecipients: + neologix, gregory.p.smith, pitrou, vstinner, nirai, bobbyi, sdaoden
2011-05-15 19:39:56neologixsetmessageid: <1305488396.46.0.602295464999.issue6721@psf.upfronthosting.co.za>
2011-05-15 19:39:55neologixlinkissue6721 messages
2011-05-15 19:39:55neologixcreate