分析 Apache/PHP 核心转储
我偶尔会从 apache 收到 Seg 错误,因此我在服务器上启用了核心转储,以尝试找出发生了什么情况。昨晚我又得到了一个,并试图检查核心转储以找出发生了什么。这绝对是一个 PHP 进程,所以我在 Google 上搜索了如何专门针对 PHP 检查这些进程。我下载了 PHP 5.2 的 .gdbinit 文件,并在转储文件上运行了以下命令:
$ gdb apache2 dumpfile
[reading/loading symbols]
(gdb) bt
[...backtrace...]
(gdb) source ~/.gdbinit
(gdb) dump_bt executor_globals.current_execute_data
Attempt to extract a component of a value that is not a structure.
对于导致 seg 错误的 PHP 脚本,我应该在 dump_bt executor_globals.current_execute_data
之后获得回溯,但我保留改为尝试提取不是结构的值的组件。
。
I have been getting the occasional Seg Fault from apache so I enabled core dump on my servers to try to figure out what is going on. Last night I got another one and was trying to examine the core dump to find out what's going on. It's definitely a PHP process so I Googled how to examine these specifically for PHP. I downloaded the .gdbinit file for PHP 5.2 and I ran the following on the dump file:
$ gdb apache2 dumpfile
[reading/loading symbols]
(gdb) bt
[...backtrace...]
(gdb) source ~/.gdbinit
(gdb) dump_bt executor_globals.current_execute_data
Attempt to extract a component of a value that is not a structure.
I should be getting a backtrace after dump_bt executor_globals.current_execute_data
for the PHP script that caused the seg fault, but I keep getting Attempt to extract a component of a value that is not a structure.
instead.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我第一次和你遇到同样的问题。再次运行 bt 和 dump_bt 命令,它就可以工作了:
At the first time, I got the same problem with you. Run again the bt and dump_bt commands and it works: