[tpm] my perl program seg faults
Indy Singh
indy at indigostar.com
Fri May 4 05:09:22 PDT 2007
You could try running perl under the debugger. Then when the process crashes, run the backtrace command to see where it crashed.
This is untested but I beleive the commands are
gdb perl
run command-line-parameters
bt
You can also attach to a running process with
ps auxw
gdb
attach <pid>
continue
bt
I am not sure if you need a debug build of Perl to see the stack trace. To see the exact source code line where it crashes, you
will need a debug build.
Indy Singh
IndigoSTAR Software -- www.indigostar.com
----- Original Message -----
From: "Sergio Salvi" <sergio.salvi at gmail.com>
To: "Fulko Hew" <fulko.hew at gmail.com>
Cc: <tpm at to.pm.org>
Sent: Thursday, May 03, 2007 9:54 PM
Subject: Re: [tpm] my perl program seg faults
> Do you get a core file when it dies? If not, run "ulimit -c" and
> confirm it's NOT zero so you'll get a core file to help debug it.
>
> On 5/3/07, Fulko Hew <fulko.hew at gmail.com> wrote:
>> I've posted this to PerlMonks, but I thought I'd throw it out to TPM as well...
>>
>> My latest app, is a forking TCP server/client. It runs fine and does
>> its thing. So I put it into a shell loop, and every once in a while I
>> see it die (near or at the end of processing where its exiting) and
>> say:
>>
>> "Segmentation fault"
>>
>> My guess is its happening after my app says exit, and Perl is doing
>> its clean up. But I'd rather never see the error message. ISTR that
>> this isn't the first app of mine that randomly emits this message on
>> shutdown, but this time around its anoying me. How can I find out
>> where/why its dying?
>>
>> B.T.W. perl -v says: "This is perl, v5.8.8 built for i386-linux-thread-multi"
>> _______________________________________________
>> toronto-pm mailing list
>> toronto-pm at pm.org
>> http://mail.pm.org/mailman/listinfo/toronto-pm
>>
> _______________________________________________
> toronto-pm mailing list
> toronto-pm at pm.org
> http://mail.pm.org/mailman/listinfo/toronto-pm
More information about the toronto-pm
mailing list