GrandAdmiral

Active Member
May 21, 2014
28
0
51
cPanel Access Level
Root Administrator
Hi

I'm trying to debug a segmentation fault in Apache but I'm unable to get it to generate a coredump for analysis. I have followed the steps here
/http://sysadmin.carlusgg.com/?p=197 and here
/https://passwd.org/2012/03/apache-httpd-core-dump-instructions but still no luck

This is on CentOS 6.5 with mod_ruid2
 

GrandAdmiral

Active Member
May 21, 2014
28
0
51
cPanel Access Level
Root Administrator
Don't have an answer to your specific question, but if you recently updated to Apache 2.4.12, you segmentation faults may be due to the issue discussed in this thread:

http://forums.cpanel.net/f442/easyapache-3-28-3-released-451721.html
Definitely could be it, its fairly rare and I haven't had any complaints from clients.

Given that coredumps are a valuable diagnostic tool I'd still greatly appreciate it if someone has instructions for activating them.
 

JacobPerkins

Well-Known Member
May 2, 2014
617
97
103
cPanel Access Level
DataCenter Provider
Twitter
Good morning,

There's a few things needed to get Apache to core dump properly:
Add this to httpd.conf:
Code:
 CoreDumpDirectory /tmp/mycoredump
Create this directory, make it owned by nobody and 777 permissions (both might not be required, I just did this to ensure it worked).
Code:
mkdir -p /tmp/mycoredump && chown nobody. /tmp/mycoredump && chmod 777 /tmp/mycoredump
After doing that, and ensuring that you have unlimited core dump file sizes (
Code:
 ulimit -c unlimited
), restart Apache and it should core dump for you.

I hope this helps!
 

GrandAdmiral

Active Member
May 21, 2014
28
0
51
cPanel Access Level
Root Administrator
Just not being created. Sample from error_log

[Tue Feb 24 10:18:14.811014 2015] [core:notice] [pid 16437] AH00052: child pid 20273 exit signal Segmentation fault (11)
[Tue Feb 24 10:18:14.811096 2015] [core:notice] [pid 16437] AH00052: child pid 22189 exit signal Segmentation fault (11)
[Tue Feb 24 10:18:14.811123 2015] [core:notice] [pid 16437] AH00052: child pid 22897 exit signal Segmentation fault (11)
[Tue Feb 24 10:18:14.811146 2015] [core:notice] [pid 16437] AH00052: child pid 23622 exit signal Segmentation fault (11)