locating a segmentation fault

vertangie

Verified User
Joined
Apr 27, 2005
Messages
12
Hi People

I'm getting a ton of segmentation faults with Apache2 and need to find out why.

from the error log:

[Sun Aug 06 14:06:30 2006] [notice] child pid 7951 exit signal Segmentation fault (11)

Here's the details

Running on FreeBSD 5.4-RELEASE (GENERIC)

Server version: Apache/2.0.55
Server built: Nov 14 2005 22:40:25
Server's Module Magic Number: 20020903:11
Architecture: 32-bit
Server compiled with....
-D APACHE_MPM_DIR="server/mpm/prefork"
-D APR_HAS_SENDFILE
-D APR_HAS_MMAP
-D APR_HAVE_IPV6 (IPv4-mapped addresses disabled)
-D APR_USE_FLOCK_SERIALIZE
-D SINGLE_LISTEN_UNSERIALIZED_ACCEPT
-D APR_HAS_OTHER_CHILD
-D AP_HAVE_RELIABLE_PIPED_LOGS
-D HTTPD_ROOT="/etc/httpd"
-D SUEXEC_BIN="/usr/sbin/suexec"
-D DEFAULT_PIDLOG="/var/logs/httpd.pid"
-D DEFAULT_SCOREBOARD="logs/apache_runtime_status"
-D DEFAULT_LOCKFILE="/var/logs/accept.lock"
-D DEFAULT_ERRORLOG="logs/error_log"
-D AP_TYPES_CONFIG_FILE="conf/mime.types"
-D SERVER_CONFIG_FILE="conf/httpd.conf"

I'm also running mod_perl and libapreq
I installed libapreq last night so that I could remove dependency on CGI.pm.
The seg faults have been occuring for months so it's not libapreq that's responsible (or at least it's not only libapreq ;)

Apache/2.0.55 (Unix)
PHP/4.4.0
mod_ssl/2.0.55
OpenSSL/0.9.7e
mod_apreq2-20051231/2.5.7
mod_perl/2.0.2 Perl/v5.8.7

The syslog confirms that it is apache that's having the seg faults:

Aug 6 14:11:08 hq2 kernel: pid 8183 (httpd), uid 1004: exited on signal 11
uid 1004 is Apache

I'm not that experienced with FreeBSD and I have a local server which is OSX which runs the same perl code without any seg faults so my natural instinct to suspect it's my code may be totally wrong. I compiled Apache2 and Mod_perl2 from source myself on my local server but used the DA customapache script to do it on my DA server.

I've found the following guidelines to get my started

http://httpd.apache.org/dev/debugging.html#crashes

This is a production server so I'm really nervous of screwing around with any internals especially as I'm not as confident on FreeBSD as I am on OSX, nor do I know exactly how DA works which is something that makes me less than happy.

Here's my Q's

1. Does this ring any bells with anyone, ie has anyone got any clues for me?
2. Does DA start and stop apache in the normal way ie apachectl stop/start/graceful as I need to do this to get coredumps etc. it also means I'll ne to recompile apache with debugging on to find out what's happening. I did mention this is a production server right?

I had another DA box before and it had the same problems.

I Haven't got a clue where to start looking so I'm at the mercy of docs and google and would appreciate any help I can get. As I said my Apache2/MP2 server running on OSX doesn't have the problems but it doesn't run PHP and doesn't use prefork or suexec.

In fact it's just Apache2/MP2 and libapreq so I'm wondering if PHP could be the problem (PHP is only used for phpmyadmin AFAIK unless DA uses it for something itself... Does it?)

I'll post the outcome for other peoples benefit whether I get any help or not from here.

Thanks very much.

Angie
 
No takers huh...

OK does anyone know if you can get a limited use DA licence so you can run it offline on a local server to try and replicate these problems without having to pay for the priveledge. Seems fair.

I bought a lifetime licence with my ISP so I have no idea if I can even get support from DA. I haven't used any from anyone so far but my ISP isn't going to know how to fix this.
 
I'm not sure how you bought a lifetime license from your ISP.

DirectAdmin does not have resellers. If the license is bought from your ISP, then it's probably a license in their name.

Generally sold licenses come with only limited support.

You can write to DA sales office, and include your UID and LID information, so they can track the license for you and determine if you're entitled to support.

Note, however, that DA doesn't interact with your apache daemon in any way and it's unlikely it's causing the fault.

The fault could be caused by a hardware error, or a file corruption problem. Or some kind of bad input from someone (hacker?) into apache.

If you're not eligible for DA support, or if this is deemed to be outside the scope of DA support (you'll have to ask them), then you can rent a short-term monthly license to help you resolve the issue. However a DA license will only install on a routable static IP.

Jeff
 
Thanks Jeff

It is a licence in the ISP's name so I guess they have the support not me.

I doubt it's a hacker. As it's been going on since as long as I can remember. I can't rule out my perl code but I don't have to problems on OSX where mod_php etc isn't running so I'm going to assume it's something else until I've eliminated them.

Any clues as to what kind of hardware error it could be and how to find out (FreeBSD is the OS) ?

My users all use my system, no one else writes scripts for the server so that helps me a little bit with finding it.

I'm going to start a new thread with regards to disabling PHP if I can so I can eliminate that as I suspect it quite a bit at the stage. and once I've found a mod_perl webmail solution I don't need it. So long as DA doesn't either.

Thanks though. Clues are most appreciated at this time.
 
Back
Top