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.


Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.
RIP an inspiration; A true Folk's Guy

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

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.