"[Notice] Child Pid Xxxx Exit Signal Segmentation Fault (11)" in Apache Error.Log

[notice] child pid XXXX exit signal Segmentation fault (11) in apache error.log

Attach gdb to one of the httpd child processes and reload or continue working and wait for a crash and then look at the backtrace. Do something like this:

$ ps -ef|grep httpd
0 681 1 0 10:38pm ?? 0:00.45 /Applications/MAMP/Library/bin/httpd -k start
501 690 681 0 10:38pm ?? 0:00.02 /Applications/MAMP/Library/bin/httpd -k start

...

Now attach gdb to one of the child processes, in this case PID 690 (columns are UID, PID, PPID, ...)

$ sudo gdb
(gdb) attach 690
Attaching to process 690.
Reading symbols for shared libraries . done
Reading symbols for shared libraries ....................... done
0x9568ce29 in accept$NOCANCEL$UNIX2003 ()
(gdb) c
Continuing.

Wait for crash... then:

(gdb) backtrace

Or

(gdb) backtrace full

Should give you some clue what's going on. If you file a bug report you should include the backtrace.

If the crash is hard to reproduce it may be a good idea to configure Apache to only use one child processes for handling requests. The config is something like this:

StartServers 1
MinSpareServers 1
MaxSpareServers 1

Apache LOG: child pid xxxx exit signal Segmentation fault (11)

Endless loop of the function in PHP code caused this error.

“[notice] child pid XXXX exit signal Segmentation fault (11)” in apache error.log

Check whether your PHP-FPM and PHP versions match. Make sure there is a (correct) PHP-FPM configuration corresponding to your PHP and PHP-FPM version, respectively.

On a Debian system there should be something like this:

/etc/php/7.3/fpm
/etc/php/7.3/fpm/php.ini
/etc/php/7.3/fpm/php-fpm.conf
/etc/php/7.3/fpm/pool.d
/etc/php/7.3/fpm/conf.d
/etc/php/7.3/fpm/pool.d/www.conf

On my system the /etc/php/7.3/fpm directory was missing. Reason: legacy PHP-FPM didn't get updated. After installing the PHP-FPM update and synch'ing the new fpm config w/ my tweaked config there were no more segfaults and everything started working as it did before the update.

The root cause for those child segfaults was particularly nasty to isolate, maybe this SO answer can save others the hassle.

HTH

APC and child pid XXXXX exit signal Segmentation fault

From the looks of your server status page, you are trying to run PHP as mod_php with a threaded Apache MPM. Many PHP extensions, likely including APC and Xcache, are not thread-safe. As such, they will crash frequently under load.

You will need to switch Apache to the prefork MPM, or run PHP as CGI or FastCGI.



Related Topics



Leave a reply



Submit