Apache segmentation fault

General Discussion of atomic repo and development projects.

Ask for help here with anything else not covered by other forums.
User avatar
mikeshinn
Atomicorp Staff - Site Admin
Atomicorp Staff - Site Admin
Posts: 4155
Joined: Thu Feb 07, 2008 7:49 pm
Location: Chantilly, VA

Re: Apache segmentation fault

Unread post by mikeshinn »

Keep in mind that its not the rules that cause segfaults. A segfault means a memory error in apache - something on your box is causing a memory error in apache. Loading a huge set of rules will cause this to show up sooner, but the rules do not cause this. If you are seeing segfaults something else is going on with the box and it does require attention.

I realize the satisfaction of solving the immediate problem by putting less memory load on apache, but if you are getting segfaults you really need to track down exactly whats causing it. So far we've seen caching modules do this, accelerators, even PHP. In one case, we found a buggy PHP app that would kill a server in 30 minutes flat - with or without modsecurity running.
sebas
Forum User
Forum User
Posts: 85
Joined: Thu Feb 12, 2009 8:53 pm
Location: Mexico
Contact:

Re: Apache segmentation fault

Unread post by sebas »

Any idea on how to identify what is causing the segfaults?
CentOS release 6.5 (Final)
Plesk psa-11.5.30-cos6.build115130819.13
ASL 3.2.18-37
Linux 2.6.32-358.11.1.el6.x86_64
User avatar
mikeshinn
Atomicorp Staff - Site Admin
Atomicorp Staff - Site Admin
Posts: 4155
Joined: Thu Feb 07, 2008 7:49 pm
Location: Chantilly, VA

Re: Apache segmentation fault

Unread post by mikeshinn »

One good tool is mod_whatkilledus:

http://people.apache.org/~trawick
hostingguy
Forum Regular
Forum Regular
Posts: 661
Joined: Mon Oct 29, 2007 6:51 pm

Re: Apache segmentation fault

Unread post by hostingguy »

I tried that and it didnt compile for me.

I have httpd-2.2.3-13.el5.art

Code: Select all


# wget http://people.apache.org/~trawick/test_char.h
# wget http://people.apache.org/~trawick/mod_whatkilledus.c

# apxs -ci mod_whatkilledus.c
/usr/lib64/apr-1/build/libtool --silent --mode=compile gcc -prefer-pic -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic  -DLINUX=2 -D_REENTRANT -D_GNU_SOURCE -pthread -I/usr/include/httpd  -I/usr/include/apr-1   -I/usr/include/apr-1   -c -o mod_whatkilledus.lo mod_whatkilledus.c && touch mod_whatkilledus.slo
mod_whatkilledus.c:70:2: error: #error Apache must be built with --enable-exception-hook
mod_whatkilledus.c:191: error: expected ')' before '*' token
mod_whatkilledus.c: In function 'wku_register_hooks':
mod_whatkilledus.c:419: warning: implicit declaration of function 'ap_hook_fatal_exception'
mod_whatkilledus.c:419: error: 'wku_fatal_exception' undeclared (first use in this function)
mod_whatkilledus.c:419: error: (Each undeclared identifier is reported only once
mod_whatkilledus.c:419: error: for each function it appears in.)
apxs:Error: Command failed with rc=65536
Did anyone get it to work using the art httpd package ?
faris
Long Time Forum Regular
Long Time Forum Regular
Posts: 2321
Joined: Thu Dec 09, 2004 11:19 am

Re: Apache segmentation fault

Unread post by faris »

I imagine it is the ...

Code: Select all

#error Apache must be built with --enable-exception-hook
...that's the killer problem, if you'll forgive the pun.

Faris.
--------------------------------
<advert>
If you want to rent a UK-based VPS that comes with friendly advice and support from a fellow ART fan, please get in touch.
</advert>
sebas
Forum User
Forum User
Posts: 85
Joined: Thu Feb 12, 2009 8:53 pm
Location: Mexico
Contact:

Re: Apache segmentation fault

Unread post by sebas »

Ok I have mod_whatkilledus in place lets see what it catches.

Thanks.
CentOS release 6.5 (Final)
Plesk psa-11.5.30-cos6.build115130819.13
ASL 3.2.18-37
Linux 2.6.32-358.11.1.el6.x86_64
Post Reply