Re: How to get a core dump
[prev]
[thread]
[next]
[Date index for 2004/11/05]
On Fri, Nov 05, 2004 at 01:38:44PM +0100, Marc Gracia wrote:
> So, my question is... There is any way to force apache to dump a
> coredump file? I suppose I'm forgotting something but I really
> desperate...
On Linux, create a directory that is writable by the httpd user
mkdir /var/tmp/apache-cores
chown httpd /var/tmp/apache-cores
chmod 700 /var/tmp/apache-cores
Set the dump directory in httpd.conf:
CoreDumpDirectory /var/tmp/apache-cores
Enable core dumps in your shell and then start Apache
ulimit -c unlimited (for bash; different for csh)
/usr/local/apache/httpd
To test that you can get a dump, start up an httpd process,
send a SIGABRT, SIGBUS, or SIGSEGV to one of the _children_,
and check that it dumped. The error log should indicate
that a possible dump was saved to /var/tmp/apache-cores.
kill -11 <apache_child_pid>
('kill -l' (that's a lowercase letter L) to get a list
of signals and their numbers for your system)
Of course, this will all be a lot more useful to you if you
build Apache with debugging enabled. When building, set
OPTIM=-g before './configure' in the Apache source dir, e.g.
OPTIM=-g ./configure ...
or before 'perl Makefile.PL' in the mod_perl source dir, e.g.
OPTIM=-g perl Makefile.PL ...
depending on how you build Apache and mod_perl.
Cheers,
Glenn
--
Report problems: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html
List etiquette: http://perl.apache.org/maillist/email-etiquette.html
 |
 |
Re: How to get a core dump
Glenn Strauss 16:05 on 05 Nov 2004
|