php apache error.log中的“[notice] child pid XXXX exit signal Segmentation fault (11)”

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/7745578/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-26 03:18:11  来源:igfitidea点击:

"[notice] child pid XXXX exit signal Segmentation fault (11)" in apache error.log

phpapachecakephperror-logging

提问by mgPePe

I am using Apache/PHP/MySQL stack.
Using as framework CakePHP.

我正在使用 Apache/PHP/MySQL 堆栈。
使用作为框架 CakePHP。

Every now and then I get a blank white page. I can't debug it through Cake, so I peek in the apache error.log and here's what I get:

我时不时地得到一个空白的白页。我无法通过 Cake 调试它,所以我查看了 apache error.log,这是我得到的:

[Wed Oct 12 15:27:23 2011] [notice] child pid 3580 exit signal Segmentation fault (11)
[Wed Oct 12 15:27:34 2011] [notice] child pid 3581 exit signal Segmentation fault (11)
[Wed Oct 12 15:30:52 2011] [notice] child pid 3549 exit signal Segmentation fault (11)
[Wed Oct 12 16:04:27 2011] [notice] child pid 3579 exit signal Segmentation fault (11)
zend_mm_heap corrupted
[Wed Oct 12 16:26:24 2011] [notice] child pid 3625 exit signal Segmentation fault (11)
[Wed Oct 12 17:57:24 2011] [notice] child pid 3577 exit signal Segmentation fault (11)
[Wed Oct 12 17:58:54 2011] [notice] child pid 3550 exit signal Segmentation fault (11)
[Wed Oct 12 17:59:52 2011] [notice] child pid 3578 exit signal Segmentation fault (11)
[Wed Oct 12 18:01:38 2011] [notice] child pid 3683 exit signal Segmentation fault (11)
[Wed Oct 12 22:20:53 2011] [notice] child pid 3778 exit signal Segmentation fault (11)
[Wed Oct 12 22:29:51 2011] [notice] child pid 3777 exit signal Segmentation fault (11)
[Wed Oct 12 22:33:42 2011] [notice] child pid 3774 exit signal Segmentation fault (11)

What is this segmentation fault, and how can I fix it?

这是什么分段错误,我该如何解决?

UPDATE:

更新:

PHP Version 5.3.4, OSX local development
Server version: Apache/2.2.17 (Unix)
CakePhp: 1.3.10

采纳答案by Mattias Wadman

Attach gdb to one of the httpd child processes and reload or continue working and wait for a crash and then look at the backtrace. Do something like this:

将 gdb 附加到 httpd 子进程之一并重新加载或继续工作并等待崩溃,然后查看回溯。做这样的事情:

$ ps -ef|grep httpd
0     681     1   0 10:38pm ??         0:00.45 /Applications/MAMP/Library/bin/httpd -k start
501   690   681   0 10:38pm ??         0:00.02 /Applications/MAMP/Library/bin/httpd -k start

...

...

Now attach gdb to one of the child processes, in this case PID 690 (columns are UID, PID, PPID, ...)

现在将 gdb 附加到子进程之一,在本例中为 PID 690(列是 UID、PID、PPID、...)

$ sudo gdb
(gdb) attach 690
Attaching to process 690.
Reading symbols for shared libraries . done
Reading symbols for shared libraries ....................... done
0x9568ce29 in accept$NOCANCEL$UNIX2003 ()
(gdb) c
Continuing.

Wait for crash... then:

等待崩溃......然后:

(gdb) backtrace

Or

或者

(gdb) backtrace full

Should give you some clue what's going on. If you file a bug report you should include the backtrace.

应该给你一些线索。如果您提交错误报告,则应包括回溯。

If the crash is hard to reproduce it may be a good idea to configure Apache to only use one child processes for handling requests. The config is something like this:

如果崩溃很难重现,那么将 Apache 配置为仅使用一个子进程来处理请求可能是个好主意。配置是这样的:

StartServers 1
MinSpareServers 1
MaxSpareServers 1

回答by phihag

A segementation fault is an internal error in php (or, less likely, apache). Oftentimes, the segmentation fault is caused by one of the newer and lesser-tested php modules such as imagemagick or subversion.

分段错误是 php(或者不太可能是 apache)中的内部错误。通常,分段错误是由较新且测试较少的 php 模块之一引起的,例如 imagemagick 或 subversion。

Try disabling all non-essential modules (in php.ini), and then re-enabling them one-by-one until the error occurs. You may also want to update php and apache.

尝试禁用所有非必要模块(在 中php.ini),然后一一重新启用它们,直到发生错误。您可能还想更新 php 和 apache。

If that doesn't help, you should report a php bug.

如果这没有帮助,你应该报告一个 php bug

回答by Wayne

Have you tried to increase output_buffering in your php.ini?

您是否尝试过在 php.ini 中增加 output_buffering ?

What does "zend_mm_heap corrupted" mean?

“zend_mm_heap 损坏”是什么意思