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

swoole-1.8.0-stable 发现 segfault 问题! #509

Closed
designinlife opened this issue Jan 29, 2016 · 4 comments
Closed

swoole-1.8.0-stable 发现 segfault 问题! #509

designinlife opened this issue Jan 29, 2016 · 4 comments

Comments

@designinlife
Copy link

swoole-1.8.0-stable 出现如下问题:
使用 ulimit -c unlimited 命令之后没有发现 core 文件信息.

Jan 29 11:01:20 centos-vps-104 kernel: show_signal_msg: 5392 callbacks suppressed
Jan 29 11:01:20 centos-vps-104 kernel: php[6518]: segfault at 7f174881afa8 ip 00007f17a14b5e10 sp 00007ffccd0ef278 error 4 in swoole.so[7f17a147f000+6b000]
Jan 29 11:01:20 centos-vps-104 kernel: php[6520]: segfault at 7f174881afa8 ip 00007f17a14b5e10 sp 00007ffccd0ef278 error 4 in swoole.so[7f17a147f000+6b000]
Jan 29 11:01:20 centos-vps-104 kernel: php[6522]: segfault at 7f174881afa8 ip 00007f17a14b5e10 sp 00007ffccd0ef278 error 4 in swoole.so[7f17a147f000+6b000]
Jan 29 11:01:20 centos-vps-104 kernel: php[6524]: segfault at 7f174881afa8 ip 00007f17a14b5e10 sp 00007ffccd0ef278 error 4 in swoole.so[7f17a147f000+6b000]
Jan 29 11:01:20 centos-vps-104 kernel: php[6527]: segfault at 7f174881afa8 ip 00007f17a14b5e10 sp 00007ffccd0ef278 error 4 in swoole.so[7f17a147f000+6b000]
Jan 29 11:01:20 centos-vps-104 kernel: php[6529]: segfault at 7f174881afa8 ip 00007f17a14b5e10 sp 00007ffccd0ef278 error 4 in swoole.so[7f17a147f000+6b000]
Jan 29 11:01:20 centos-vps-104 kernel: php[6531]: segfault at 7f174881afa8 ip 00007f17a14b5e10 sp 00007ffccd0ef278 error 4 in swoole.so[7f17a147f000+6b000]
Jan 29 11:01:20 centos-vps-104 kernel: php[6523]: segfault at 7f174881afa8 ip 00007f17a14b5e10 sp 00007ffccd0ef278 error 4 in swoole.so[7f17a147f000+6b000]
Jan 29 11:01:20 centos-vps-104 kernel: php[6530]: segfault at 7f174881afa8 ip 00007f17a14b5e10 sp 00007ffccd0ef278 error 4 in swoole.so[7f17a147f000+6b000]
Jan 29 11:01:20 centos-vps-104 kernel: php[6533]: segfault at 7f174881afa8 ip 00007f17a14b5e10 sp 00007ffccd0ef278 error 4 in swoole.so[7f17a147f000+6b000]

@matyhtf
Copy link
Member

matyhtf commented Jan 29, 2016

http://wiki.swoole.com/wiki/page/10.html
http://wiki.swoole.com/wiki/page/p-server/sysctl.html

按照上面的方法调整一下,抓取core信息

@matyhtf
Copy link
Member

matyhtf commented Feb 25, 2016

1.8.x 分支目前确实存在一些问题,最新版本已经修复。

@matyhtf matyhtf closed this as completed Feb 25, 2016
@designinlife
Copy link
Author

发现部分机器会有问题!

查看 /var/log/messages 日志显示:
Feb 25 12:33:53 localhost kernel: php[1088]: segfault at 8c ip 00007f318c5ca5d0 sp 00007f3136b3dd20 error 4 in swoole.so[7f318c583000+6b000]

gdb 堆栈信息如下:
GNU gdb (GDB) Red Hat Enterprise Linux 7.6.1-80.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 1088]
[New LWP 1091]
[New LWP 1083]
[New LWP 1085]
[New LWP 1089]
[New LWP 1086]
[New LWP 1090]
[New LWP 1092]
[New LWP 1087]
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/usr/lib64/libthread_db.so.1".
Core was generated by `/usr/bin/php app-server.php'.
Program terminated with signal 11, Segmentation fault.
#0 swReactorThread_set_protocol (serv=serv@entry=0x32ce1b0, reactor=reactor@entry=0x7f3189d72fc0) at /data/downloads/exts/swoole-1.8.1/src/network/ReactorThread.c:783
783 if (swSocket_is_dgram(ls->type))
Missing separate debuginfos, use: debuginfo-install bzip2-libs-1.0.6-13.el7.x86_64 cyrus-sasl-lib-2.1.26-20.el7_2.x86_64 glibc-2.17-106.el7_2.4.x86_64 keyutils-libs-1.5.8-3.el7.x86_64 krb5-libs-1.13.2-10.el7.x86_64 libcom_err-1.42.9-7.el7.x86_64 libcurl-7.29.0-25.el7.centos.x86_64 libevent-2.0.21-4.el7.x86_64 libgcc-4.8.5-4.el7.x86_64 libicu-50.1.2-15.el7.x86_64 libidn-1.28-4.el7.x86_64 libmcrypt-2.5.8-13.el7.x86_64 libselinux-2.2.2-6.el7.x86_64 libsodium-1.0.5-1.el7.x86_64 libssh2-1.4.3-10.el7.x86_64 libstdc++-4.8.5-4.el7.x86_64 libtool-ltdl-2.4.2-21.el7_2.x86_64 libxml2-2.9.1-6.el7_2.2.x86_64 nspr-4.10.8-2.el7_1.x86_64 nss-3.19.1-19.el7_2.x86_64 nss-softokn-freebl-3.16.2.3-13.el7_1.x86_64 nss-util-3.19.1-4.el7_1.x86_64 openldap-2.4.40-8.el7.x86_64 openssl-libs-1.0.1e-51.el7_2.2.x86_64 pcre-8.32-15.el7.x86_64 xz-libs-5.1.2-12alpha.el7.x86_64 zlib-1.2.7-15.el7.x86_64

(gdb) bt
#0 swReactorThread_set_protocol (serv=serv@entry=0x32ce1b0, reactor=reactor@entry=0x7f3189d72fc0) at /data/downloads/exts/swoole-1.8.1/src/network/ReactorThread.c:783
#1 0x00007f318c5ca716 in swReactorThread_loop_stream (param=) at /data/downloads/exts/swoole-1.8.1/src/network/ReactorThread.c:1090
#2 0x00007f3196d7ddc5 in start_thread () from /usr/lib64/libpthread.so.0
#3 0x00007f319728b28d in clone () from /usr/lib64/libc.so.6

@matyhtf
Copy link
Member

matyhtf commented Feb 25, 2016

可以先用1.7.22版本,1.8.x需要再迭代几个版本才会比较稳定。

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

2 participants