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

开启xhprof会Segmentation fault #120

Closed
chefxu opened this issue Aug 28, 2014 · 4 comments
Closed

开启xhprof会Segmentation fault #120

chefxu opened this issue Aug 28, 2014 · 4 comments

Comments

@chefxu
Copy link

chefxu commented Aug 28, 2014

我不确认属于xhprof的问题还是yaf的问题, 试了主干的代码和最新tag版本的代码, 都有这个问题。

堆栈信息如下:
Program received signal SIGSEGV, Segmentation fault.
0x00002aaaaed3e494 in hp_execute_internal (execute_data=0x7fffffffcd00, fci=0x7fffffffcf10, ret=1) at /data/source/xhprof-0.9.4/extension/xhprof.c:1708
1708 temp_variable *retvar = &EX_T(opline->result.var);
(gdb) bt
#0 0x00002aaaaed3e494 in hp_execute_internal (execute_data=0x7fffffffcd00, fci=0x7fffffffcf10, ret=1) at /data/source/xhprof-0.9.4/extension/xhprof.c:1708
#1 0x000000000085d4ed in zend_call_function (fci=0x7fffffffcf10, fci_cache=0x7fffffffcea0) at /home/php-5.5.16/Zend/zend_execute_API.c:957
#2 0x0000000000892945 in zend_call_method (object_pp=0x7fffffffd010, obj_ce=0x114d460, fn_proxy=0x7fffffffd018, function_name=0xc97c9e "__destruct", function_name_len=10,

retval_ptr_ptr=0x0, param_count=0, arg1=0x0, arg2=0x0) at /home/php-5.5.16/Zend/zend_interfaces.c:97

#3 0x00000000008a35eb in zend_objects_destroy_object (object=0x2aaaaab0c210, handle=1) at /home/php-5.5.16/Zend/zend_objects.c:123
#4 0x00000000008a9db5 in zend_objects_store_call_destructors (objects=0xfc4000) at /home/php-5.5.16/Zend/zend_objects_API.c:57
#5 0x000000000085a2ee in shutdown_destructors () at /home/php-5.5.16/Zend/zend_execute_API.c:219
#6 0x0000000000870739 in zend_call_destructors () at /home/php-5.5.16/Zend/zend.c:919
#7 0x00000000007d9e4e in php_request_shutdown (dummy=0x0) at /home/php-5.5.16/main/main.c:1750
#8 0x000000000091e7ec in do_cli (argc=2, argv=0xfc5810) at /home/php-5.5.16/sapi/cli/php_cli.c:1177
#9 0x000000000091ef5f in main (argc=2, argv=0xfc5810) at /home/php-5.5.16/sapi/cli/php_cli.c:1378

@chefxu
Copy link
Author

chefxu commented Aug 28, 2014

重现代码如下:

function main() {
echo "hello,world\n";
xhprof_enable(XHPROF_FLAGS_CPU + XHPROF_FLAGS_MEMORY);
}
$application = new Yaf_Application($config);
$application->execute('main');

@laruence
Copy link
Owner

这个不是Yaf的问题, 是xhprof的问题, 我曾经给他们提交过这个问题的patch, 应该他们最新版已经修复了吧.
phacility/xhprof#32

@chefxu
Copy link
Author

chefxu commented Aug 28, 2014

xhprof主干上的代码还是有问题, 不过用了patch后ok了, 多谢帮助!

@chefxu chefxu closed this as completed Aug 28, 2014
@fffddgx
Copy link

fffddgx commented Aug 18, 2015

最新版依然有问题,下鸟哥的分支可以正常运行。
git clone https://github.com/laruence/xhprof.git

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