Click here to get back home

segfault in perl

 HomeNewsGroups | Search | About
 comp.lang.perl.misc    Post an article   get this group's latest topics as an RSS feed add this group's latest topics to your My MSN content add this group's latest topics to your My Yahoo content
Subject Author Date
segfault in perl Mike 03-19-2008
---> Re: segfault in perl Joost Diepenmaa...03-19-2008
Posted by Mike on March 19, 2008, 11:26 am
Please log in for more thread options
I am testing a program that is not yet in production that after a
while the program will segfault. There is no core left behind when
the segfault happens. How can I get a core from the segfault or is
there another way to diagnose the situation?

Mike

Fedora Core 5
perl 5.8.8

--
Posted via a free Usenet account from http://www.teranews.com


Posted by Mike on March 19, 2008, 12:12 pm
Please log in for more thread options
> <snip>
> strace the process and
> see what is happening just before the seg fault. Or maybe something like
> <snip>

Oh, strace(8) is a really good idea, thanks.

Mike

--
Posted via a free Usenet account from http://www.teranews.com


Posted by Joost Diepenmaat on March 19, 2008, 12:45 pm
Please log in for more thread options

> I am testing a program that is not yet in production that after a
> while the program will segfault. There is no core left behind when
> the segfault happens. How can I get a core from the segfault

Assuming you're using bash or something similar to start the program,
type "help ulimit" and set the max core size to something larger than 0.

> or is
> there another way to diagnose the situation?

I like valgrind. http://valgrind.org/

example: valgrind myprogram.pl

Cheers,
Joost.

--
Joost Diepenmaat | blog: http://joost.zeekat.nl/ | work: http://zeekat.nl/

Posted by Mike on March 19, 2008, 12:09 pm
Please log in for more thread options
>
>> I am testing a program that is not yet in production that after a
>> while the program will segfault. There is no core left behind when
>> the segfault happens. How can I get a core from the segfault
>
> Assuming you're using bash or something similar to start the program,
> type "help ulimit" and set the max core size to something larger than 0.
>
>> or is
>> there another way to diagnose the situation?
>
> I like valgrind. http://valgrind.org/
>
> example: valgrind myprogram.pl
>
> Cheers,
> Joost.
>

I didn't think about ulimit, thanks.
I'm running as a non-root user. I'll reset the core size and see what happens.

Mike

[recvmail@viper ~]$ ulimit
unlimited
[recvmail@viper ~]$ ulimit -a
core file size (blocks, -c) 0
data seg size (kbytes, -d) unlimited
max nice (-e) 0
file size (blocks, -f) unlimited
pending signals (-i) 16380
max locked memory (kbytes, -l) 32
max memory size (kbytes, -m) unlimited
open files (-n) 1024
pipe size (512 bytes, -p) 8
POSIX message queues (bytes, -q) 819200
max rt priority (-r) 0
stack size (kbytes, -s) 10240
cpu time (seconds, -t) unlimited
max user processes (-u) 16380
virtual memory (kbytes, -v) unlimited
file locks (-x) unlimited
[recvmail@viper ~]$


--
Posted via a free Usenet account from http://www.teranews.com


Similar ThreadsPosted
XML::Twig segfault on solaris July 18, 2007, 5:50 am
XML::Twig segfault on solaris (again) January 25, 2008, 10:38 am
PERL to mean what 'perldoc perl' says is wrong? (was: Re: perl should be improved and perl6) April 14, 2008, 11:37 pm
FAQ 3.0: What is perl.com? Perl Mongers? pm.org? perl.org? cpan.org? October 31, 2004, 12:03 pm
FAQ 3.0 What is perl.com? Perl Mongers? pm.org? perl.org? cpan.org? February 2, 2005, 12:03 pm
FAQ 2.18 What is perl.com? Perl Mongers? pm.org? perl.org? cpan.org? March 28, 2005, 12:03 am
FAQ 2.18 What is perl.com? Perl Mongers? pm.org? perl.org? cpan.org? June 12, 2005, 11:03 am
FAQ 2.18 What is perl.com? Perl Mongers? pm.org? perl.org? cpan.org? August 29, 2005, 10:03 pm
FAQ 2.18 What is perl.com? Perl Mongers? pm.org? perl.org? cpan.org? October 28, 2005, 10:03 pm
FAQ 2.18 What is perl.com? Perl Mongers? pm.org? perl.org? cpan.org? December 25, 2005, 5:03 am

Our other projects:

Art Dolls, Fairies and Mermaids - Sunnyfaces.net

Roy's Linux, Programming and Search Engines messages

1-Script XML SitemapXML Sitemap