Re: How to get a core dump

[prev] [thread] [next] [Date index for 2004/11/05]

From: Glenn Strauss
Subject: Re: How to get a core dump
Date: 16:05 on 05 Nov 2004
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

How to get a core dump
Marc Gracia 12:38 on 05 Nov 2004

Re: How to get a core dump
Stas Bekman 15:58 on 05 Nov 2004

Re: How to get a core dump
Glenn Strauss 16:05 on 05 Nov 2004

Re: How to get a core dump
Marc Gracia 16:46 on 05 Nov 2004

Re: How to get a core dump
Marc Gracia 11:51 on 08 Nov 2004

Re: How to get a core dump
Marc Gracia 14:35 on 08 Nov 2004

Re: How to get a core dump
Marc Gracia 14:39 on 08 Nov 2004

Re: How to get a core dump
David Hodgkinson 14:48 on 08 Nov 2004

Re: How to get a core dump
Marc Gracia 14:58 on 08 Nov 2004

Re: How to get a core dump
Stas Bekman 22:53 on 08 Nov 2004

Generated at 11:26 on 21 Dec 2004 by mariachi v0.52