Skip to content

Use HTTP 2.4.54 to load PHP-8.1.9, and frequently call a certain PHP interface to cause a core dump. The core dump error log is AH00051: child pid 6663 exit signal Segmentation fault(11) #9337

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
zqtop opened this issue Aug 15, 2022 · 13 comments

Comments

@zqtop
Copy link

zqtop commented Aug 15, 2022

Description

Recurrence condition:

I have an httpd server, its version number is 2.4.54, the working mode is event, in order to prevent the httpd memory from occupying for a long time and not being released, I enabled the httpd-mpm.conf configuration file, and I modified the value of MaxConnectionsPerChild to a specific value, when its value is set to a small value, such as 10, the specific configuration is as follows:

StartServers 5 ServerLimit 10 ThreadLimit 200 MinSpareThreads 75 MaxSpareThreads 250 ThreadsPerChild 25 MaxRequestWorkers 400 MaxConnectionsPerChild 10 MaxClients 250

I wrote a simple test case on thinkphp V6.0.12 base framework using PHP 8.1.9,the code is as follows

<?php
namespace app\index\controller;
Class Test
{
   public function myTest()
   {

       $result=file_get_contents("/home/ivstool/version/version.xml");
       return json([
           "status" => 0,
           "resultCode" => 0,
           "msg" => 'SUCCESS',
           "data" => $result
           ]
       );

   }
    public function info() {
          phpinfo();
    }
}
?>

After completing the above basic conditions, I wrote a simple multi-threaded httpd request example using python's multi-threading, the code is as follows:
import requests
import threading
import json

class CoreTest:

    def __init__(self):
        self.ip ="Server IP address"
        requestSession = requests.session()
        self.session = requestSession
        self.headers = {
            'Host': self.ip,
            'User-Agent': 'Mozilla/5.0 (Windows NT 6.2; rv:16.0) Gecko/20100101 Firefox/16.0',
            'Accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8',
            'Connection': 'keep-alive',
            'referer': "https://{0}".format(self.ip)+":8443/"
        }
        for i in range(0,100):
            self.task('thread_{0}'.format(str(i)))

    def task(self, thread_name):
        print('I am' + thread_name + 'doing test work....')
        url = "https://{0}".format(self.ip)+":8443/index/Test/myTest"
        response = self.session.get(url=url, verify=False, headers= self.headers)
        print(response.text)

When this use case runs for a period of time, the longer the better, a surprising phenomenon occurs, PHP generates a segmentation fault, I can see that multiple core files are generated in the core dump directory, and I use the GDB tool to trace core file information, get the following stack information

Resulted in this output:

warning: File "/usr/lib64/libthread_db-1.0.so" auto-loading has been declined by your `auto-load safe-path' set to "$debugdir:$datadir/auto-load".
To enable execution of this file add
        add-auto-load-safe-path /usr/lib64/libthread_db-1.0.so
line to your configuration file "/root/.gdbinit".
To completely disable this security protection add
        set auto-load safe-path /
line to your configuration file "/root/.gdbinit".
For more information about this security protection see the
"Auto-loading safe path" section in the GDB manual.  E.g., run from the shell:
        info "(gdb)Auto-loading safe path"

warning: Unable to find libthread_db matching inferior's thread library, thread debugging will not be available.
bt

warning: File "/usr/lib64/libthread_db-1.0.so" auto-loading has been declined by your `auto-load safe-path' set to "$debugdir:$datadir/auto-load".

warning: Unable to find libthread_db matching inferior's thread library, thread debugging will not be available.
Core was generated by `/home/ivs_omu_portal/httpd/bin/httpd'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0  0x0000ffffb5a194b8 in zend_signal_handler_defer (signo=1, siginfo=0xffffa2feb610, context=0xffffa2feb690)
    at /home/ivs_omu_portal/install/php-src-php-8.1.9/Zend/zend_signal.c:96
96      /home/ivs_omu_portal/install/php-src-php-8.1.9/Zend/zend_signal.c: No such file or directory.
[Current thread is 1 (LWP 1333780)]
(gdb) bt
#0  0x0000ffffb5a194b8 in zend_signal_handler_defer (signo=1, siginfo=0xffffa2feb610, context=0xffffa2feb690)
    at /home/ivs_omu_portal/install/php-src-php-8.1.9/Zend/zend_signal.c:96
#1  <signal handler called>
#2  0x0000ffffb6e2dd70 in pthread_kill () from /usr/lib64/libpthread.so.0
#3  0x000000000047641c in wakeup_listener () at event.c:605
#4  0x00000000004764ec in signal_threads (mode=mode@entry=1) at event.c:628
#5  0x000000000047a508 in signal_threads (mode=1) at event.c:619
#6  check_infinite_requests () at event.c:1251
#7  listener_thread (thd=0xffffa2fed1d0, dummy=<optimized out>) at event.c:1679
#8  0x0000ffffb6e267b0 in ?? () from /usr/lib64/libpthread.so.0
#9  0x0000ffffb6d5c23c in ?? () from /usr/lib64/libc.so.6

But I expected this output instead:

no core storage file

PHP Version

PHP-8.1.9

Operating System

Euler

@zqtop
Copy link
Author

zqtop commented Aug 15, 2022

I have also encountered it in other versions of PHP, but it has not been solved. I disabled the opache module when compiling PHP. I don't know why this error has always existed in multiple versions of PHP.

@simapple
Copy link

Is there any errors in php error_log file ?

@zqtop
Copy link
Author

zqtop commented Aug 17, 2022

[Wed Aug 17 10:19:08.557436 2022] [core:notice] [pid 536253:tid 281473673056272] AH00051: child pid 538181 exit signal Segmentation fault (11), possible coredump in /home/ivs_omu_portal/logs
[Wed Aug 17 10:19:09.560560 2022] [core:notice] [pid 536253:tid 281473673056272] AH00051: child pid 538196 exit signal Segmentation fault (11), possible coredump in /home/ivs_omu_portal/logs
[Wed Aug 17 10:19:09.562373 2022] [core:notice] [pid 536253:tid 281473673056272] AH00051: child pid 538197 exit signal Segmentation fault (11), possible coredump in /home/ivs_omu_portal/logs
[Wed Aug 17 10:19:09.564340 2022] [core:notice] [pid 536253:tid 281473673056272] AH00051: child pid 538198 exit signal Segmentation fault (11), possible coredump in /home/ivs_omu_portal/logs
[Wed Aug 17 10:19:09.564429 2022] [mpm_event:warn] [pid 536253:tid 281473673056272] AH10392: children are killed successively!
[Wed Aug 17 10:19:10.567139 2022] [core:notice] [pid 536253:tid 281473673056272] AH00051: child pid 538216 exit signal Segmentation fault (11), possible coredump in /home/ivs_omu_portal/logs
[Wed Aug 17 10:19:10.569093 2022] [core:notice] [pid 536253:tid 281473673056272] AH00051: child pid 538217 exit signal Segmentation fault (11), possible coredump in /home/ivs_omu_portal/logs
[Wed Aug 17 10:19:11.571878 2022] [core:notice] [pid 536253:tid 281473673056272] AH00051: child pid 538218 exit signal Segmentation fault (11), possible coredump in /home/ivs_omu_portal/logs
[Wed Aug 17 10:19:11.573978 2022] [core:notice] [pid 536253:tid 281473673056272] AH00051: child pid 538219 exit signal Segmentation fault (11), possible coredump in /home/ivs_omu_portal/logs
[Wed Aug 17 10:19:11.576231 2022] [core:notice] [pid 536253:tid 281473673056272] AH00051: child pid 538220 exit signal Segmentation fault (11), possible coredump in /home/ivs_omu_portal/logs
[Wed Aug 17 10:19:11.576441 2022] [mpm_event:warn] [pid 536253:tid 281473673056272] AH10392: children are killed successively!
[Wed Aug 17 10:19:12.578846 2022] [core:notice] [pid 536253:tid 281473673056272] AH00051: child pid 538221 exit signal Segmentation fault (11), possible coredump in /home/ivs_omu_portal/logs
[Wed Aug 17 10:19:12.580772 2022] [core:notice] [pid 536253:tid 281473673056272] AH00051: child pid 538222 exit signal Segmentation fault (11), possible coredump in /home/ivs_omu_portal/logs
[Wed Aug 17 10:19:13.584052 2022] [core:notice] [pid 536253:tid 281473673056272] AH00051: child pid 538264 exit signal Segmentation fault (11), possible coredump in /home/ivs_omu_portal/logs
[Wed Aug 17 10:19:13.585643 2022] [core:notice] [pid 536253:tid 281473673056272] AH00051: child pid 538265 exit signal Segmentation fault (11), possible coredump in /home/ivs_omu_portal/logs
[Wed Aug 17 10:19:13.587383 2022] [core:notice] [pid 536253:tid 281473673056272] AH00051: child pid 538266 exit signal Segmentation fault (11), possible coredump in /home/ivs_omu_portal/logs
[Wed Aug 17 10:19:13.587494 2022] [mpm_event:warn] [pid 536253:tid 281473673056272] AH10392: children are killed successively!
[Wed Aug 17 10:19:14.589276 2022] [core:notice] [pid 536253:tid 281473673056272] AH00051: child pid 538271 exit signal Segmentation fault (11), possible coredump in /home/ivs_omu_portal/logs
[Wed Aug 17 10:19:14.591078 2022] [core:notice] [pid 536253:tid 281473673056272] AH00051: child pid 538272 exit signal Segmentation fault (11), possible coredump in /home/ivs_omu_portal/logs
[Wed Aug 17 10:19:15.593752 2022] [core:notice] [pid 536253:tid 281473673056272] AH00051: child pid 538279 exit signal Segmentation fault (11), possible coredump in /home/ivs_omu_portal/logs
[Wed Aug 17 10:19:15.595390 2022] [core:notice] [pid 536253:tid 281473673056272] AH00051: child pid 538280 exit signal Segmentation fault (11), possible coredump in /home/ivs_omu_portal/logs
[Wed Aug 17 10:19:15.597071 2022] [core:notice] [pid 536253:tid 281473673056272] AH00051: child pid 538281 exit signal Segmentation fault (11), possible coredump in /home/ivs_omu_portal/logs
[Wed Aug 17 10:19:15.597157 2022] [mpm_event:warn] [pid 536253:tid 281473673056272] AH10392: children are killed successively!
[Wed Aug 17 10:19:16.599132 2022] [core:notice] [pid 536253:tid 281473673056272] AH00051: child pid 538287 exit signal Segmentation fault (11), possible coredump in /home/ivs_omu_portal/logs
[Wed Aug 17 10:19:16.600937 2022] [core:notice] [pid 536253:tid 281473673056272] AH00051: child pid 538288 exit signal Segmentation fault (11), possible coredump in /home/ivs_omu_portal/logs
[Wed Aug 17 10:19:17.604011 2022] [core:notice] [pid 536253:tid 281473673056272] AH00051: child pid 538289 exit signal Segmentation fault (11), possible coredump in /home/ivs_omu_portal/logs
[Wed Aug 17 10:19:17.605782 2022] [core:notice] [pid 536253:tid 281473673056272] AH00051: child pid 538290 exit signal Segmentation fault (11), possible coredump in /home/ivs_omu_portal/logs
[Wed Aug 17 10:19:17.608111 2022] [core:notice] [pid 536253:tid 281473673056272] AH00051: child pid 538291 exit signal Segmentation fault (11), possible coredump in /home/ivs_omu_portal/logs
[Wed Aug 17 10:19:17.608328 2022] [mpm_event:warn] [pid 536253:tid 281473673056272] AH10392: children are killed successively!
[Wed Aug 17 10:19:18.610507 2022] [core:notice] [pid 536253:tid 281473673056272] AH00051: child pid 538292 exit signal Segmentation fault (11), possible coredump in /home/ivs_omu_portal/logs
[Wed Aug 17 10:19:18.612303 2022] [core:notice] [pid 536253:tid 281473673056272] AH00051: child pid 538293 exit signal Segmentation fault (11), possible coredump in /home/ivs_omu_portal/logs
[Wed Aug 17 10:19:19.614631 2022] [core:notice] [pid 536253:tid 281473673056272] AH00051: child pid 538294 exit signal Segmentation fault (11), possible coredump in /home/ivs_omu_portal/logs
[Wed Aug 17 10:19:19.616264 2022] [core:notice] [pid 536253:tid 281473673056272] AH00051: child pid 538295 exit signal Segmentation fault (11), possible coredump in /home/ivs_omu_portal/logs
[Wed Aug 17 10:19:19.618054 2022] [core:notice] [pid 536253:tid 281473673056272] AH00051: child pid 538296 exit signal Segmentation fault (11), possible coredump in /home/ivs_omu_portal/logs
[Wed Aug 17 10:19:19.618140 2022] [mpm_event:warn] [pid 536253:tid 281473673056272] AH10392: children are killed successively!
[Wed Aug 17 10:19:20.620414 2022] [core:notice] [pid 536253:tid 281473673056272] AH00051: child pid 538297 exit signal Segmentation fault (11), possible coredump in /home/ivs_omu_portal/logs
[Wed Aug 17 10:19:20.622271 2022] [core:notice] [pid 536253:tid 281473673056272] AH00051: child pid 538298 exit signal Segmentation fault (11), possible coredump in /home/ivs_omu_portal/logs
[Wed Aug 17 10:19:21.625220 2022] [core:notice] [pid 536253:tid 281473673056272] AH00051: child pid 538325 exit signal Segmentation fault (11), possible coredump in /home/ivs_omu_portal/logs
[Wed Aug 17 10:19:21.626929 2022] [core:notice] [pid 536253:tid 281473673056272] AH00051: child pid 538326 exit signal Segmentation fault (11), possible coredump in /home/ivs_omu_portal/logs
[Wed Aug 17 10:19:21.628739 2022] [core:notice] [pid 536253:tid 281473673056272] AH00051: child pid 538327 exit signal Segmentation fault (11), possible coredump in /home/ivs_omu_portal/logs
[Wed Aug 17 10:19:21.628824 2022] [mpm_event:warn] [pid 536253:tid 281473673056272] AH10392: children are killed successively!
[Wed Aug 17 10:19:22.631185 2022] [core:notice] [pid 536253:tid 281473673056272] AH00051: child pid 538328 exit signal Segmentation fault (11), possible coredump in /home/ivs_omu_portal/logs
[Wed Aug 17 10:19:22.633010 2022] [core:notice] [pid 536253:tid 281473673056272] AH00051: child pid 538329 exit signal Segmentation fault (11), possible coredump in /home/ivs_omu_portal/logs
[Wed Aug 17 10:19:23.636270 2022] [core:notice] [pid 536253:tid 281473673056272] AH00051: child pid 538330 exit signal Segmentation fault (11), possible coredump in /home/ivs_omu_portal/logs
[Wed Aug 17 10:19:23.637892 2022] [core:notice] [pid 536253:tid 281473673056272] AH00051: child pid 538331 exit signal Segmentation fault (11), possible coredump in /home/ivs_omu_portal/logs
[Wed Aug 17 10:19:23.639782 2022] [core:notice] [pid 536253:tid 281473673056272] AH00051: child pid 538332 exit signal Segmentation fault (11), possible coredump in /home/ivs_omu_portal/logs
[Wed Aug 17 10:19:23.639877 2022] [mpm_event:warn] [pid 536253:tid 281473673056272] AH10392: children are killed successively!
[Wed Aug 17 10:19:24.641597 2022] [core:notice] [pid 536253:tid 281473673056272] AH00051: child pid 538333 exit signal Segmentation fault (11), possible coredump in /home/ivs_omu_portal/logs
[Wed Aug 17 10:19:24.643510 2022] [core:notice] [pid 536253:tid 281473673056272] AH00051: child pid 538334 exit signal Segmentation fault (11), possible coredump in /home/ivs_omu_portal/logs
[Wed Aug 17 10:19:25.646495 2022] [core:notice] [pid 536253:tid 281473673056272] AH00051: child pid 538366 exit signal Segmentation fault (11), possible coredump in /home/ivs_omu_portal/logs
[Wed Aug 17 10:19:25.648172 2022] [core:notice] [pid 536253:tid 281473673056272] AH00051: child pid 538367 exit signal Segmentation fault (11), possible coredump in /home/ivs_omu_portal/logs
[Wed Aug 17 10:19:25.650061 2022] [core:notice] [pid 536253:tid 281473673056272] AH00051: child pid 538368 exit signal Segmentation fault (11), possible coredump in /home/ivs_omu_portal/logs
[Wed Aug 17 10:19:25.650149 2022] [mpm_event:warn] [pid 536253:tid 281473673056272] AH10392: children are killed successively!
[Wed Aug 17 10:19:26.652812 2022] [core:notice] [pid 536253:tid 281473673056272] AH00051: child pid 538383 exit signal Segmentation fault (11), possible coredump in /home/ivs_omu_portal/logs
[Wed Aug 17 10:19:26.654736 2022] [core:notice] [pid 536253:tid 281473673056272] AH00051: child pid 538384 exit signal Segmentation fault (11), possible coredump in /home/ivs_omu_portal/logs
[Wed Aug 17 10:19:27.657678 2022] [core:notice] [pid 536253:tid 281473673056272] AH00051: child pid 538399 exit signal Segmentation fault (11), possible coredump in /home/ivs_omu_portal/logs
[Wed Aug 17 10:19:27.659411 2022] [core:notice] [pid 536253:tid 281473673056272] AH00051: child pid 538400 exit signal Segmentation fault (11), possible coredump in /home/ivs_omu_portal/logs
[Wed Aug 17 10:19:27.661891 2022] [core:notice] [pid 536253:tid 281473673056272] AH00051: child pid 538401 exit signal Segmentation fault (11), possible coredump in /home/ivs_omu_portal/logs
[Wed Aug 17 10:19:27.661994 2022] [mpm_event:warn] [pid 536253:tid 281473673056272] AH10392: children are killed successively!
[Wed Aug 17 10:19:28.664450 2022] [core:notice] [pid 536253:tid 281473673056272] AH00051: child pid 538430 exit signal Segmentation fault (11), possible coredump in /home/ivs_omu_portal/logs
[Wed Aug 17 10:19:28.666735 2022] [core:notice] [pid 536253:tid 281473673056272] AH00051: child pid 538431 exit signal Segmentation fault (11), possible coredump in /home/ivs_omu_portal/logs
[Wed Aug 17 10:19:29.669485 2022] [core:notice] [pid 536253:tid 281473673056272] AH00051: child pid 538446 exit signal Segmentation fault (11), possible coredump in /home/ivs_omu_portal/logs
[Wed Aug 17 10:19:29.671200 2022] [core:notice] [pid 536253:tid 281473673056272] AH00051: child pid 538447 exit signal Segmentation fault (11), possible coredump in /home/ivs_omu_portal/logs
[Wed Aug 17 10:19:29.673475 2022] [core:notice] [pid 536253:tid 281473673056272] AH00051: child pid 538448 exit signal Segmentation fault (11), possible coredump in /home/ivs_omu_portal/logs
[Wed Aug 17 10:19:29.673724 2022] [mpm_event:warn] [pid 536253:tid 281473673056272] AH10392: children are killed successively!
[Wed Aug 17 10:19:30.676423 2022] [core:notice] [pid 536253:tid 281473673056272] AH00051: child pid 538463 exit signal Segmentation fault (11), possible coredump in /home/ivs_omu_portal/logs
[Wed Aug 17 10:19:30.678334 2022] [core:notice] [pid 536253:tid 281473673056272] AH00051: child pid 538464 exit signal Segmentation fault (11), possible coredump in /home/ivs_omu_portal/logs
[Wed Aug 17 10:19:31.681254 2022] [core:notice] [pid 536253:tid 281473673056272] AH00051: child pid 538479 exit signal Segmentation fault (11), possible coredump in /home/ivs_omu_portal/logs
[Wed Aug 17 10:19:31.682988 2022] [core:notice] [pid 536253:tid 281473673056272] AH00051: child pid 538480 exit signal Segmentation fault (11), possible coredump in /home/ivs_omu_portal/logs
[Wed Aug 17 10:19:31.684866 2022] [core:notice] [pid 536253:tid 281473673056272] AH00051: child pid 538481 exit signal Segmentation fault (11), possible coredump in /home/ivs_omu_portal/logs
[Wed Aug 17 10:19:31.684952 2022] [mpm_event:warn] [pid 536253:tid 281473673056272] AH10392: children are killed successively!
[Wed Aug 17 10:19:32.686877 2022] [core:notice] [pid 536253:tid 281473673056272] AH00051: child pid 538505 exit signal Segmentation fault (11), possible coredump in /home/ivs_omu_portal/logs
[Wed Aug 17 10:19:32.688836 2022] [core:notice] [pid 536253:tid 281473673056272] AH00051: child pid 538506 exit signal Segmentation fault (11), possible coredump in /home/ivs_omu_portal/logs
[Wed Aug 17 10:19:33.690955 2022] [core:notice] [pid 536253:tid 281473673056272] AH00051: child pid 538521 exit signal Segmentation fault (11), possible coredump in /home/ivs_omu_portal/logs
[Wed Aug 17 10:19:33.692527 2022] [core:notice] [pid 536253:tid 281473673056272] AH00051: child pid 538522 exit signal Segmentation fault (11), possible coredump in /home/ivs_omu_portal/logs
[Wed Aug 17 10:19:33.694201 2022] [core:notice] [pid 536253:tid 281473673056272] AH00051: child pid 538523 exit signal Segmentation fault (11), possible coredump in /home/ivs_omu_portal/logs
[Wed Aug 17 10:19:33.694289 2022] [mpm_event:warn] [pid 536253:tid 281473673056272] AH10392: children are killed successively!
[Wed Aug 17 10:19:34.696387 2022] [core:notice] [pid 536253:tid 281473673056272] AH00051: child pid 538526 exit signal Segmentation fault (11), possible coredump in /home/ivs_omu_portal/logs
[Wed Aug 17 10:19:34.698466 2022] [core:notice] [pid 536253:tid 281473673056272] AH00051: child pid 538527 exit signal Segmentation fault (11), possible coredump in /home/ivs_omu_portal/logs
[Wed Aug 17 10:19:35.701921 2022] [core:notice] [pid 536253:tid 281473673056272] AH00051: child pid 538528 exit signal Segmentation fault (11), possible coredump in /home/ivs_omu_portal/logs
[Wed Aug 17 10:19:35.703605 2022] [core:notice] [pid 536253:tid 281473673056272] AH00051: child pid 538529 exit signal Segmentation fault (11), possible coredump in /home/ivs_omu_portal/logs
[Wed Aug 17 10:19:35.705698 2022] [core:notice] [pid 536253:tid 281473673056272] AH00051: child pid 538530 exit signal Segmentation fault (11), possible coredump in /home/ivs_omu_portal/logs
[Wed Aug 17 10:19:35.705911 2022] [mpm_event:warn] [pid 536253:tid 281473673056272] AH10392: children are killed successively!
[Wed Aug 17 10:19:36.708329 2022] [core:notice] [pid 536253:tid 281473673056272] AH00051: child pid 538548 exit signal Segmentation fault (11), possible coredump in /home/ivs_omu_portal/logs
[Wed Aug 17 10:19:36.710249 2022] [core:notice] [pid 536253:tid 281473673056272] AH00051: child pid 538549 exit signal Segmentation fault (11), possible coredump in /home/ivs_omu_portal/logs
[Wed Aug 17 10:19:37.713717 2022] [core:notice] [pid 536253:tid 281473673056272] AH00051: child pid 538550 exit signal Segmentation fault (11), possible coredump in /home/ivs_omu_portal/logs
[Wed Aug 17 10:19:37.715724 2022] [core:notice] [pid 536253:tid 281473673056272] AH00051: child pid 538551 exit signal Segmentation fault (11), possible coredump in /home/ivs_omu_portal/logs
[Wed Aug 17 10:19:37.717521 2022] [core:notice] [pid 536253:tid 281473673056272] AH00051: child pid 538552 exit signal Segmentation fault (11), possible coredump in /home/ivs_omu_portal/logs
[Wed Aug 17 10:19:37.717594 2022] [mpm_event:warn] [pid 536253:tid 281473673056272] AH10392: children are killed successively!
[Wed Aug 17 10:19:38.719649 2022] [core:notice] [pid 536253:tid 281473673056272] AH00051: child pid 538562 exit signal Segmentation fault (11), possible coredump in /home/ivs_omu_portal/logs
[Wed Aug 17 10:19:38.721578 2022] [core:notice] [pid 536253:tid 281473673056272] AH00051: child pid 538563 exit signal Segmentation fault (11), possible coredump in /home/ivs_omu_portal/logs
[Wed Aug 17 10:19:39.724358 2022] [core:notice] [pid 536253:tid 281473673056272] AH00051: child pid 538564 exit signal Segmentation fault (11), possible coredump in /home/ivs_omu_portal/logs
[Wed Aug 17 10:19:39.725971 2022] [core:notice] [pid 536253:tid 281473673056272] AH00051: child pid 538565 exit signal Segmentation fault (11), possible coredump in /home/ivs_omu_portal/logs
[Wed Aug 17 10:19:39.727861 2022] [core:notice] [pid 536253:tid 281473673056272] AH00051: child pid 538566 exit signal Segmentation fault (11), possible coredump in /home/ivs_omu_portal/logs
[Wed Aug 17 10:19:39.727935 2022] [mpm_event:warn] [pid 536253:tid 281473673056272] AH10392: children are killed successively!
[Wed Aug 17 10:19:40.729802 2022] [core:notice] [pid 536253:tid 281473673056272] AH00051: child pid 538600 exit signal Segmentation fault (11), possible coredump in /home/ivs_omu_portal/logs
[Wed Aug 17 10:19:40.731696 2022] [core:notice] [pid 536253:tid 281473673056272] AH00051: child pid 538601 exit signal Segmentation fault (11), possible coredump in /home/ivs_omu_portal/logs
[Wed Aug 17 10:19:41.734512 2022] [core:notice] [pid 536253:tid 281473673056272] AH00051: child pid 538620 exit signal Segmentation fault (11), possible coredump in /home/ivs_omu_portal/logs
[Wed Aug 17 10:19:41.736174 2022] [core:notice] [pid 536253:tid 281473673056272] AH00051: child pid 538621 exit signal Segmentation fault (11), possible coredump in /home/ivs_omu_portal/logs
[Wed Aug 17 10:19:41.737892 2022] [core:notice] [pid 536253:tid 281473673056272] AH00051: child pid 538622 exit signal Segmentation fault (11), possible coredump in /home/ivs_omu_portal/logs
[Wed Aug 17 10:19:41.738004 2022] [mpm_event:warn] [pid 536253:tid 281473673056272] AH10392: children are killed successively!
[Wed Aug 17 10:19:42.740412 2022] [core:notice] [pid 536253:tid 281473673056272] AH00051: child pid 538628 exit signal Segmentation fault (11), possible coredump in /home/ivs_omu_portal/logs
[Wed Aug 17 10:19:42.742219 2022] [core:notice] [pid 536253:tid 281473673056272] AH00051: child pid 538629 exit signal Segmentation fault (11), possible coredump in /home/ivs_omu_portal/logs
[Wed Aug 17 10:19:43.745665 2022] [core:notice] [pid 536253:tid 281473673056272] AH00051: child pid 538642 exit signal Segmentation fault (11), possible coredump in /home/ivs_omu_portal/logs
[Wed Aug 17 10:19:43.747361 2022] [core:notice] [pid 536253:tid 281473673056272] AH00051: child pid 538643 exit signal Segmentation fault (11), possible coredump in /home/ivs_omu_portal/logs
[Wed Aug 17 10:19:43.749608 2022] [core:notice] [pid 536253:tid 281473673056272] AH00051: child pid 538644 exit signal Segmentation fault (11), possible coredump in /home/ivs_omu_portal/logs
[Wed Aug 17 10:19:43.749822 2022] [mpm_event:warn] [pid 536253:tid 281473673056272] AH10392: children are killed successively!
[Wed Aug 17 10:19:44.752379 2022] [core:notice] [pid 536253:tid 281473673056272] AH00051: child pid 538658 exit signal Segmentation fault (11), possible coredump in /home/ivs_omu_portal/logs
[Wed Aug 17 10:19:44.754282 2022] [core:notice] [pid 536253:tid 281473673056272] AH00051: child pid 538659 exit signal Segmentation fault (11), possible coredump in /home/ivs_omu_portal/logs
[Wed Aug 17 10:19:45.757539 2022] [core:notice] [pid 536253:tid 281473673056272] AH00051: child pid 538661 exit signal Segmentation fault (11), possible coredump in /home/ivs_omu_portal/logs
[Wed Aug 17 10:19:45.759184 2022] [core:notice] [pid 536253:tid 281473673056272] AH00051: child pid 538662 exit signal Segmentation fault (11), possible coredump in /home/ivs_omu_portal/logs
[Wed Aug 17 10:19:45.760926 2022] [core:notice] [pid 536253:tid 281473673056272] AH00051: child pid 538663 exit signal Segmentation fault (11), possible coredump in /home/ivs_omu_portal/logs
[Wed Aug 17 10:19:45.761012 2022] [mpm_event:warn] [pid 536253:tid 281473673056272] AH10392: children are killed successively!
[Wed Aug 17 10:19:46.112320 2022] [core:notice] [pid 536253:tid 281473673056272] AH00051: child pid 538665 exit signal Segmentation fault (11), possible coredump in /home/ivs_omu_portal/logs
[Wed Aug 17 10:19:46.112500 2022] [core:notice] [pid 536253:tid 281473673056272] AH00051: child pid 538664 exit signal Segmentation fault (11), possible coredump in /home/ivs_omu_portal/logs
[Wed Aug 17 10:19:46.458925 2022] [core:notice] [pid 536253:tid 281473673056272] AH00051: child pid 538668 exit signal Segmentation fault (11), possible coredump in /home/ivs_omu_portal/logs

@zqtop
Copy link
Author

zqtop commented Aug 17, 2022

This is the error message in the error log.

@simapple
Copy link

Those don't look like php error_log . Are those lines in the file that is setting in php.ini which parameter name is "error_log" ?

@zqtop
Copy link
Author

zqtop commented Aug 18, 2022

Sorry, I was wrong before. The preceding information is the error log output specified in the httpd.conf configuration file. Just now, I tried to specify the error log in the php.ini file and reproduce the core. No accident occurs. A large number of cores are generated. However, the php.ini error log file is not found.

@simapple
Copy link

#9361 (comment), maybe this answer can solve it.

@zqtop
Copy link
Author

zqtop commented Aug 19, 2022

I hope the problem can be resolved, thank you.

@Ketrupik
Copy link

I have the same issue. Apache segfaults in mod_php, in zend_signal.c:96:
Thread 1 (Thread 0x7f1f457fa6c0 (LWP 8660)): #0 0x00007f1fa60068c4 in zend_signal_handler_defer (signo=1, siginfo=0x7f1f457f9170, context=0x7f1f457f9040) at /var/tmp/portage/dev-lang/php-8.1.16/work/sapis-build/apache2/Zend/zend_signal.c:96 errno_save = 0 queue = <optimized out> qtmp = <optimized out> #1 <signal handler called> No symbol table info available. #2 0x00007f1fa715898c in ?? () from /lib64/libc.so.6 No symbol table info available. #3 0x00005582d3d78173 in wakeup_listener () at worker.c:293 No locals. #4 wakeup_listener () at worker.c:272 No locals. #5 signal_threads (mode=mode@entry=1) at worker.c:316 No locals. #6 0x00005582d3d7ab05 in signal_threads (mode=1) at worker.c:307 No locals. #7 check_infinite_requests () at worker.c:496 No locals. #8 listener_thread (thd=0x5582d5cfcdb0, dummy=<optimized out>) at worker.c:570 ti = <optimized out> process_slot = 21 csd = 0x7f1f2c006f90 ptrans = 0x7f1f2c006f08 rv = <optimized out> lr = <optimized out> have_idle_worker = 0 last_poll_idx = <optimized out> #9 0x00007f1fa7156d6a in ?? () from /lib64/libc.so.6 No symbol table info available. #10 0x00007f1fa71d60ec in ?? () from /lib64/libc.so.6 No symbol table info available.
Where my case differs from OPs is mpm - I use mpm-worker.
The segmentation fault is triggered mostly in moderate workloads (example apache server-status around the time of crash says: 414 requests currently being processed, 336 idle workers).
I cannot trigger it at will, but it does happen fairly often on its own in my production setup. I'm willing to provide more details and to try to narrow the issue down, but I don't even know where to start. How can I be useful in solving this issue?

@Ketrupik
Copy link

Oh, and the error_log from php.ini is completely empty at the time of the crash, providing no additional info.

@nielsdos
Copy link
Member

@Ketrupik I think I fixed the issue you're having last weekend. It looks the same as the one I fixed here : #10861

It was merged into the current 8.1 and 8.2 development branches so it should be available in the next bugfix release.
If you need the fix now you can apply the PR patch manually too.

@nielsdos
Copy link
Member

nielsdos commented Mar 22, 2023

@zqtop your issue looks like either the zend signal issue I mentioned in my previous comment (which is fixed in the latest development branches), or it could be this other issue for which I have a fix PR open: #10863

It would be great if you could apply both patches (the zend signal PR and the one I linked here) manually and see if that fixes your problem :)

@github-actions
Copy link

github-actions bot commented Apr 6, 2023

No feedback was provided. The issue is being suspended because we assume that you are no longer experiencing the problem. If this is not the case and you are able to provide the information that was requested earlier, please do so. Thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants