Linux / apache web-server segmentation fault warnings

12,443

Solution 1

Have observed "exit signal Segmentation fault (11)" error lot of times. This happens when some scripts dont complete while apache crashes.

If you are using PHP based website on apache this is very likely to happen.

If at all you are using PHP, check following config in php config in conf.d/php.conf:

<Files *.php>
    SetOutputFilter PHP
    SetInputFilter PHP
    LimitRequestBody 524288
</Files>

Remove the LimitRequestBody line. and observe. The error should go away.

Also if you are using apache with php following versions work perfectly. apache 2.0.43 and php 4.3.0_RC1

Note: This answer is purely based on my past research on the error and issue faced by me. Let me know your current configuration and feedback.

Solution 2

OKay, a segmentation fault is an indication of a program bug; it's not a matter of having too little memory. It occurs when a program tries to access memory it's not allowed to access.

If it's happening in Apache, you need to enable core dumps and restart the httpd process. There's a guide to doing this in the Apache documentation.

Solution 3

What can be causing these errors?

One thing that would be helpful in diagnosing the issue is if you try and find what pages/resources are being viewed when this error happens. If you are able check your access log to see what is happening at the same time the segfault happens.

It is possible that some php script or something else is doing something that is causing the crash. Once you figure out what page/file is causing the crash, then you can dig into figuring out what it is doing, or if there are an bug fixes available.

Solution 4

Do you have the right mod_whatever downloaded? I had a similar situation where I downloaded mod_jk for Solaris, but the Apache I was running was included from Sun, and was not compiled with gcc, but with their compiler. I had to download mod\jk source and compile with the Sun compiler.

It's a shot in the dark, I know, but since no answer is marked as chosen, I thought I'd throw it out there.

Solution 5

Have you updated apache or any of its modules lately? I've seen this issue when you have a mod which was built against a different interface version (expat in my case) I think. If you can narrow it down to a few pieces of software, check all the version info for this. See http://www.dscpl.com.au/wiki/ModPython/Articles/ExpatCausingApacheCrash

Share:
12,443
jeroen
Author by

jeroen

A Dutch guy who lived a long time in Cusco, Peru since 1998. Via Fuengirola, Spain, I have moved back to Holland where I am now living and working. My activities range from web-site design and development to travelling through Argentina, Chile, Bolivia and Peru as a tour guide. http://www.jeronimodesign.com/ http://careers.stackoverflow.com/jeroen https://bitbucket.org/jeroen_de_bruin

Updated on September 17, 2022

Comments

  • jeroen
    jeroen over 1 year

    Lately I have been receiving a lot of segmentation fault warnings on my web-server.

    The warnings look like:

    [notice] child pid xxxx exit signal Segmentation fault (11)
    

    I have consulted with the server provider (it is a dedicated redhat enterprise server) and they could not find anything.

    What I have done so far:

    Since the error I have already tried the following:

    • I have added more ram
    • I have turned off / turned on several php modules (they sent me to a web-page someone had the same problem, caused by an excessive amount of php modules)

    At the moments the warnings occur, there seems to be plenty of free ram left and the number of processes is very low (the number of httpd processes is about a quarter of the maximum allowed).

    What can be causing these errors?

    Edit: current versions

    • apache: 2.0.52
    • php: 5.2.8
    • RHEL 4

    Edit 2: Although I asked this a long time ago, I never was able to solve it until I upgraded to php 5.3.

  • jeroen
    jeroen almost 15 years
    Thanks, I have not updated anything myself, but I will look into the expat thing.
  • jeroen
    jeroen almost 15 years
    Thanks for your response. I have once myself noticed a page not loading / disconnection while opening a page heavy with php, so I will be checking that first (also I'm a bit nervous fiddling with the apache configuration as that will affect all of my sites...).
  • Viky
    Viky almost 15 years
    Checked the versions of php. The bug was mentioned with PHP 5. thats your current version. presuming thats the cause. can you revert to php RC4 and check if the error goes( only if you can ). If you do some googling on php forums you should see this error. am sorry, I am a new user to serverfault and hence it is not letting me paste links for referrance which I used.
  • Viky
    Viky almost 15 years
    @jeroen. any luck? did you try downgrading the php version?
  • jeroen
    jeroen over 13 years
    Thanks, the problem is that it is on a production machine and the I only get the error every once in a while, opening exactly the same pages.
  • jeroen
    jeroen almost 12 years
    Upgrading is what did it in the end...