swoole / swoole-src

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

swManager_check_exit_status: worker#6[pid=28156] abnormal exit, status=0, signal=11 #5132

Closed dajiangdajiang closed 1 year ago

dajiangdajiang commented 1 year ago

Please answer these questions before submitting your issue.

  1. What did you do? If possible, provide a simple script for reproducing the error. 调用自己邮件列表的接口时网络断开,通过日志查询错误提示是:WARNING swManager_check_exit_status: worker#6 abnormal exit, status=0, signal=11 。通过测试发现新用户不会出现这个问题,老用户登录后调用邮件列表接口时会出现网络断开,如果同一进程的用户也是登录状态,会一同网络断开。也试过提高swoole的版本,也没有解决问题。

[uid:1000016] 16:49:42.06305 Service/Email.php:229 handleGetList() ReqGetEmailList: []
2023-08-23 16:49:42.06348 Service/Email.php:541 update() types [1,2] [uid:1000016] 16:49:42.06352 Service/Email.php:545 update() mail forever types: [1,2]
[2023-08-23 16:49:42 $28099.0] WARNING swManager_check_exit_status: worker#6[pid=28156] abnormal exit, status=0, signal=11 A bug occurred in Swoole-v4.4.16, please report it. The Swoole developers probably don't know about it, and unless you report it, chances are it won't be fixed. You can read How to report a bug doc before submitting any bug reports:

https://github.com/swoole/swoole-src/blob/master/.github/ISSUE.md Please do not send bug reports in the mailing list or personal letters. The issue page is also suitable to submit feature requests.

16:49:42.10131 MainHandler/MainHandler.php:125 onWorkerStart() worker 6 successfully started! 16:49:42.10172 MainHandler/MainProxy.php:171 handleOperationCmd() OperationCmd::RegWorker worker_id: 6 fd: 16 16:49:43.17702 Handler/ServerHandler.php:193 handleClientMessage() user[uid: 1000016] not found and not login request [id:10002|描述:请求心跳] 2023-08-23 16:49:43.17734 Model/UserFd.php:45 closeByFd() set fd result: uid[1000016] fd[15] 1 1 16:49:43.17737 Handler/ServerHandler.php:239 closeFd() close swoole Fd[15] 16:49:43.17744 Handler/ServerHandler.php:965 handleSocketClose() Cannot find player with fd: 15 2023-08-23 16:49:43.17746 MainHandler/MainHandler.php:156 onClose() worker 6 closed! -1 16:49:43.82881 Handler/ServerHandler.php:193 handleClientMessage() user[uid: 1000036] not found and not login request [id:10002|描述:请求心跳] 2023-08-23 16:49:43.82902 Model/UserFd.php:45 closeByFd() set fd result: uid[1000036] fd[14] 1 1 16:49:43.82904 Handler/ServerHandler.php:239 closeFd() close swoole Fd[14] 16:49:43.82911 Handler/ServerHandler.php:965 handleSocketClose() Cannot find player with fd: 14 2023-08-23 16:49:43.82917 MainHandler/MainHandler.php:156 onClose() worker 6 closed! -1

  1. What did you expect to see? 期望的结果是不会出现网络断开问题。

  2. What did you see instead? 实际运行的结果是新用户登录不会出现网络断开问题,老用户登录后调用邮件列表接口时会出现网络断开,如果同一进程的用户也是登录状态,会一同网络断开。

  3. What version of Swoole are you using (show your php --ri swoole)? Swoole => enabled Author => Swoole Team team@swoole.com Version => 4.4.16 Built => Aug 22 2023 15:11:27 coroutine => enabled epoll => enabled eventfd => enabled signalfd => enabled cpu_affinity => enabled spinlock => enabled rwlock => enabled openssl => OpenSSL 1.0.2g 1 Mar 2016 http2 => enabled zlib => 1.2.8 mutex_timedlock => enabled pthread_barrier => enabled futex => enabled async_redis => enabled

Directive => Local Value => Master Value swoole.enable_coroutine => On => On swoole.enable_library => On => On 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) ? Linux JY-ESC 4.4.0-93-generic #116~14.04.1-Ubuntu SMP Mon Aug 14 16:07:05 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux

PHP 7.4.21 (cli) (built: Feb 16 2022 16:48:45) ( NTS ) Copyright (c) The PHP Group Zend Engine v3.4.0, Copyright (c) Zend Technologies with Zend OPcache v7.4.21, Copyright (c), by Zend Technologies

Using built-in specs. COLLECT_GCC=gcc COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/4.8/lto-wrapper Target: x86_64-linux-gnu Configured with: ../src/configure -v --with-pkgversion='Ubuntu 4.8.4-2ubuntu1~14.04.3' --with-bugurl=file:///usr/share/doc/gcc-4.8/README.Bugs --enable-languages=c,c++,java,go,d,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-4.8 --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --with-gxx-include-dir=/usr/include/c++/4.8 --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --enable-gnu-unique-object --disable-libmudflap --enable-plugin --with-system-zlib --disable-browser-plugin --enable-java-awt=gtk --enable-gtk-cairo --with-java-home=/usr/lib/jvm/java-1.5.0-gcj-4.8-amd64/jre --enable-java-home --with-jvm-root-dir=/usr/lib/jvm/java-1.5.0-gcj-4.8-amd64 --with-jvm-jar-dir=/usr/lib/jvm-exports/java-1.5.0-gcj-4.8-amd64 --with-arch-directory=amd64 --with-ecj-jar=/usr/share/java/eclipse-ecj.jar --enable-objc-gc --enable-multiarch --disable-werror --with-arch-32=i686 --with-abi=m64 --with-multilib-list=m32,m64,mx32 --with-tune=generic --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu Thread model: posix gcc version 4.8.4 (Ubuntu 4.8.4-2ubuntu1~14.04.3)

NathanFreeman commented 1 year ago

看看能不能按照下面的步骤贴一下错误信息 https://wiki.swoole.com/#/other/issue?id=关于段错误核心转储

dajiangdajiang commented 1 year ago

Core was generated by `main_worker_6 '. Program terminated with signal SIGSEGV, Segmentation fault.

0 0x00000000006d6aad in _zval_internal_ptr_dtor ()

(gdb) bt

0 0x00000000006d6aad in _zval_internal_ptr_dtor ()

1 0x00007fa506547840 in ?? ()

2 0x00007fa506547830 in ?? ()

3 0x00007fa506547860 in ?? ()

4 0x00007fa5050ddae2 in ?? ()

5 0x0000000000000002 in ?? ()

6 0x0000000000000005 in ?? ()

7 0x00007fa4f47623c0 in ?? ()

8 0x00007fa506547840 in ?? ()

9 0x00007fa4f47aba58 in ?? ()

10 0x0000000000000308 in ?? ()

11 0x00007fa4f47623c0 in ?? ()

12 0x00000000007478c6 in ?? ()

13 0x00007fa4f47aa010 in ?? ()

14 0x00007fa506546c70 in ?? ()

15 0x00007fa506546c20 in ?? ()

16 0x0000000002d58270 in ?? ()

17 0x0000000000748ee0 in ?? ()

18 0x0000000000000001 in ?? ()

19 0x00007fa4f47623c0 in ?? ()

20 0x0000000000000000 in ?? ()

NathanFreeman commented 1 year ago

使用gdb来跟踪swoole前,需要在php和swoole编译时添加 --enable-debug 参数以保留更多信息

matyhtf commented 1 year ago

@dajiangdajiang 升级一下版本吧