[H-GEN] Apache segfaulting... how to debug

Michael Anthon michael at anthon.net
Wed Jul 9 11:04:32 EDT 2003


[ Humbug *General* list - semi-serious discussions about Humbug and     ]
[ Unix-related topics. Posts from non-subscribed addresses will vanish. ]

I have a problem with apache.  I am finding a lot of log messages 
indicating that apache child process are segfaulting, e.g.

> [Thu Jul 10 00:12:53 2003] [notice] child pid 22379 exit signal Segmentation fault (11)

I am not getting any reports of problems from the users of the system so 
I'm not currently sure if this is actually causing a problem.  It's 
possible that it is and that the users are just reloading the affected 
page.  The actual cause of the segfault is also eluding me.  I can't 
find anything in particular that triggers it.  It seems to be random but 
relatively regular, on the order of 1% of requests judging by the logs 
since Sunday night.  This is not a new problem, I've noticed it before 
and put it into the "I'll fix that later cause nobody has noticed it" 
basket.

I have just upgraded apache and mod_ssl (using debian testing) and I use 
a custom compiled php4 package (I needed to add OCI8 support)

> ii  apache                         1.3.27.0-1                     Versatile, high-performance HTTP server
> ii  apache-common                  1.3.27.0-1                     Support files for all Apache webservers
> ii  libapache-mod-ssl              2.8.14-3                       Strong cryptography (HTTPS support) for Apache
> ii  php4                           4.2.3-9                        A server-side, HTML-embedded scripting language
> ii  php4-gd                        4.2.3-9                        GD module for php4
> ii  php4-mcrypt                    4.2.3-2                        MCrypt module for php4
> ii  php4-mysql                     4.2.3-9                        MySQL module for php4
> ii  php4-oci8                      4.2.3-9                        Oracel OCI8 module for php4

What I would like to do is to track down the cause of these faults 
(obviously) so that I can fix it or ignore it.  I figured the best place 
to start was to get a core dump from apache and backtrace it... HAH ! 
I'm stuffed if I can get apache to give me a core file.

Used "ulimit -c unlimited" then restarted apache.  Wrote a simple php script

<?php passthru("ulimit -a"); ?>

This tells me that the apache process is running as I'd expected with 
core file size unlimited.  I have set apache's directive 
"CoreDumpDirectory /root/apachecore/" and /root/apachecore/ has mode 777.

Whatever I do I don't seem to be able to get a core dump generated.  Can 
anyone point out what I might be doing wrong please?  Alternatively 
another approach to the problem might also be helpful.

Thanks
Michael


--
* This is list (humbug) general handled by majordomo at lists.humbug.org.au .
* Postings to this list are only accepted from subscribed addresses of
* lists 'general' or 'general-post'.  See http://www.humbug.org.au/



More information about the General mailing list