On Sun Apr 05 23:32:09 2009, Alain.Brossard@thomsonreuters.com wrote: > This is a bug report for perl from alain.brossard@reuters.com, > generated with the help of perlbug 1.36 running under perl 5.10.0. > > After about a week of running without problem our monitoring > program dies and leaves as the only clue the following entry in > its log file: > > Size magic not implemented. > > So I started it using the debugger: > == > PERLDB_OPTS="NonStop frame=1 AutoTrace > LineInfo=/Emt/Agents/gpg-monitor/logs/gpg-monitor-perl-trace.$$" > export PERLDB_OPTS > /usr/local/bin/perl -dS /Emt/Agents/gpg-monitor/bin/gpg-monitor.perl > -f > /Emt/Agents/gpg-monitor/config/config.xml -i PROD1 & > == > > The log file (huge) ended with: > == > 218: lock @Results if($useThreads); > 218: lock @Results if($useThreads); > 219: while(my $event = shift @Results) > 220: { > entering threads::shared::tie::SHIFT > == > > Checking how often this code was used before it crashed: > > root%2-emtsuds005[103] grep 'entering threads::shared::tie::SHIFT' > gpg-monitor-perl-trace.2411 | wc -l > 525768 > > I've already found the hard way that modules "threads" and > "WWW::Curl::Easy" > do not mix in Solaris 8 : multiple core dumps per day in different > areas > of > libcurl. This does work better in Solaris 10, no core dumps, and it > survives > for about a week before dying without leaving any messages. > > Is there anything I can do to track this further? > > The code is internal but maybe the following snippets can help? > use strict; > > use Getopt::Std; > use Data::Dumper; > use IO::Socket; > use IO::File; > use Time::HiRes; > use threads; > use threads::shared; > > my @Results : shared; > ... > while (ContinueRun($sleeptime)) > { > my ($start, $stop); > $start = time if($useThreads); > # Refresh variables > &RefreshVars(); > > # Run test clients > foreach my $k (keys(%JOBS)) > { > my $r1 = $JOBS{$k}; > my $r = $$r1; > > $r->{Count} += 1; > if($r->{Count} == $r->{Frequency}) > { > if( $useThreads ) > { > my $t = new threads \&runTest, $r1; > $t->detach; > $r->{Count} = 0; > } > else > { > &runTest($r1); > $r->{Count} = 0; > } > } > } > > { > lock @Results if($useThreads); > while(my $event = shift @Results) > { > my($pid, $status, $displayname, $name, $sev, $msg) = > split(/,/, > $event); > ... > } > if(0 && $ENV{OS} =~ /Win/i) > { > $count +=1; > ... > } > } > sub runTest > { > my ($or, $rqueue) = @_; > my $r = $$or; > my $tstres; > if($r->{Type} == 1) { > if( not $useCurlEasy or $ENV{OS} =~ /^Win/i ) { > $tstres = &runHttpCmdLine($or); > } else { > $tstres = &runHttp($or); > } > } elsif($r->{Type} == 2) { > $tstres = &runTcp($or); > } > { > lock @Results if ($useThreads); > push @Results, $tstres; > } > } > > This ticket has not received a response in nearly three years -- but reviewing it tonight, I can see why. Apart from the fact that the problem occurred on an OS (Solaris) to which I have no access and to ways of building Perl (threads) with which I'm not familiar, we don't have a complete program to run to try to simulate the problem. Some of the module imports (Getopt::Std; Data::Dumper; IO::Socket; IO::File) play no role in the code fragments that follow. Poster: Have you had any better results since the original post? Can you give us a more self-contained program to help in debugging? Thank you very much. Jim Keenan --- via perlbug: queue: perl5 status: new https://rt.perl.org:443/rt3/Ticket/Display.html?id=64484Thread Previous