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
启动http server后,发起请求无响应 #4818
Comments
ps -eLlf |grep moac_serve
|
strace -p
|
gdb attach 31626
|
gdb attach 31625
|
需要看一下代码,有可能是因为死锁的缘故 |
现象是偶发的,ctrl+c 掉重启就是正常的。 |
所有的自定义进程都能正常工作,reactor 线程出的问题。跟我代码没关系吧? |
更新 4.8.11 再看是否还有问题 |
有可能是因为线程池全部陷入锁冲突,导致worker进程没法投递任务。 |
还未更新,生产环境是k8s,问题出现在偶然一次弹性扩容后,发现端口起来了但是客户端发起的部分请求无响应。 |
我似乎看到了mongodb。。。也许是这个引起的死锁? |
为何怀疑mongodb引起死锁呢? |
mongodb扩展不支持swoole协程化,有死锁可能,当然只是怀疑 |
自定义进程里面的mongoDb client 还能正常工作
|
\241\0\0\0\2insert\0\26\0\0\0access_log_2022_ |
gdb attch 之后输入 bt 查看堆栈。flock 表示等待文件锁,进程发生了死锁问题,需要分析一下死锁原因 |
#0 0x00007fb77fd7c427 in flock () from /lib/x86_64-linux-gnu/libc.so.6 早上用Coroutine\Http\Client 开启ssl请求了下9501端口无响应,gdb 之后输入bt 得到以上结果 |
@GetLuckyBox 请使用 4.8.12 版本进行测试,已解决此问题。 |
Please answer these questions before submitting your issue.
What did you do? If possible, provide a simple script for reproducing the error.
What did you expect to see?
hyperf框架启动后,访问http://127.0.0.1:9501 可以正常响应
hyperf框架启动后,访问http://127.0.0.1:9501 无响应
strace -p master进程下线程出现 flock(39, LOCK_EX
php --ri swoole
)?swoole
Swoole => enabled
Author => Swoole Team team@swoole.com
Version => 4.8.5
Built => Jun 16 2022 17:50:43
coroutine => enabled with boost asm context
epoll => enabled
eventfd => enabled
signalfd => enabled
cpu_affinity => enabled
spinlock => enabled
rwlock => enabled
openssl => OpenSSL 1.1.1n 15 Mar 2022
dtls => enabled
http2 => enabled
curl-native => enabled
zlib => 1.2.11
mutex_timedlock => enabled
pthread_barrier => enabled
futex => enabled
mysqlnd => 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 => Off => Off
swoole.unixsock_buffer_size => 8388608 => 8388608
uname -a
&php -v
&gcc -v
) ?Linux e3625cc15baa 5.10.16.3-microsoft-standard-WSL2 #1 SMP Fri Apr 2 22:23:49 UTC 2021 x86_64 GNU/Linux
PHP 7.4.27 (cli) (built: Dec 21 2021 21:31:45) ( NTS )
Copyright (c) The PHP Group
Zend Engine v3.4.0, Copyright (c) Zend Technologies
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/10/lto-wrapper
OFFLOAD_TARGET_NAMES=nvptx-none:amdgcn-amdhsa:hsa
OFFLOAD_TARGET_DEFAULT=1
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Debian 10.2.1-6' --with-bugurl=file:///usr/share/doc/gcc-10/README.Bugs --enable-languages=c,ada,c++,go,brig,d,fortran,objc,obj-c++,m2 --prefix=/usr --with-gcc-major-version-only --program-suffix=-10 --program-prefix=x86_64-linux-gnu- --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --enable-bootstrap --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-vtable-verify --enable-plugin --enable-default-pie --with-system-zlib --enable-libphobos-checking=release --with-target-system-zlib=auto --enable-objc-gc=auto --enable-multiarch --disable-werror --with-arch-32=i686 --with-abi=m64 --with-multilib-list=m32,m64,mx32 --enable-multilib --with-tune=generic --enable-offload-targets=nvptx-none=/build/gcc-10-Km9U7s/gcc-10-10.2.1/debian/tmp-nvptx/usr,amdgcn-amdhsa=/build/gcc-10-Km9U7s/gcc-10-10.2.1/debian/tmp-gcn/usr,hsa --without-cuda-driver --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu --with-build-config=bootstrap-lto-lean --enable-link-mutex
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 10.2.1 20210110 (Debian 10.2.1-6)
The text was updated successfully, but these errors were encountered: