Bug #79438 [Com]: Repeated SIGSEGV in php-fpm

From: Date: Fri, 10 Apr 2020 07:12:24 +0000
Subject: Bug #79438 [Com]: Repeated SIGSEGV in php-fpm
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-226515@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=79438&edit=1 ID: 79438 Comment by: alexinbeijing at gmail dot com Reported by: gergely dot lukacsy at videosqr dot com Summary: Repeated SIGSEGV in php-fpm Status: Open Type: Bug Package: FPM related Operating System: Debian 9 PHP Version: Irrelevant Block user comment: N Private report: N New Comment: Can you share code for repro? If your application code is proprietary, can you trim it down to a minimal case which still exhibits the same problem, and share that? Previous Comments: ------------------------------------------------------------------------ [2020-03-31 15:12:46] gergely dot lukacsy at videosqr dot com I have a very similar issue as described in bug report #75127, but in that case the core dump suggests that the problem stems from a Zend-engine related error, while the core file I produced have no references to Zend. I think this small detail could indicate a different kind of error with similar messages but I might be wrong. I have the same error messages just like the ones that were posted in the previously mentioned bug report: (gdb) r --nodaemonize --fpm-config /etc/php/7.4/fpm/php-fpm.conf Starting program: /usr/sbin/php-fpm7.4 --nodaemonize --fpm-config /etc/php/7.4/fpm/php-fpm.conf [Thread debugging using libthread_db enabled] Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1". [27-Mar-2020 15:58:50] NOTICE: fpm is running, pid 4616 [27-Mar-2020 15:58:50] NOTICE: ready to handle connections [27-Mar-2020 15:58:50] NOTICE: systemd monitor interval set to 10000ms [27-Mar-2020 15:59:00] WARNING: [pool www] child 4622 exited on signal 11 (SIGSEGV) after 9.745 [27-Mar-2020 15:59:00] NOTICE: [pool www] child 4637 started [27-Mar-2020 15:59:00] WARNING: [pool www] child 4623 exited on signal 11 (SIGSEGV) after 9.780 [27-Mar-2020 15:59:00] NOTICE: [pool www] child 4638 started [27-Mar-2020 15:59:00] WARNING: [pool www] child 4624 exited on signal 11 (SIGSEGV) after 9.992 [27-Mar-2020 15:59:00] NOTICE: [pool www] child 4639 started [27-Mar-2020 15:59:01] WARNING: [pool www] child 4630 exited on signal 11 (SIGSEGV) after 11.00 [27-Mar-2020 15:59:01] NOTICE: [pool www] child 4640 started [27-Mar-2020 15:59:01] WARNING: [pool www] child 4631 exited on signal 11 (SIGSEGV) after 11.03 [27-Mar-2020 15:59:01] NOTICE: [pool www] child 4641 started [27-Mar-2020 15:59:02] WARNING: [pool admin] child 4617 exited on signal 11 (SIGSEGV) after 11. [27-Mar-2020 15:59:02] NOTICE: [pool admin] child 4642 started [27-Mar-2020 15:59:03] WARNING: [pool www] child 4628 exited on signal 11 (SIGSEGV) after 13.06 [27-Mar-2020 15:59:03] NOTICE: [pool www] child 4643 started [27-Mar-2020 15:59:03] WARNING: [pool www] child 4637 exited on signal 11 (SIGSEGV) after 3.374 [27-Mar-2020 15:59:03] NOTICE: [pool www] child 4644 started Core dump(php7.4-fpm): #0 0x00007ffff5bb22e3 in __epoll_wait_nocancel () at ../sysdeps/unix/syscall-template.S:84 No locals. #1 0x000055555587d523 in fpm_event_epoll_wait (queue=<optimized out>, timeout=1000) at ./sapi/fpm/fpm/events/epoll.c:126 ret = <optimized out> i = <optimized out> __func__ = "fpm_event_epoll_wait" #2 0x000055555587027c in fpm_event_loop (err=err@entry=0) at ./sapi/fpm/fpm/fpm_events.c:427 q = <optimized out> ms = <optimized out> tmp = <optimized out> timeout = <optimized out> ret = <optimized out> q2 = <optimized out> now = {tv_sec = 258831, tv_usec = 544316} signal_fd_event = {fd = 5, timeout = {tv_sec = 0, tv_usec = 0}, frequency = { tv_sec = 0, tv_usec = 0}, callback = 0x5555558704c0 <fpm_got_signal>, arg = 0x0, flags = 2, index = 5, which = 2} __func__ = "fpm_event_loop" #3 0x000055555586aa27 in fpm_run (max_requests=0x7fffffffe06c) at ./sapi/fpm/fpm/fpm.c:113 wp = 0x0 #4 0x0000555555634e14 in main (argc=4, argv=0x7fffffffe668) at ./sapi/fpm/fpm/fpm_main.c:1856 exit_status = 0 c = -1 use_extended_info = 0 file_handle = {handle = {fp = 0x7ffff56a22f9, stream = {handle = 0x7ffff56a22f9, isatty = 0, reader = 0x555555bf1c50, fsizer = 0x7ffff7de7b94 <_dl_fixup+212>, closer = 0x1}}, filename = 0x7ffff58a94d8 "\300I\272\365\377\177", opened_path = 0x7fffffffe668, type = (unknown: 4294960784), free_filename = 255 '\377', buf = 0x7ffff58a8ce8 " \257h\365\377\177", len = 0} orig_optind = 1 orig_optarg = 0x0 ini_entries_len = 0 max_requests = 0 requests = 0 fcgi_fd = 0 request = <optimized out> fpm_config = 0x7fffffffe8b8 "m.conf)" fpm_prefix = 0x0 fpm_pid = 0x0 test_conf = 0 force_daemon = 0 force_stderr = 0 php_information = 0 php_allow_to_run_as_root = 0 ret = <optimized out> __func__ = "main" Reproducablity: always. The problem occurs almost every time the webpage is accessed, however, it is completely random whether the page is served or fails with an http500 error. The error rate is about 60-70%. System specs: - OS: Debian GNU/Linux 9.11 (stretch) - Web server: openresty 1.15.8.2-1~stretch1 - PHP-FPM version (it looks like it's not relevant): -- php7.2-fpm - 7.2.29-1+0~20200320.39+debian9~1.gbp513c2e amd64 -- php7.3-fpm - 7.3.15-4+0~20200224.55+debian9~1.gbpbea824 amd64 -- php7.4-fpm - 7.4.4-1+0~20200320.15+debian9~1.gbpf8dc20 amd64 ------------------------------------------------------------------------ [2020-03-31 12:52:15] gergely dot lukacsy at videosqr dot com @danack@php.net: of course, here's the full module list retrieved via get_loaded_extensions(): Core,date,libxml,openssl,pcre,zlib,filter,hash,pcntl,Reflection,SPL,session,standard,sodium,mysqlnd,PDO,xml,calendar,ctype,curl,dom,mbstring,FFI,fileinfo,ftp,gd,gettext,iconv,igbinary,json,ldap,exif,mysqli,pdo_mysql,pdo_pgsql,pgsql,Phar,posix,readline,redis,shmop,SimpleXML,soap,sockets,ssh2,sysvmsg,sysvsem,sysvshm,tokenizer,xmlreader,xmlwriter,xsl,Zend OPcache ------------------------------------------------------------------------ [2020-03-31 12:35:27] danack@php.net Could you list which extensions you have loaded for the server that is seeing this please? ------------------------------------------------------------------------ [2020-03-31 12:27:34] gergely dot lukacsy at videosqr dot com Description: ------------ I have a very similar issue as described in bug report #75127, but in that case the core dump suggests that the problem stems from a Zend-engine related error, while the core file I produced have no references to Zend. I tought this small detail indicates that this is a different error with similar error messages but I might be wrong. I have the same error messages just like the ones that were posted in the previously mentioned bug report: (gdb) r --nodaemonize --fpm-config /etc/php/7.4/fpm/php-fpm.conf Starting program: /usr/sbin/php-fpm7.4 --nodaemonize --fpm-config /etc/php/7.4/fpm/php-fpm.conf [Thread debugging using libthread_db enabled] Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1". [27-Mar-2020 15:58:50] NOTICE: fpm is running, pid 4616 [27-Mar-2020 15:58:50] NOTICE: ready to handle connections [27-Mar-2020 15:58:50] NOTICE: systemd monitor interval set to 10000ms [27-Mar-2020 15:59:00] WARNING: [pool www] child 4622 exited on signal 11 (SIGSEGV) after 9.745 [27-Mar-2020 15:59:00] NOTICE: [pool www] child 4637 started [27-Mar-2020 15:59:00] WARNING: [pool www] child 4623 exited on signal 11 (SIGSEGV) after 9.780 [27-Mar-2020 15:59:00] NOTICE: [pool www] child 4638 started [27-Mar-2020 15:59:00] WARNING: [pool www] child 4624 exited on signal 11 (SIGSEGV) after 9.992 [27-Mar-2020 15:59:00] NOTICE: [pool www] child 4639 started [27-Mar-2020 15:59:01] WARNING: [pool www] child 4630 exited on signal 11 (SIGSEGV) after 11.00 [27-Mar-2020 15:59:01] NOTICE: [pool www] child 4640 started [27-Mar-2020 15:59:01] WARNING: [pool www] child 4631 exited on signal 11 (SIGSEGV) after 11.03 [27-Mar-2020 15:59:01] NOTICE: [pool www] child 4641 started [27-Mar-2020 15:59:02] WARNING: [pool admin] child 4617 exited on signal 11 (SIGSEGV) after 11. [27-Mar-2020 15:59:02] NOTICE: [pool admin] child 4642 started [27-Mar-2020 15:59:03] WARNING: [pool www] child 4628 exited on signal 11 (SIGSEGV) after 13.06 [27-Mar-2020 15:59:03] NOTICE: [pool www] child 4643 started [27-Mar-2020 15:59:03] WARNING: [pool www] child 4637 exited on signal 11 (SIGSEGV) after 3.374 [27-Mar-2020 15:59:03] NOTICE: [pool www] child 4644 started Core dump(php7.4-fpm): #0 0x00007ffff5bb22e3 in __epoll_wait_nocancel () at ../sysdeps/unix/syscall-template.S:84 No locals. #1 0x000055555587d523 in fpm_event_epoll_wait (queue=<optimized out>, timeout=1000) at ./sapi/fpm/fpm/events/epoll.c:126 ret = <optimized out> i = <optimized out> __func__ = "fpm_event_epoll_wait" #2 0x000055555587027c in fpm_event_loop (err=err@entry=0) at ./sapi/fpm/fpm/fpm_events.c:427 q = <optimized out> ms = <optimized out> tmp = <optimized out> timeout = <optimized out> ret = <optimized out> q2 = <optimized out> now = {tv_sec = 258831, tv_usec = 544316} signal_fd_event = {fd = 5, timeout = {tv_sec = 0, tv_usec = 0}, frequency = { tv_sec = 0, tv_usec = 0}, callback = 0x5555558704c0 <fpm_got_signal>, arg = 0x0, flags = 2, index = 5, which = 2} __func__ = "fpm_event_loop" #3 0x000055555586aa27 in fpm_run (max_requests=0x7fffffffe06c) at ./sapi/fpm/fpm/fpm.c:113 wp = 0x0 #4 0x0000555555634e14 in main (argc=4, argv=0x7fffffffe668) at ./sapi/fpm/fpm/fpm_main.c:1856 exit_status = 0 c = -1 use_extended_info = 0 file_handle = {handle = {fp = 0x7ffff56a22f9, stream = {handle = 0x7ffff56a22f9, isatty = 0, reader = 0x555555bf1c50, fsizer = 0x7ffff7de7b94 <_dl_fixup+212>, closer = 0x1}}, filename = 0x7ffff58a94d8 "\300I\272\365\377\177", opened_path = 0x7fffffffe668, type = (unknown: 4294960784), free_filename = 255 '\377', buf = 0x7ffff58a8ce8 " \257h\365\377\177", len = 0} orig_optind = 1 orig_optarg = 0x0 ini_entries_len = 0 max_requests = 0 requests = 0 fcgi_fd = 0 request = <optimized out> fpm_config = 0x7fffffffe8b8 "m.conf)" fpm_prefix = 0x0 fpm_pid = 0x0 test_conf = 0 force_daemon = 0 force_stderr = 0 php_information = 0 php_allow_to_run_as_root = 0 ret = <optimized out> __func__ = "main" Reproducablity: always. The problem occurs almost every time the webpage is accessed, however, it is completely random whether the page is served or fails with an http500 error. The error rate is about 60-70%. System specs: - OS: Debian GNU/Linux 9.11 (stretch) - Web server: openresty 1.15.8.2-1~stretch1 - PHP-FPM version (it looks like it's not relevant): -- php7.2-fpm - 7.2.29-1+0~20200320.39+debian9~1.gbp513c2e amd64 -- php7.3-fpm - 7.3.15-4+0~20200224.55+debian9~1.gbpbea824 amd64 -- php7.4-fpm - 7.4.4-1+0~20200320.15+debian9~1.gbpf8dc20 amd64 ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=79438&edit=1

« previous php.bugs (#226515) next »