drxzpo70788179614 2011-10-12 19:38
浏览 91
已采纳

“[notice] child pid XXXX退出信号分段错误(11)”在apache error.log中[关闭]

I am using Apache/PHP/MySQL stack.
Using as framework 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:

[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
  • 写回答

3条回答 默认 最新

  • doubingjian2006 2011-10-13 10:15
    关注

    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:

    $ 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, ...)

    $ 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:

    StartServers 1
    MinSpareServers 1
    MaxSpareServers 1
    
    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(2条)

报告相同问题?

悬赏问题

  • ¥20 5037端口被adb自己占了
  • ¥15 python:excel数据写入多个对应word文档
  • ¥60 全一数分解素因子和素数循环节位数
  • ¥15 ffmpeg如何安装到虚拟环境
  • ¥188 寻找能做王者评分提取的
  • ¥15 matlab用simulink求解一个二阶微分方程,要求截图
  • ¥30 乘子法解约束最优化问题的matlab代码文件,最好有matlab代码文件
  • ¥15 写论文,需要数据支撑
  • ¥15 identifier of an instance of 类 was altered from xx to xx错误
  • ¥100 反编译微信小游戏求指导