I write a simple perl thread program recently to do stimulating the users joining the calls. The problem is that it failed to close the thread properly and lead to Out of memory and segmentation fault.

Need help to find the possible solution to fix this problem

Here is the sample code:

use threads;

sub cts_alljoin () {

print "Use the thread to run each function\n"; $test = @ip_address;

for ($i=0; $i<=$test; $i++) {

my $thr = threads->new(\&cts_alljoin_test, @ip_address); }

#threads->('SIGUSR1'); threads->exit();

}

The result I am getting:

I search for CPAN, but it does not have this specific lab. What am I missing here? Any solution