Segmentation fault 11 on Apache

wattie

Verified User
Joined
May 31, 2008
Messages
1,206
Location
Bulgaria
OS: FreeBSD 9.1
Apache: 2.4
Php: 5.4 (mod_php) and 5.3 (suphp)
Custombuild: 2.0

Before I was getting rarely Segmentation Fault errors in the logs, but they was VERY rare.

Yesterday I updated PHP to latest version:

Code:
root:/var/log # php -v
PHP 5.4.15 (cli) (built: May 12 2013 23:25:06)

Same with the CGI one. In the morning the server crashed. In the log files I am getting lots of segmentation fault errors. Here is /var/log/messages:

Code:
May 13 14:21:28 srv kernel: pid 27516 (httpd), uid 1004: exited on signal 11
May 13 14:21:28 srv kernel: pid 26259 (httpd), uid 1004: exited on signal 11
May 13 14:21:38 srv kernel: pid 27654 (httpd), uid 1004: exited on signal 11
May 13 14:22:31 srv kernel: pid 27968 (php-cgi53), uid 1251: exited on signal 11 (core dumped)
May 13 14:22:33 srv kernel: pid 27992 (php-cgi53), uid 1251: exited on signal 11 (core dumped)
May 13 14:22:35 srv kernel: pid 28002 (php-cgi53), uid 1251: exited on signal 11 (core dumped)


Here is chunk from error_log:

Code:
[Mon May 13 15:06:57.876321 2013] [core:notice] [pid 17480] AH00052: child pid 39021 exit signal Segmentation fault (11)
[Mon May 13 15:06:57.876401 2013] [core:notice] [pid 17480] AH00052: child pid 38367 exit signal Segmentation fault (11)
[Mon May 13 15:07:09.897866 2013] [core:notice] [pid 17480] AH00052: child pid 41444 exit signal Segmentation fault (11)
[Mon May 13 15:07:20.932252 2013] [core:notice] [pid 17480] AH00052: child pid 42469 exit signal Segmentation fault (11)
[Mon May 13 15:09:03.190367 2013] [core:notice] [pid 17480] AH00052: child pid 35931 exit signal Segmentation fault (11)
[Mon May 13 15:10:56.372286 2013] [core:notice] [pid 17480] AH00052: child pid 42935 exit signal Segmentation fault (11)
[Mon May 13 15:11:28.416266 2013] [core:notice] [pid 17480] AH00052: child pid 44233 exit signal Segmentation fault (11)
[Mon May 13 15:11:28.416377 2013] [core:notice] [pid 17480] AH00052: child pid 42650 exit signal Segmentation fault (11)
[Mon May 13 15:11:28.416404 2013] [core:notice] [pid 17480] AH00052: child pid 42453 exit signal Segmentation fault (11)

I did my best to find if it is a user causing this issue but I was unable to find any.

Any thoughts?
 
Just rebuilt apache and php... no change:

Code:
[Mon May 13 15:34:20.608484 2013] [core:notice] [pid 1085] AH00052: child pid 1237 exit signal Segmentation fault (11)
 
Did downgrade php versions to 5.4.14 and 5.3.24... no change - still segfaulting once per minute or two...
 
And sorry guys for the initial mislead, it's not related to php upgrade/downgrade at all. I checked a bit older logs and it's there.
 
The error disappeared after ./build all d

I don't know what it was but it was definitely some conflict between Apache and other binary.
 
With

Code:
./build all d

you probably replaced php.ini with a default one, check it with:

Code:
./build options

find line

Code:
Replace "php.ini" with './build all' and './build php-ini': no

if you've got 'NO', then php.ini should not have been rewritten.

With

Code:
./build all d

all php built-in extensions were re-built as well as apache, so it might be the reason.
 
One day after the rebuild - the errors with "Segmentation fault" are gone. Now there are just very rare (2 actually) of the following in the apache error log:

Code:
Unsupported marker type 0x84
[Tue May 14 13:36:07.032292 2013] [core:notice] [pid 34483] AH00052: child pid 67489 exit signal Illegal instruction (4)
 
Back
Top