php / php-src

The PHP Interpreter
https://www.php.net
Other
38.31k stars 7.76k forks source link

Crash on restart PHP FPM #8927

Closed erlandl4g closed 2 years ago

erlandl4g commented 2 years ago

Description

A restart was issued on Ubuntu 20.04:

systemctl restart apache2 systemctl restart php7.4-fpm

Which resulted in PHP and PHP FPM crash

Not very valuable dump as I have no core file available but might help:

  Id   Target Id                           Frame
* 1    Thread 0x7f399f3d4500 (LWP 1537188) 0x0000557950ee0083 in execute_ex ()

Thread 1 (Thread 0x7f399f3d4500 (LWP 1537188)):
#0  0x0000557950ee0083 in execute_ex ()
#1  0x0000557950ee778b in zend_execute ()
#2  0x0000557950e5e6bc in zend_execute_scripts ()
#3  0x0000557950dfe300 in php_execute_script ()
#4  0x0000557950ee98c2 in ?? ()
#5  0x0000557950cc5978 in ?? ()
#6  0x00007f39a12ed083 in __libc_start_main (main=0x557950cc5570, argc=18, argv=0x7ffd257687d8, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7ffd257687c8) at ../csu/libc-start.c:308
#7  0x0000557950cc5b1e in _start ()
#0  0x0000557950ee0083 in execute_ex ()
No symbol table info available.
#1  0x0000557950ee778b in zend_execute ()
No symbol table info available.
#2  0x0000557950e5e6bc in zend_execute_scripts ()
No symbol table info available.
#3  0x0000557950dfe300 in php_execute_script ()
No symbol table info available.
#4  0x0000557950ee98c2 in ?? ()
No symbol table info available.
#5  0x0000557950cc5978 in ?? ()
No symbol table info available.
#6  0x00007f39a12ed083 in __libc_start_main (main=0x557950cc5570, argc=18, argv=0x7ffd257687d8, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7ffd257687c8) at ../csu/libc-start.c:308
        self = <optimized out>
        result = <optimized out>
        unwind_buf = {cancel_jmp_buf = {{jmp_buf = {93979537254944, -897266838300228344, 93979534973680, 140725231978448, 0, 0, 897921108148258056, 1008532319663719688}, mask_was_saved = 0}}, priv = {pad = {0x0, 0x0, 0x12, 0x7ffd257687d8}, data = {prev = 0x0, cleanup = 0x0, canceltype = 18}}}
        not_first_call = <optimized out>
#7  0x0000557950cc5b1e in _start ()
No symbol table info available.
No symbol table info available.
No core file now.

PHP Version

PHP 7.4.3

Operating System

Ubuntu 20.04

erlandl4g commented 2 years ago

This crash was caused by Swoole latest version install as I see:


[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
Core was generated by `/usr/bin/php /home/learn4gd/public_html/jobs/index.php controller=cron action=e'.
Program terminated with signal SIGILL, Illegal instruction.
#0  0x00007f1286482570 in zim_swoole_coroutine_getCid (execute_data=0x7f1289c13750, return_value=0x55d6b73fab10 <execute_ex>) at /tmp/pear/install/openswoole/ext-src/swoole_coroutine.cc:980
980     /tmp/pear/install/openswoole/ext-src/swoole_coroutine.cc: No such file or directory.
(gdb) set pagination off
(gdb) set logging on
Copying output to gdb.txt.
Copying debug output to gdb.txt.
(gdb) info threads
  Id   Target Id                           Frame
* 1    Thread 0x7f1289e82500 (LWP 1570342) 0x00007f1286482570 in zim_swoole_coroutine_getCid (execute_data=0x7f1289c13750, return_value=0x55d6b73fab10 <execute_ex>) at /tmp/pear/install/openswoole/ext-src/swoole_coroutine.cc:980
(gdb) thread apply all bt

Thread 1 (Thread 0x7f1289e82500 (LWP 1570342)):
#0  0x00007f1286482570 in zim_swoole_coroutine_getCid (execute_data=0x7f1289c13750, return_value=0x55d6b73fab10 <execute_ex>) at /tmp/pear/install/openswoole/ext-src/swoole_coroutine.cc:980
#1  0x000055d6b73fa8fd in ?? ()
#2  0x000055d6b73fd083 in execute_ex ()
#3  0x000055d6b740478b in zend_execute ()
#4  0x000055d6b737b6bc in zend_execute_scripts ()
#5  0x000055d6b731b300 in php_execute_script ()
#6  0x000055d6b74068c2 in ?? ()
#7  0x000055d6b71e2978 in ?? ()
#8  0x00007f128bd9b083 in __libc_start_main (main=0x55d6b71e2570, argc=5, argv=0x7ffd03a0d588, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7ffd03a0d578) at ../csu/libc-start.c:308
#9  0x000055d6b71e2b1e in _start ()
(gdb) bt full
#0  0x00007f1286482570 in zim_swoole_coroutine_getCid (execute_data=0x7f1289c13750, return_value=0x55d6b73fab10 <execute_ex>) at /tmp/pear/install/openswoole/ext-src/swoole_coroutine.cc:980
        __z = 0x55d6b73fab10 <execute_ex>
#1  0x000055d6b73fa8fd in ?? ()
No symbol table info available.
#2  0x000055d6b73fd083 in execute_ex ()
No symbol table info available.
#3  0x000055d6b740478b in zend_execute ()
No symbol table info available.
#4  0x000055d6b737b6bc in zend_execute_scripts ()
No symbol table info available.
#5  0x000055d6b731b300 in php_execute_script ()
No symbol table info available.
#6  0x000055d6b74068c2 in ?? ()
No symbol table info available.
#7  0x000055d6b71e2978 in ?? ()
No symbol table info available.
#8  0x00007f128bd9b083 in __libc_start_main (main=0x55d6b71e2570, argc=5, argv=0x7ffd03a0d588, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7ffd03a0d578) at ../csu/libc-start.c:308
        self = <optimized out>
        result = <optimized out>
        unwind_buf = {cancel_jmp_buf = {{jmp_buf = {94380685851168, 8928859225199170479, 94380683569904, 140724664325504, 0, 0, -8929607364114951249, -8805459095523339345}, mask_was_saved = 0}}, priv = {pad = {0x0, 0x0, 0x5, 0x7ffd03a0d588}, data = {prev = 0x0, cleanup = 0x0, canceltype = 5}}}
        not_first_call = <optimized out>
#9  0x000055d6b71e2b1e in _start ()
No symbol table info available.
(gdb) info locals
__z = 0x55d6b73fab10 <execute_ex>
(gdb) detach
No core file now.
cmb69 commented 2 years ago

This crash was caused by Swoole latest version install as I see:

Then also report to them.

PHP 7.4.3

Does that also happen with any of the actively supported PHP versions?

erlandl4g commented 2 years ago

I have not tried PHP 8 or 8.1.

cmb69 commented 2 years ago

I have not tried PHP 8 or 8.1.

And we do no longer actively support PHP 7.4, let alone 7.4.3. So what should we do here?

erlandl4g commented 2 years ago

I'll close the issue and will reopen it if I am able to repeat it on PHP 8 in future.