I have this in my apace error.log:
[Fri Sep 18 08:10:54 2009] [notice] child pid 9178 exit signal Segmentation fault (11)
[Fri Sep 18 08:11:41 2009] [notice] child pid 9187 exit signal Segmentation fault (11)
[Fri Sep 18 08:12:12 2009] [notice] child pid 9204 exit signal Segmentation fault (11)
[Fri Sep 18 08:12:13 2009] [notice] child pid 9202 exit signal Segmentation fault (11)
[Fri Sep 18 08:14:45 2009] [notice] child pid 9251 exit signal Segmentation fault (11)
It started the same day I made an addition to the vhost.conf file. So I reverted back to the original file did a apache2ctl restart. Unfortunately it's still occurring.
Apache seems to be serving pages OK.
Any ideas?
Cheers,
Nathan.
Sig11's usually only occur for one of two reasons:
Bad programs.
In the case of Apache it's statistically unlikely to be a bug in the core Apache code.
It's much more common to be a fault of a module. Either in the way that a module safely deals with exceptions in the code or libraries that it's processing. Or the way in which it interacts with Apache's chosen MPM model. When a module misbehaves in this way it exits uncontrollably before returning data to the Apache child process and thus produces the segfault.
Review all of the changes that you've made since it last worked. Like Lee B says, this is the perfect example for using version control.
To complicate matters slightly, you can often produce the same behaviour by issuing a
graceful
instead of a full restart after making changes to Apache's module setup. You can rule this out by stopping and starting Apache.Bad hardware.
If you're sure that the errors coincide with your configuration change and you're not seeing any other ill-effects on the system then you can probably rule this out. But it may be worth baring in mind if you run out of other avenues. CPUs and RAM are the typical culprits.
Nathan, try stopping Apache, and starting it up in the forground (debug, non-threaded), that may leak more clues regarding what is making it segfault.
Having said that, it should not segfault regardless, so it's a bug, nevertheless, it may be something you can fix if you know what's causing it.
Also (unlikely to reveal the whole reason for this problem), any warnings/errors from...
...?
Finally, are all the modules you've loaded into Apache "Certified", maybe you can comment about half of them out and see if the problem disappears or not, and carry on with a divide-and-conquer binary search from there.
You might also look for any core dumps produced from the segfault, perhaps in /tmp? If you do find some, try running it through gdb...
Finally got this fixed. A simple restart of the server stopped the seg faults.
Thanks for your answers. I'm sure there coming in useful for diagnosing future problems.
Nathan.
I suppose it could be a module loaded having a problem.
I experienced the same behavior with PHP and gettext php extension, it was crashing PHP and therefore the apache's child serving the request.
After spending hours trying to figure out the cause of my own segmentation fault error I started randomly disabling things. In my case the cause of the error was Zend's eaccelerator.
Since I don't need this extension I am leaving it disabled. If you are having the same problem and need this extension you could try deleting the eaccelerator cache and restarting httpd.
next time you can try to use strace or truss