At 06:31 PM 8/26/02 -0400, Chen, Allen wrote: >I'm not sure this is the right list to be posting this too, but it seems to >be the most appropriate one that I can find. I'm having a problem with the >new ithreads in 5.8. Actually, it sounds similar to the problem mentioned >in the previous thread about the simple program that segfaults when trying >to join 200 trivial threads. > >In my application, I launch off a variable number of threads running the >same subroutine. At some point in the program, I loop through and join all >of these threads. Regardless of the number of threads spawned, the program >segfaults when it gets to the very last thread. I've tried changing the >order by which I join them and I still have the same problem--it doesn't >segfault until I get to the last remaining thread. Here's a dump of the >errors I get: > >Attempt to free non-existent shared string ':p5' during global destruction. >Attempt to free non-existent shared string ':p3' during global destruction. >Attempt to free non-existent shared string ':p1' during global destruction. >Attempt to free non-existent shared string ':p4' during global destruction. >Attempt to free non-existent shared string ':p2' during global destruction. >Unbalanced string table refcount: (1) for "DESTROY" during global >destruction. >Scalars leaked: -11 >Segmentation fault > >Do any of you have any insight on these errors and what I might do to >prevent them? There's very little documentation that I can find on the new >threads, so I'm really at a loss. Any help would be greatly appreciated. > >If this is the wrong list to be posting to, I apologize. If you could point >me to a more appropriate one, I would appreciate that, too.
If you are running on a x86 system, have you tried installing valgrind and running this test through it, preferably with a version of perl that has debugging enabled? Valgrind is an open source memory checker, available from: http://developer.kde.org/~sewardj/ If you can't or don't want to do this, you could send me the code off-list and have me run it to see what is going wrong. Liz