swoole / swoole-src

🚀 Coroutine-based concurrency library for PHP
https://www.swoole.com
Apache License 2.0
18.25k stars 3.16k forks source link

WARNING Server::check_worker_exit_status(): worker(pid=337, id=2) abnormal exit, status=0, signal=11 #5287

Closed zhuchonglin closed 1 month ago

zhuchonglin commented 1 month ago

Please answer these questions before submitting your issue.

  1. What did you do? If possible, provide a simple script for reproducing the error. OS: Linux 5.15.49-linuxkit-pr #1 SMP Thu May 25 07:17:40 UTC 2023 x86_64 GCC_VERSION: 13.2.1 20231014 OPENSSL_VERSION: OpenSSL 3.1.4 24 Oct 2023 PHP_VERSION : 8.3.4 在上述环境中运行https://wiki.swoole.com/#/http_server示例代码时当接收到请求就会输出Segmentation fault

  2. What did you expect to see? 能够正常运行

  3. What did you see instead? 输出Segmentation fault进程意外退出

  4. What version of Swoole are you using (show your php --ri swoole)? Swoole => enabled Author => Swoole Team team@swoole.com Version => 5.1.2 Built => Mar 16 2024 10:01:06 coroutine => enabled with boost asm context epoll => enabled eventfd => enabled signalfd => enabled spinlock => enabled rwlock => enabled sockets => enabled openssl => OpenSSL 3.1.4 24 Oct 2023 dtls => enabled http2 => enabled json => enabled curl-native => enabled pcre => enabled zlib => 1.3.1 brotli => E16781312/D16781312 mutex_timedlock => enabled pthread_barrier => enabled futex => enabled mysqlnd => enabled async_redis => enabled coroutine_pgsql => enabled

Directive => Local Value => Master Value swoole.enable_coroutine => On => On swoole.enable_library => On => On swoole.enable_fiber_mock => Off => Off swoole.enable_preemptive_scheduler => Off => Off swoole.display_errors => On => On swoole.use_shortname => On => On swoole.unixsock_buffer_size => 8388608 => 8388608

  1. What is your machine environment used (show your uname -a & php -v & gcc -v) ?

OS: Linux 5.15.49-linuxkit-pr #1 SMP Thu May 25 07:17:40 UTC 2023 x86_64 GCC_VERSION: 13.2.1 20231014 OPENSSL_VERSION: OpenSSL 3.1.4 24 Oct 2023 PHP_VERSION : 8.3.4

zhuchonglin commented 1 month ago

(gdb) bt

0 __cp_end () at src/thread/x86_64/syscall_cp.s:29

1 0x00007fbef9cd54fc in __syscall_cp_c (nr=281, u=, v=, w=,

x=<optimized out>, y=<optimized out>, z=8) at src/thread/pthread_cancel.c:33

2 0x00007fbef9c9a286 in epoll_pwait (fd=7, ev=0x7fbef53e3880, cnt=4096, to=999, sigs=0x0) at src/linux/epoll.c:28

3 0x00007fbef8a74311 in swoole::ReactorEpoll::wait(timeval*) ()

from /usr/local/lib/php/extensions/no-debug-non-zts-20230831/swoole.so

4 0x00007fbef8a93722 in ?? () from /usr/local/lib/php/extensions/no-debug-non-zts-20230831/swoole.so

5 0x00007fbef8a93f53 in swoole::Server::start_reactor_processes() ()

from /usr/local/lib/php/extensions/no-debug-non-zts-20230831/swoole.so

6 0x00007fbef8a9e735 in swoole::Server::start() () from /usr/local/lib/php/extensions/no-debug-non-zts-20230831/swoole.so

7 0x00007fbef8985376 in ?? () from /usr/local/lib/php/extensions/no-debug-non-zts-20230831/swoole.so

8 0x00005577f81d530d in execute_ex ()

--Type for more, q to quit, c to continue without paging--f 1

9 0x00005577f81d7423 in zend_execute ()

10 0x00005577f8164188 in zend_execute_scripts ()

11 0x00005577f80f9c40 in php_execute_script ()

12 0x00005577f824cd66 in ?? ()

13 0x00005577f7e47551 in ?? ()

14 0x00007fbef9c966d1 in libc_start_main_stage2 (main=0x5577f7e47280, argc=3, argv=0x7ffd61235428)

at src/env/__libc_start_main.c:95

15 0x00005577f7e475ea in _start ()

(gdb) f 1

1 0x00007fbef9cd54fc in __syscall_cp_c (nr=281, u=, v=, w=,

x=<optimized out>, y=<optimized out>, z=8) at src/thread/pthread_cancel.c:33

33 in src/thread/pthread_cancel.c (gdb) f 0

0 __cp_end () at src/thread/x86_64/syscall_cp.s:29

warning: 29 src/thread/x86_64/syscall_cp.s: No such file or directory

NathanFreeman commented 1 month ago

php -m看一下扩展列表

zhuchonglin commented 1 month ago

php -m看一下扩展列表

/var/www/app # php -m [PHP Modules] Core ctype curl date dom fileinfo filter hash iconv json libxml mbstring mysqlnd openssl pcre PDO pdo_mysql pdo_sqlite Phar posix random readline redis Reflection session SimpleXML sockets sodium SPL sqlite3 standard swoole tokenizer xml xmlreader xmlwriter zlib

[Zend Modules]