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.
|