It is very unusual for Perl to "die" without issuing some kind of notification.
Looking back at your original post, I notice that you have use strict twice but no use warnings or -w. If that is still the case, enable warnings. -w or even -W on the shebang line might be a good idea. It just might cause something to get logged.
If that doesn't help, my next suggestion is to use Devel::Trace. ie. prefix the run command with
perl -d:Trace yourscript ... >> lease.log 2>&1 &
Your code will run much more slowly, and your log file will become huge. But, assuming it fails, the log will tell you what was happening when it dies.
This is my modified Trace.pm that adds thread numbers to the trace output and performs locking on STDERR. The latter requires you created a shared semaphore variable in main: our $semSTDERR :shared:
# -*- perl -*- package Devel::Trace; use threads; use threads::shared; use Data::Dump qw[ pp ]; $VERSION = '0.10'; $TRACE = 1; $VARS = 0; # This is the important part. The rest is just fluff. sub DB::DB { local $\; return unless $TRACE; my ($p, $f, $l) = caller; my $code = \@{"::_<$f"}; lock( $::semSTDERR ) if defined $::semSTDERR; printf STDERR ">> [%d] %-30s:%5d: %s", ( threads->self->tid || 'n/a' ), ( $f || 'n/a' ), ( $l || -1 ), ( +$code->[$l] || "???\n" ); return unless $VARS; $code->[$l] =~ s/ ( [\$@%] [#]? \w* ) (?: ( (?:->)? (?: [\[{] [^\]}] ++ [\]}] )+ ) )? / no warnings 'uninitialized'; my $var = (defined $2 ? "$1$2" : $1 ); eval qq[ printf "\$var := %s\n", do{ package $p; $var }; ]; $1 . ( $2 || '' ) /gex; } sub import { my $package = shift; foreach (@_) { if ($_ eq 'trace') { my $caller = caller; *{$caller . '::trace'} = \&{$package . '::trace'}; } else { use Carp; croak "Package $package does not export `$_'; aborting"; } } } my %tracearg = ('on' => 1, 'off' => 0); sub trace { my $arg = shift; $arg = $tracearg{$arg} while exists $tracearg{$arg}; $TRACE = $arg; } 1;
The chances are that if this isn't environmental--process limits or the like--then it is probably a bug long since fixed. I can only emphasis again how much better it would be if you would upgrade your Perl. Not doing so leaves you vulnerable to 6 years of bugs already fixed with no where to go.
In reply to Re: Coroner not helping - Perl5.8.4,threadsv1.03 and the case of myterious deaths
by BrowserUk
in thread Coroner not helping - Perl5.8.4,threadsv1.03 and the case of myterious deaths
by MonkeyMonk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |