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

特定场景 引入 3.3.2 程序崩溃 #542

Open
vergil1989 opened this issue Mar 23, 2021 · 2 comments
Open

特定场景 引入 3.3.2 程序崩溃 #542

vergil1989 opened this issue Mar 23, 2021 · 2 comments

Comments

@vergil1989
Copy link

出现问题的场景:
业务中有个选择地区的功能,程序实现了一个省市区的树,在 yaf里会崩溃,单独用同样的数据是正常的。
Yaf 版本:
yaf support => enabled
Version => 3.3.2
Supports => http://pecl.php.net/package/yaf

Directive => Local Value => Master Value
yaf.library =>
yaf.environ => product => product
yaf.forward_limit => 5 => 5
yaf.use_namespace => 1 => 1
yaf.action_prefer => 1 => 1
yaf.lowcase_path => 0 => 0
yaf.use_spl_autoload => 1 => 1
yaf.name_suffix => 1 => 1
yaf.name_separator => no value => no value

gdb 分析结果:
在业务里的 coredump 如下:

#0 0x0000000000000000 in ?? ()
#1 0x0000564ac3cf4e1b in zend_gc_collect_cycles ()
#2 0x0000564ac3cf3dc8 in gc_possible_root_when_full ()
#3 0x0000564ac3d40562 in ZEND_ASSIGN_REF_SPEC_CV_VAR_HANDLER ()
#4 0x0000564ac3d4dcb2 in execute_ex ()
#5 0x00007f4ae8381bd6 in yaf_do_call_user_method (ret=0x7ffc14cf1eb0, fbc=, call=0x7f4b00814130) at /src/ext/yaf-src/yaf.c:223
#6 yaf_call_user_method_with_0_arguments (obj=, fbc=fbc@entry=0x7f4b0080e5b0, ret=ret@entry=0x7ffc14cf1eb0) at /src/ext/yaf-src/yaf.c:308
#7 0x00007f4ae838280e in yaf_controller_execute (ctl=0x7ffc14cf1ea0, ret=0x7ffc14cf1eb0, args=0x0, count=, func=0x7f4b0080e5b0) at /src/ext/yaf-src/yaf_controller.h:67
#8 yaf_dispatcher_handle (dispatcher=0x7f4b008148e0, dispatcher@entry=0x7f4b0085b180) at /src/ext/yaf-src/yaf_dispatcher.c:637
#9 0x00007f4ae8383198 in yaf_dispatcher_dispatch (dispatcher=0x7f4b0085b180) at /src/ext/yaf-src/yaf_dispatcher.c:803
#10 0x00007f4ae8384f04 in zim_yaf_application_run (execute_data=, return_value=0x7ffc14cf1fc0) at /src/ext/yaf-src/yaf_application.c:812
#11 0x0000564ac3d55a00 in execute_ex ()
#12 0x0000564ac3d56611 in zend_execute ()
#13 0x0000564ac3ccf683 in zend_execute_scripts ()
#14 0x0000564ac3c6de40 in php_execute_script ()
#15 0x0000564ac3ad8dd9 in main ()

测试脚本 coredump 分析结果:
#0 0x0000000000000000 in ?? ()
#1 0x0000564ac3cf4e1b in zend_gc_collect_cycles ()
#2 0x0000564ac3cf3dc8 in gc_possible_root_when_full ()
#3 0x0000564ac3d40562 in ZEND_ASSIGN_REF_SPEC_CV_VAR_HANDLER ()
#4 0x0000564ac3d4dcb2 in execute_ex ()
#5 0x0000564ac3d56611 in zend_execute ()

#6 0x0000564ac3ccf683 in zend_execute_scripts ()
#7 0x0000564ac3c6de40 in php_execute_script ()
#8 0x0000564ac3ad8dd9 in main ()

结果有点不一样,不过同样的数据不引入yaf 框架是没问题的,测试脚本在附件里,麻烦鸟哥帮看一下是什么原因、

test.php.zip

@laruence
Copy link
Owner

PHP是什么版本,是否启用了opcache,操作系统是啥? (我这边7.3的php,ubuntu复现不了

@vergil1989
Copy link
Author

vergil1989 commented Mar 23, 2021

7.4.15
开启了opcache
操作系统centos 7.6

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