我正在调试我的 php 应用程序中的段错误,我使用--enable-debug
选项编译 php,并且在段错误期间 php-fpm 转储核心之后,我运行:
$ gdb /usr/local/sbin/php-fpm core
GNU gdb (GDB) 7.12.1
Copyright (C) 2017 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-alpine-linux-musl".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from /usr/local/sbin/php-fpm...(no debugging symbols found)...done.
[New LWP 2110]
warning: Can't read pathname for load map: No error information.
Core was generated by `php-fpm:'.
Program terminated with signal SIGBUS, Bus error.
#0 0x000055c27ba1f291 in ?? ()
(gdb) bt
#0 0x000055c27ba1f291 in ?? ()
#1 0x000055c27ba21bce in _efree ()
#2 0x000055c27ba6c8b2 in ?? ()
#3 0x000055c27ba70cee in zend_array_destroy ()
#4 0x000055c27ba56fbd in _zval_dtor_func ()
#5 0x000055c27ba6cce4 in ?? ()
#6 0x000055c27ba70cc8 in zend_array_destroy ()
#7 0x000055c27ba56fbd in _zval_dtor_func ()
#8 0x000055c27ba6cce4 in ?? ()
#9 0x000055c27ba70c8a in zend_array_destroy ()
#10 0x000055c27ba56fbd in _zval_dtor_func ()
#11 0x000055c27ba6cce4 in ?? ()
#12 0x000055c27ba70cc8 in zend_array_destroy ()
#13 0x000055c27ba56fbd in _zval_dtor_func ()
#14 0x000055c27ba44b75 in ?? ()
#15 0x000055c27ba450fe in zend_cleanup_user_class_data ()
#16 0x000055c27ba3f473 in ?? ()
#17 0x000055c27ba5971b in zend_deactivate ()
#18 0x000055c27b9bf1df in php_request_shutdown ()
#19 0x000055c27bb55015 in ?? ()
#20 0x00007f7fb743e964 in __libc_start_main () from /lib/ld-musl-x86_64.so.1
#21 0x0000000000000000 in ?? ()
我还将.gdbinit
php 源代码放入包含核心文件的目录并设置set auto-load safe-path /
为~/.gdbinit
(虽然不确定它有什么帮助)。
如您所见??
,回溯中根本没有帮助。这是应该的吗?有没有办法得到真正的来电者?