Skip to content
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

Hyperf DB Model Query data error (occasionally),Server::check_worker_exit_status() #5057

Open
magicento opened this issue May 19, 2023 · 2 comments

Comments

@magicento
Copy link

  1. What did you do? If possible, provide a simple script for reproducing the error.

基于hyperf的框架编写了一个数据库模型,联表查询一组数据;

OS: Darwin 22.4.0 Darwin Kernel Version 22.4.0: Mon Mar 6 21:00:17 PST 2023; root:xnu-8796.101.5~3/RELEASE_X86_64 x86_64
GCC_VERSION: Apple LLVM 14.0.0 (clang-1400.0.29.202)
PHP_VERSION : 8.1.12

  1. What did you expect to see?

[2023-05-20 07:20:36 $12089.0] WARNING Server::check_worker_exit_status(): worker(pid=12102, id=11) abnormal exit, status=0, signal=11
A bug occurred in Swoole-v5.0.1, 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.

OS: Darwin 22.4.0 Darwin Kernel Version 22.4.0: Mon Mar 6 21:00:17 PST 2023; root:xnu-8796.101.5~3/RELEASE_X86_64 x86_64
GCC_VERSION: Apple LLVM 14.0.0 (clang-1400.0.29.202)
PHP_VERSION : 8.1.12

  1. What did you see instead?

无结果,但是这个问题不是每次都会出现,比如相同的接口相同的参数在执行错误后,重新执行有50%的概率运行正常;

  1. What version of Swoole are you using (php --ri swoole)?

php --ri swoole ─╯

swoole

Swoole => enabled
Author => Swoole Team [email protected]
Version => 5.0.1
Built => Jan 11 2023 17:47:37
coroutine => enabled with boost asm context
kqueue => enabled
rwlock => enabled
http2 => enabled
json => enabled
pcre => enabled
zlib => 1.2.11
brotli => E16777225/D16777225
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 => Off => Off
swoole.unixsock_buffer_size => 262144 => 262144

  1. What is your machine environment used (including the version of kernel & php & gcc)?
    uname -a ─╯
    Darwin KuangShen.local 22.4.0 Darwin Kernel Version 22.4.0: Mon Mar 6 21:00:17 PST 2023; root:xnu-8796.101.5~3/RELEASE_X86_64 x86_64

php -v ─╯
PHP 8.1.12 (cli) (built: Oct 30 2022 12:55:34) (NTS)
Copyright (c) The PHP Group
Zend Engine v4.1.12, Copyright (c) Zend Technologies
with Zend OPcache v8.1.12, Copyright (c), by Zend Technologies

gcc -v ─╯
Apple clang version 14.0.3 (clang-1403.0.22.14.1)
Target: x86_64-apple-darwin22.4.0
Thread model: posix
InstalledDir: /Library/Developer/CommandLineTools/usr/bin

@NathanFreeman
Copy link
Member

这边看看能不能提供一下执行信息
https://wiki.swoole.com/#/other/issue?id=关于段错误核心转储

@wilbur-yu
Copy link

这边看看能不能提供一下执行信息 https://wiki.swoole.com/#/other/issue?id=关于段错误核心转储

GNU gdb (GDB) Red Hat Enterprise Linux 7.6.1-120.el7
Copyright (C) 2013 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later http://gnu.org/licenses/gpl.html
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-redhat-linux-gnu".
For bug reporting instructions, please see:
http://www.gnu.org/software/gdb/bugs/...
Reading symbols from /usr/local/php/bin/php...done.
[New LWP 6822]
[New LWP 6842]
[New LWP 6843]
Missing separate debuginfo for /lib/libpng15.so.15
Try: yum --enablerepo='debug' install /usr/lib/debug/.build-id/9d/ce7a7cadc13c5d4a9bd1004943f0f391f01af7.debug
Missing separate debuginfo for /lib/libjpeg.so.62
Try: yum --enablerepo='debug' install /usr/lib/debug/.build-id/c8/003de0c1c7d588561b35d5456d5e592177af2e.debug
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/usr/lib64/libthread_db.so.1".
Core was generated by `api-server.Worker'.
Program terminated with signal 11, Segmentation fault.
#0 std::function<void (swoole::PHPContext*)>::operator()(swoole::PHPContext*) const (this=0x1, __args#0=0x7f1448d0f030)
at /usr/include/c++/4.8.2/functional:2469
2469 if (_M_empty())
Missing separate debuginfos, use: debuginfo-install bzip2-libs-1.0.6-13.el7.x86_64 c-ares-1.10.0-3.el7.x86_64 cyrus-sasl-lib-2.1.26-24.el7_9.x86_64 glibc-2
.17-324.el7_9.x86_64 keyutils-libs-1.5.8-3.el7.x86_64 krb5-libs-1.15.1-55.el7_9.x86_64 libcom_err-1.42.9-19.el7.x86_64 libcurl-7.84.0-3.0.cf.rhel7.x86_64 l
ibgcc-4.8.5-44.el7.x86_64 libgcrypt-1.5.3-14.el7.x86_64 libgpg-error-1.12-3.el7.x86_64 libicu-50.2-4.el7_7.x86_64 libidn2-2.3.3-1.el7.x86_64 libnghttp2-1.3
3.0-1.1.el7.x86_64 libpsl-0.20.2-6.el7.x86_64 libselinux-2.5-15.el7.x86_64 libssh2-1.10.0-4.0.cf.rhel7.x86_64 libstdc++-4.8.5-44.el7.x86_64 libunistring-0.
9.3-9.el7.x86_64 libwebp-0.3.0-11.el7.x86_64 libxml2-2.9.1-6.el7_9.6.x86_64 libxslt-1.1.28-6.el7.x86_64 nspr-4.34.0-3.1.el7_9.x86_64 nss-3.79.0-4.el7_9.x86
_64 nss-softokn-freebl-3.79.0-4.el7_9.x86_64 nss-util-3.79.0-1.el7_9.x86_64 oniguruma-6.8.2-2.el7.x86_64 openldap-2.4.44-25.el7_9.x86_64 openssl-libs-1.0.2
k-26.el7_9.x86_64 pcre-8.32-17.el7.x86_64 sqlite-3.7.17-8.el7_7.1.x86_64 wlibsodium-1.0.17-1.el7.x86_64 xz-libs-5.2.2-2.el7_9.x86_64 zlib-1.2.7-21.el7_9.x8
6_64
(gdb) bt
#0 std::function<void (swoole::PHPContext*)>::operator()(swoole::PHPContext*) const (this=0x1, __args#0=0x7f1448d0f030)
at /usr/include/c++/4.8.2/functional:2469
#1 0x00007f1449cb80e4 in swoole::PHPCoroutine::on_resume (arg=0x7f1448d0f030) at /root/mysoft/swoole-v5.0.3/ext-src/swoole_coroutine.cc:542
#2 0x00007f1449d557c7 in swoole::Coroutine::resume (this=0x1bb4920) at /root/mysoft/swoole-v5.0.3/src/coroutine/base.cc:113
#3 0x00007f1449d543e4 in operator() (__args#1=0x1bb4880, __args#0=0x1bb4a50, this=0x1bb48c0) at /usr/include/c++/4.8.2/functional:2471
#4 swoole::Timer::select (this=0x1bb4a50) at /root/mysoft/swoole-v5.0.3/src/core/timer.cc:212
#5 0x00007f1449da0be1 in operator() (__args#0=0x1ba7d80, this=0x1bb6ba8) at /usr/include/c++/4.8.2/functional:2471
#6 swoole::Reactor::execute_end_callbacks (this=0x1ba7d80, timedout=timedout@entry=true) at /root/mysoft/swoole-v5.0.3/src/reactor/base.cc:403
#7 0x00007f1449da2aaa in swoole::ReactorEpoll::wait (this=0x1ba8210, timeo=) at /root/mysoft/swoole-v5.0.3/src/reactor/epoll.cc:184
#8 0x00007f1449dcb0f1 in wait (this=0x1ba7d80, timeout=0x0) at /root/mysoft/swoole-v5.0.3/include/swoole_reactor.h:163
#9 swoole::Server::start_event_worker (this=this@entry=0x1890150, worker=worker@entry=0x7f145b3ff008)
at /root/mysoft/swoole-v5.0.3/src/server/worker.cc:468
#10 0x00007f1449da8d9b in swoole::Server::spawn_event_worker (this=0x1890150, worker=0x7f145b3ff008)
at /root/mysoft/swoole-v5.0.3/src/server/manager.cc:614
#11 0x00007f1449dab179 in operator() (__closure=0x1ba7cb0) at /root/mysoft/swoole-v5.0.3/src/server/manager.cc:129
#12 std::_Function_handler<void(), swoole::Server::start_manager_process()::__lambda0>::_M_invoke(const std::_Any_data &) (__functor=...)
at /usr/include/c++/4.8.2/functional:2071
#13 0x00007f1449d4b7af in operator() (this=0x7fffddc33c00) at /usr/include/c++/4.8.2/functional:2471
#14 swoole_fork_exec(std::function<void ()> const&) (fn=...) at /root/mysoft/swoole-v5.0.3/src/core/base.cc:370
#15 0x00007f1449daaad7 in swoole::Server::start_manager_process (this=) at /root/mysoft/swoole-v5.0.3/src/server/manager.cc:151
#16 0x00007f1449dbeaf7 in swoole::ProcessFactory::start (this=0x1ba4590) at /root/mysoft/swoole-v5.0.3/src/server/process.cc:62
#17 0x00007f1449db391b in swoole::Server::start (this=this@entry=0x1890150) at /root/mysoft/swoole-v5.0.3/src/server/master.cc:690
#18 0x00007f1449d307f9 in zim_swoole_server_start (execute_data=, return_value=0x7fffddc33d70)
at /root/mysoft/swoole-v5.0.3/ext-src/swoole_server.cc:2573
#19 0x0000000000845837 in ZEND_DO_FCALL_SPEC_RETVAL_UNUSED_HANDLER () at /root/mysoft/lnmp1.9/src/php-8.1.19/Zend/zend_vm_execute.h:1761
#20 execute_ex (ex=0x1) at /root/mysoft/lnmp1.9/src/php-8.1.19/Zend/zend_vm_execute.h:55807
#21 0x0000000000845ada in zend_execute (op_array=0x7f1451075700, return_value=)
at /root/mysoft/lnmp1.9/src/php-8.1.19/Zend/zend_vm_execute.h:60151
#22 0x00000000007debb0 in zend_execute_scripts (type=1359038048, type@entry=8, retval=retval@entry=0x0, file_count=file_count@entry=3)
at /root/mysoft/lnmp1.9/src/php-8.1.19/Zend/zend.c:1846
#23 0x000000000077c8ad in php_execute_script (primary_file=primary_file@entry=0x7fffddc36180) at /root/mysoft/lnmp1.9/src/php-8.1.19/main/main.c:2542
#24 0x00000000008b6d0e in do_cli (argc=3, argv=0x17a51a0) at /root/mysoft/lnmp1.9/src/php-8.1.19/sapi/cli/php_cli.c:965
#25 0x0000000000465b71 in main (argc=3, argv=0x17a51a0) at /root/mysoft/lnmp1.9/src/php-8.1.19/sapi/cli/php_cli.c:1367
(gdb) f 1
#1 0x00007f1449cb80e4 in swoole::PHPCoroutine::on_resume (arg=0x7f1448d0f030) at /root/mysoft/swoole-v5.0.3/ext-src/swoole_coroutine.cc:542
542 (task->on_resume)(task);
(gdb) f 0
#0 std::function<void (swoole::PHPContext
)>::operator()(swoole::PHPContext*) const (this=0x1, __args#0=0x7f1448d0f030)
at /usr/include/c++/4.8.2/functional:2469
2469 if (_M_empty())
(gdb)

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

No branches or pull requests

3 participants