![]() |
Practical mod_perl / HTML Version / | ![]() |
||
![]() |
||||
![]() |
![]() |
|||
![]() |
![]() |
|||
![]() |
||||
|
|
||||
![]() |
![]() |
|||
![]() |
23.1.1. Getting the Backtrace from Core Dumps |
![]() |
||
![]() |
||||
![]() |
![]() |
![]() |
||
![]() |
||||
If you get a core dump (segmentation fault), send a backtrace if possible. Before you try to produce it, rebuild mod_perl with:
panic% perl Makefile.PL PERL_DEBUG=1
which will:
Add -g to EXTRA_CFLAGS
Turn on PERL_TRACE
Set PERL_DESTRUCT_LEVEL=2 (additional checks during Perl cleanup)
Link against libperld, if it exists
You can read a full explanation in Chapter 21, but here is a summary of how to get a backtrace:
panic% cd mod_perl-1.xx panic% gdb ../apache_1.3.xx/src/httpd (gdb) run -X -f `pwd`/t/conf/httpd.conf -d `pwd`/t [now make request that causes core dump] (gdb) bt
In English: cd to the mod_perl source directory and start gdb with a path to the httpd binary, which is located in the Apache source tree. (Of course, replace x with real version numbers.) Next, start the httpd process from within gdb and issue a request that causes a core dump. When the code has died with the SIGSEGVsignal, run bt to get the backtrace.
Alternatively, you can also attach to an already running process like so:
panic% gdb httpd <process id number>
If the dump is happening in libperl, you have to rebuild Perl with -DDEBUGGING enabled during the ./Configure stage. A quick way to this is to go to your Perl source tree and run these commands:
panic% rm *.[oa]
panic% make LIBPERL=libperld.a
panic% cp libperld.a $Config{archlibexp}/CORE
where $Config{archlibexp} is:
% perl -V:archlibexp
 
Continue to:
mod_perl, modperl, Apache, perl, cgi, html, mod_perl, e-commerce, scalability, free, open source, OSS, apache, squid, high availability, modperl, linux, unix, Web, www, mod_perl, webserver, admin, apache, book, webmaster, tools, modperl, guide, docs, documentation, help, mod_perl, perl, information, apache, script, errata, eric cholet, perl, apache, mod-perl, stas bekman, mod_perl, cool, perl, Apache, performance, speed, choice
![]() |
Other projects to check out: meta-religion.com is for those interested in Religious, Spiritual and Esoteric Phenomena. i-want-a-better.com is a community of people discussing what they would like to be improved in their lives and things they use and interact with. You may also want to find a healer in your area or read articles on variety of topics.