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

FIX: php-fpm worker core dump BUG #231

Closed
wants to merge 1 commit into from
Closed

FIX: php-fpm worker core dump BUG #231

wants to merge 1 commit into from

Conversation

fznply
Copy link

@fznply fznply commented Dec 26, 2015

前两天我从pecl下载了yaf-3.0.1(原先一直在使用yaf-3.0.0没有出现问题),突然就出现了nginx502。跟踪发现zval_ptr_dtor操作了一个空指针,现在增加了判断是否为空。不知对否,还请指教。

@laruence
Copy link
Owner

嗯, 看起来确实应该会有问题。 我想想, thanks :)

@laruence
Copy link
Owner

我提交了一个patch, 你验证下?

@fznply
Copy link
Author

fznply commented Dec 27, 2015

[ksufa@localhost public]$ gdb ~/softs/php70/sbin/php-fpm core.21053
GNU gdb (GDB) 7.6.2
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-unknown-linux-gnu".
For bug reporting instructions, please see:
http://www.gnu.org/software/gdb/bugs/...
Reading symbols from /home/xiaoju/softs/php70/sbin/php-fpm...done.
[New LWP 21053]

warning: Can't read pathname for load map: 输入/输出错误.
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".
Core was generated by `php-fpm: pool www '.
Program terminated with signal 11, Segmentation fault.
#0 0x00007f25a689e202 in zend_string_release (s=0x7f25a687ddd0)
at /home/xiaoju/softs/php70/include/php/Zend/zend_string.h:270
270 if (--GC_REFCOUNT(s) == 0) {
(gdb) up
#1 0x00007f25a689e7d0 in yaf_request_set_base_uri (request=0x7ffef2357bd0, base_uri=0x0,
request_uri=0x7f25acc02660) at /home/ksufa/Documents/yaf/yaf_request.c:171
171 zend_string_release(basename);
(gdb) where
#0 0x00007f25a689e202 in zend_string_release (s=0x7f25a687ddd0)
at /home/xiaoju/softs/php70/include/php/Zend/zend_string.h:270
#1 0x00007f25a689e7d0 in yaf_request_set_base_uri (request=0x7ffef2357bd0, base_uri=0x0,
request_uri=0x7f25acc02660) at /home/ksufa/Documents/yaf/yaf_request.c:171
#2 0x00007f25a68a2685 in yaf_request_http_instance (this_ptr=0x7ffef2357bd0, request_uri=0x0,
base_uri=0x0) at /home/ksufa/Documents/yaf/requests/yaf_request_http.c:138
#3 0x00007f25a689e278 in yaf_request_instance (this_ptr=0x7ffef2357bd0, request_uri=0x0)
at /home/ksufa/Documents/yaf/yaf_request.c:86
#4 0x00007f25a688dc2f in zim_yaf_application___construct (execute_data=0x7f25acc170d0,
return_value=0x7f25acc170b0) at /home/ksufa/Documents/yaf/yaf_application.c:339
#5 0x0000000000a33a82 in ZEND_DO_FCALL_SPEC_HANDLER ()
at /home/ksufa/Documents/php-7.0.1/Zend/zend_vm_execute.h:842
#6 0x0000000000a32936 in execute_ex (ex=0x7f25acc17030)
at /home/ksufa/Documents/php-7.0.1/Zend/zend_vm_execute.h:414
#7 0x0000000000a32a48 in zend_execute (op_array=0x7f25acc77000, return_value=0x0)
at /home/ksufa/Documents/php-7.0.1/Zend/zend_vm_execute.h:458
#8 0x00000000009d8b7f in zend_execute_scripts (type=8, retval=0x0, file_count=3)
at /home/ksufa/Documents/php-7.0.1/Zend/zend.c:1428
#9 0x000000000094bcd9 in php_execute_script (primary_file=0x7ffef235a280)
at /home/ksufa/Documents/php-7.0.1/main/main.c:2471
#10 0x0000000000aa52bd in main (argc=5, argv=0x7ffef235a498)
at /home/ksufa/Documents/php-7.0.1/sapi/fpm/fpm/fpm_main.c:1944
(gdb)

@laruence
Copy link
Owner

你是用我GitHub上最新的代码么?

@fznply
Copy link
Author

fznply commented Dec 27, 2015

应该是的,我刚看了看log,最后一个commit 6fbafbc

@laruence
Copy link
Owner

@fznply 嗯, 我又提交了一个, 你再试试?

@fznply
Copy link
Author

fznply commented Dec 27, 2015

我本地环境初步测试通过,需要带着业务逻辑里再测试一下

@fznply
Copy link
Author

fznply commented Dec 27, 2015

现在都正常了,暂时没有发现问题~ pecl上发布的3.0.1会更新吗?

@laruence
Copy link
Owner

好的, 你如果测试没问题, 我就发个新版本的包

@fznply
Copy link
Author

fznply commented Dec 27, 2015

主要业务逻辑都跑了一遍,暂时没有发现问题。感到很惊奇啊,你处理反馈问题的速度真快

@laruence
Copy link
Owner

那你再跑跑看, 我也尝试写点测试用例覆盖这些cases, 然后再发布

@laruence laruence closed this Jul 6, 2016
@xinhaiz xinhaiz mentioned this pull request Dec 12, 2019
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

Successfully merging this pull request may close these issues.

2 participants