Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

Re^2: problems with fork from thread

by Eliya (Vicar)
on Mar 01, 2012 at 21:04 UTC ( [id://957316]=note: print w/replies, xml ) Need Help??


in reply to Re: problems with fork from thread
in thread problems with fork from thread

I don't think this would help, because (according to my tests) it's the child processes that hang in a FUTEX_WAIT (as nothing seems to be calling FUTEX_WAKE again any more):

7160 futex(0x808248, FUTEX_WAIT_PRIVATE, 2, NULL <unfinished ...> 7162 futex(0x808248, FUTEX_WAIT_PRIVATE, 2, NULL <unfinished ...> 7164 futex(0x808248, FUTEX_WAIT_PRIVATE, 2, NULL <unfinished ...> ...

(filtered strace output)

Also, the results vary structurally (not only quantitatively) with the number of threads started, whether you run the script under strace, etc., so I suspect it's some race condition issue.  In other words, a varying number of children simply don't terminate, so there are no corresponding SIGCHLD signals.

Unfortunately, I don't know enough about Perl's thread implementation to be of any real help here...

So, until someone more knowledgable in the area has found sufficient motivation and time to tackle those issues, I'd stick with the common recommendation to stay away from mixing threads with fork.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://957316]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others browsing the Monastery: (5)
As of 2024-04-24 03:34 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found