V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
MrMike
V2EX  ›  CentOS

[急] 这个错误如何解决: AH00052: child pid 8277 exit signal Segmentation fault (11)

  •  
  •   MrMike · 2017-10-18 02:05:06 +08:00 · 4045 次点击
    这是一个创建于 2593 天前的主题,其中的信息可能已经有所发展或是发生改变。

    centos 7 64 位 + apache 2.4 + php 5.6 访问网站时,页面报错:The connection was reset,打不开页面。 查看服务器日志: AH00052: child pid 8277 exit signal Segmentation fault (11)

    请教下朋友们,这个问题如何处理?网上搜搜了半天,没找到解决方法。谢谢

    12 条回复    2017-10-18 10:35:22 +08:00
    sagaxu
        1
    sagaxu  
       2017-10-18 02:39:44 +08:00 via Android
    生成 coredump 文件,用 gdb 打出堆栈信息
    MrMike
        2
    MrMike  
    OP
       2017-10-18 03:36:42 +08:00
    @sagaxu

    GNU gdb (GDB) Red Hat Enterprise Linux 7.6.1-100.el7
    Copyright (C) 2013 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-redhat-linux-gnu".
    For bug reporting instructions, please see:
    <http://www.gnu.org/software/gdb/bugs/>.
    (gdb) backtrace
    No stack.
    (gdb)

    是不是这样的呢,没有什么内容呢
    sagaxu
        3
    sagaxu  
       2017-10-18 09:41:23 +08:00 via Android
    coredump 文件生成了吗?
    MrMike
        4
    MrMike  
    OP
       2017-10-18 09:43:57 +08:00
    @sagaxu

    [root@li1007-178 tmp]# gdb /usr/sbin/httpd core.16598
    GNU gdb (GDB) Red Hat Enterprise Linux 7.6.1-100.el7
    Copyright (C) 2013 Free Software Foundation, Inc.
    License GPLv3+: GNU GPL version 3 or later <******>
    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-redhat-linux-gnu".
    For bug reporting instructions, please see:
    <*****>...
    Reading symbols from /usr/sbin/httpd...Reading symbols from /usr/sbin/httpd...(no debugging symbols found)...done.
    (no debugging symbols found)...done.
    [New LWP 16598]
    [Thread debugging using libthread_db enabled]
    Using host libthread_db library "/lib64/libthread_db.so.1".
    Core was generated by `/usr/sbin/httpd -DFOREGROUND'.
    Program terminated with signal 11, Segmentation fault.
    #0 0x00007f96255fd721 in zend_std_write_property () from /etc/httpd/modules/libphp5.so
    Missing separate debuginfos, use: debuginfo-install httpd-2.4.6-67.el7.centos.5.x86_64

    出来是这样的,libphp5.so 这个文件是有的。我也单独在 httpd.conf 里加载了
    LoadModule php5_module /etc/httpd/modules/libphp5.so
    <FilesMatch \.php$>
    SetHandler application/x-httpd-php
    </FilesMatch>

    但是还是同样的错误。
    MrMike
        5
    MrMike  
    OP
       2017-10-18 09:45:15 +08:00
    MrMike
        6
    MrMike  
    OP
       2017-10-18 09:46:39 +08:00
    [Wed Oct 18 01:39:45.016354 2017] [core:notice] [pid 16586] AH00051: child pid 16587 exit signal Segmentation fault (11), possible coredump in /tmp
    [Wed Oct 18 01:39:46.020711 2017] [core:notice] [pid 16586] AH00051: child pid 16589 exit signal Segmentation fault (11), possible coredump in /tmp
    [Wed Oct 18 01:39:48.024828 2017] [core:notice] [pid 16586] AH00051: child pid 16590 exit signal Segmentation fault (11), possible coredump in /tmp
    [Wed Oct 18 01:39:49.028980 2017] [core:notice] [pid 16586] AH00051: child pid 16588 exit signal Segmentation fault (11), possible coredump in /tmp
    [Wed Oct 18 01:39:49.029066 2017] [core:notice] [pid 16586] AH00051: child pid 16591 exit signal Segmentation fault (11), possible coredump in /tmp
    [Wed Oct 18 01:39:50.030227 2017] [core:notice] [pid 16586] AH00051: child pid 16592 exit signal Segmentation fault (11), possible coredump in /tmp
    [Wed Oct 18 01:39:51.033353 2017] [core:notice] [pid 16586] AH00051: child pid 16594 exit signal Segmentation fault (11), possible coredump in /tmp
    [Wed Oct 18 01:39:52.040236 2017] [core:notice] [pid 16586] AH00051: child pid 16595 exit signal Segmentation fault (11), possible coredump in /tmp
    [Wed Oct 18 01:39:53.041442 2017] [core:notice] [pid 16586] AH00051: child pid 16596 exit signal Segmentation fault (11), possible coredump in /tmp
    [Wed Oct 18 01:39:55.046361 2017] [core:notice] [pid 16586] AH00051: child pid 16598 exit signal Segmentation fault (11), possible coredump in /tmp
    sagaxu
        7
    sagaxu  
       2017-10-18 09:54:23 +08:00 via Android
    没有 debug info,重新编译一份 httpd 和 libphp,编译的时候要打开调试选项,用带调试信息的程序生成 core 文件
    MrMike
        8
    MrMike  
    OP
       2017-10-18 10:02:00 +08:00
    @sagaxu 你的意思是重装 httpd 和 php ?我是直接用 yum install 安装的,手动编译的话,不熟悉,能否给一个完整的编译教程呢?谢谢。。
    sagaxu
        9
    sagaxu  
       2017-10-18 10:04:09 +08:00
    @MrMike yum 安装的 httpd 可以用 debuginfo-install httpd-2.4.6-67.el7.centos.5.x86_64 安装调试信息
    MrMike
        10
    MrMike  
    OP
       2017-10-18 10:30:27 +08:00
    @sagaxu
    Loaded plugins: auto-update-debuginfo, fastestmirror
    enabling epel-debuginfo
    enabling remi-safe-debuginfo
    enabling base-debuginfo
    enabling webtatic-debuginfo
    Loading mirror speeds from cached hostfile
    * base: mirrors.linode.com
    * epel: linux.mirrors.es.net
    * epel-debuginfo: linux.mirrors.es.net
    * extras: mirrors.linode.com
    * remi-safe: repo1.sea.innoscale.net
    * updates: mirrors.linode.com
    * webtatic: us-east.repo.webtatic.com
    * webtatic-debuginfo: us-east.repo.webtatic.com
    Could not find debuginfo for main pkg: httpd-2.4.6-67.el7.centos.5.x86_64
    Package apr-debuginfo-1.4.8-3.el7.x86_64 already installed and latest version
    Package apr-util-debuginfo-1.5.2-6.el7.x86_64 already installed and latest version
    Package glibc-debuginfo-2.17-196.el7.x86_64 already installed and latest version
    Package libdb-debuginfo-5.3.21-20.el7.x86_64 already installed and latest version
    Package expat-debuginfo-2.1.0-10.el7_3.x86_64 already installed and latest version
    Package lua-debuginfo-5.1.4-15.el7.x86_64 already installed and latest version
    Package pcre-debuginfo-8.32-17.el7.x86_64 already installed and latest version
    Package libselinux-debuginfo-2.5-11.el7.x86_64 already installed and latest version
    Package systemd-debuginfo-219-42.el7_4.1.x86_64 already installed and latest version
    Package zlib-debuginfo-1.2.7-17.el7.x86_64 already installed and latest version
    No debuginfo packages available to install

    已经装好了,现在需要如何查看呢?
    MrMike
        11
    MrMike  
    OP
       2017-10-18 10:33:13 +08:00
    @sagaxu
    我查看 var/log/httpd/error_log 里面的日志:
    [Wed Oct 18 02:20:54.787274 2017] [core:notice] [pid 17373] AH00094: Command line: '/usr/sbin/httpd -D FOREGROUND'
    [Wed Oct 18 02:21:02.798190 2017] [core:notice] [pid 17373] AH00051: child pid 17376 exit signal Segmentation fault (11), possible coredump in /tmp
    [Wed Oct 18 02:21:03.804606 2017] [core:notice] [pid 17373] AH00051: child pid 17377 exit signal Segmentation fault (11), possible coredump in /tmp
    [Wed Oct 18 02:21:04.822119 2017] [core:notice] [pid 17373] AH00051: child pid 17378 exit signal Segmentation fault (11), possible coredump in /tmp
    [Wed Oct 18 02:21:05.823340 2017] [core:notice] [pid 17373] AH00051: child pid 17375 exit signal Segmentation fault (11), possible coredump in /tmp
    [Wed Oct 18 02:21:06.824505 2017] [core:notice] [pid 17373] AH00051: child pid 17379 exit signal Segmentation fault (11), possible coredump in /tmp
    [Wed Oct 18 02:21:07.825436 2017] [core:notice] [pid 17373] AH00051: child pid 17381 exit signal Segmentation fault (11), possible coredump in /tmp
    [Wed Oct 18 02:21:08.828918 2017] [core:notice] [pid 17373] AH00051: child pid 17384 exit signal Segmentation fault (11), possible coredump in /tmp
    [Wed Oct 18 02:21:09.832557 2017] [core:notice] [pid 17373] AH00051: child pid 17383 exit signal Segmentation fault (11), possible coredump in /tmp
    [Wed Oct 18 02:21:10.833674 2017] [core:notice] [pid 17373] AH00051: child pid 17388 exit signal Segmentation fault (11), possible coredump in /tmp
    [Wed Oct 18 02:21:11.834853 2017] [core:notice] [pid 17373] AH00051: child pid 17386 exit signal Segmentation fault (11), possible coredump in /tmp

    运行 /usr/sbin/httpd -D FOREGROUND 命令后,得到这样的提示:
    [Wed Oct 18 02:31:04.264821 2017] [so:warn] [pid 17634] AH01574: module php5_module is already loaded, skipping
    httpd (pid 17373) already running
    MrMike
        12
    MrMike  
    OP
       2017-10-18 10:35:22 +08:00
    @sagaxu 忽略[Wed Oct 18 02:31:04.264821 2017] [so:warn] [pid 17634] AH01574: module php5_module is already loaded, skipping 这个报错,是因为我在 httpd.conf 重复加载了 php5_modle.
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   实用小工具   ·   2579 人在线   最高记录 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 23ms · UTC 10:27 · PVG 18:27 · LAX 02:27 · JFK 05:27
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.