We have code that catches the exception, writes the message, and then calls Carp::longmess to get the stack.
Thus, a simplified view of what we are doing is:
eval { <some SOAP::Lite stuff> }; if( my $err = $@ ) { logwrite( "Caught Error: $err" ); }
The logwrite function is essentially:
sub logwrite($) { my $msg = $_[0]; my($pkg,$fil,$lin)=caller; my $timestamp = POSIX::strftime(...); print STDERR "$timestamp $fil/$lin $msg\n"; print STDERR "$timestamp $fil/$lin Stack trace:\n" . Carp::longmess . "\n"; }
But in the log I see:
20111030 Module.pm/42 Caught Error: at line Use of uninitialized value in caller at /usr/lib/perl5/5.8.8/Carp/Heavy.pm line 22. Use of uninitialized value in string eq at /usr/lib/perl5/5.8.8/Carp/Heavy.pm line 91. Use of uninitialized value in numeric lt (<) at /usr/lib/perl5/5.8.8/Carp/Heavy.pm line 200. Use of uninitialized value in pattern match (m//) at /usr/lib/perl5/5.8.8/Carp/Heavy.pm line 55. Use of uninitialized value in concatenation (.) or string at /usr/lib/perl5/5.8.8/Carp/Heavy.pm line 55. Use of uninitialized value in concatenation (.) or string at /usr/lib/perl5/5.8.8/Carp/Heavy.pm line 142. Use of uninitialized value in concatenation (.) or string at /usr/lib/perl5/5.8.8/Carp/Heavy.pm line 142. Use of uninitialized value in concatenation (.) or string at /usr/lib/perl5/5.8.8/Carp/Heavy.pm line 142. Use of uninitialized value in concatenation (.) or string at /usr/lib/perl5/5.8.8/Carp/Heavy.pm line 142. ...
And this sequence of warnings from the Carp/Heavy.pm repeated over and over indefinitely, blowing out the login. Therefore, we end up killing him. These warnings remind you that they are called by calling Carp::longmess . Another interesting thing here is the $@ variable, which looks like at . It is like at added by die, but no actual error message or line number.
Has anyone seen this before or have any idea what is going on with the Carp package? This is rare, but several months have passed several dozen times, and we have hundreds of tasks that work every day.
source share