Назад | Перейти на главную страницу

Ошибка сегментации Apache

В моем журнале ошибок apache я получаю такие строки, как

[Wed Sep 21 16:51:14 2011] [notice] child pid 5414 exit signal Segmentation fault (11), possible coredump in /tmp/apache-cores/
[Wed Sep 21 17:04:15 2011] [notice] child pid 5558 exit signal Segmentation fault (11), possible coredump in /tmp/apache-cores/
[Wed Sep 21 17:04:16 2011] [notice] child pid 5508 exit signal Segmentation fault (11), possible coredump in /tmp/apache-cores/
[Wed Sep 21 17:50:47 2011] [notice] child pid 5892 exit signal Segmentation fault (11), possible coredump in /tmp/apache-cores/
[Wed Sep 21 17:50:48 2011] [notice] child pid 5880 exit signal Segmentation fault (11), possible coredump in /tmp/apache-cores/
[Wed Sep 21 17:51:31 2011] [notice] child pid 5965 exit signal Segmentation fault (11), possible coredump in /tmp/apache-cores/
[Wed Sep 21 17:51:32 2011] [notice] child pid 5955 exit signal Segmentation fault (11), possible coredump in /tmp/apache-cores/

Я установил CoreDumpDirectory и получил это в результате с помощью gdb, но я не уверен, что это значит и куда я могу пойти дальше.

Core was generated by `/usr/sbin/apache2 -k start'.
    Program terminated with signal 11, Segmentation fault.
    [New process 5955]
    #0  0x000000000043f7e6 in ap_add_common_vars (r=0xa805a8)
        at /build/buildd-apache2_2.2.9-10+lenny11-amd64-vHbrzW/apache2-2.2.9/server/                                                                                        util_script.c:242
    242     /build/buildd-apache2_2.2.9-10+lenny11-amd64-vHbrzW/apache2-2.2.9/server                                                                                        /util_script.c: No such file or directory.
            in /build/buildd-apache2_2.2.9-10+lenny11-amd64-vHbrzW/apache2-2.2.9/ser                                                                                        ver/util_script.c
    (gdb) bt
    #0  0x000000000043f7e6 in ap_add_common_vars (r=0xa805a8)
        at /build/buildd-apache2_2.2.9-10+lenny11-amd64-vHbrzW/apache2-2.2.9/server/util_script.c:242
    #1  0x00007faac8643459 in php_handler (r=0xa99ae0)
        at /tmp/buildd/php5-5.2.6.dfsg.1/sapi/apache2handler/sapi_apache2.c:586
    #2  0x0000000000438f73 in ap_run_handler (r=0xa805a8)
        at /build/buildd-apache2_2.2.9-10+lenny11-amd64-vHbrzW/apache2-2.2.9/server/config.c:159
    #3  0x000000000043c53f in ap_invoke_handler (r=0xa805a8)
        at /build/buildd-apache2_2.2.9-10+lenny11-amd64-vHbrzW/apache2-2.2.9/server/config.c:373
    #4  0x0000000000449590 in ap_internal_redirect (new_uri=,
        r=)
        at /build/buildd-apache2_2.2.9-10+lenny11-amd64-vHbrzW/apache2-2.2.9/modules/http/http_request.c:477
    #5  0x00007faac7b6eb95 in handler_redirect (r=0xa9b2d8)
        at /build/buildd-apache2_2.2.9-10+lenny11-amd64-vHbrzW/apache2-2.2.9/modules/mappers/mod_rewrite.c:4829
    #6  0x0000000000438f73 in ap_run_handler (r=0xa9b2d8)
        at /build/buildd-apache2_2.2.9-10+lenny11-amd64-vHbrzW/apache2-2.2.9/server/config.c:159
    #7  0x000000000043c53f in ap_invoke_handler (r=0xa9b2d8)
        at /build/buildd-apache2_2.2.9-10+lenny11-amd64-vHbrzW/apache2-2.2.9/server/---Type  to continue, or q  to quit---
    config.c:373
    #8  0x000000000044972e in ap_process_request (r=0xa9b2d8)
        at /build/buildd-apache2_2.2.9-10+lenny11-amd64-vHbrzW/apache2-2.2.9/modules/http/http_request.c:258
    #9  0x0000000000446858 in ap_process_http_connection (c=0xa795c8)
        at /build/buildd-apache2_2.2.9-10+lenny11-amd64-vHbrzW/apache2-2.2.9/modules/http/http_core.c:190
    #10 0x0000000000440493 in ap_run_process_connection (c=0xa795c8)
        at /build/buildd-apache2_2.2.9-10+lenny11-amd64-vHbrzW/apache2-2.2.9/server/connection.c:43
    #11 0x000000000044e3d0 in child_main (child_num_arg=)
        at /build/buildd-apache2_2.2.9-10+lenny11-amd64-vHbrzW/apache2-2.2.9/server/mpm/prefork/prefork.c:680
    #12 0x000000000044e724 in make_child (s=0x676968, slot=11)
        at /build/buildd-apache2_2.2.9-10+lenny11-amd64-vHbrzW/apache2-2.2.9/server/mpm/prefork/prefork.c:777
    #13 0x000000000044f366 in ap_mpm_run (_pconf=,
        plog=, s=)
        at /build/buildd-apache2_2.2.9-10+lenny11-amd64-vHbrzW/apache2-2.2.9/server/mpm/prefork/prefork.c:912
    #14 0x0000000000425be5 in main (argc=3, argv=0x7fff79e8fd68)
        at /build/buildd-apache2_2.2.9-10+lenny11-amd64-vHbrzW/apache2-2.2.9/server/main.c:732

#1  0x00007faac8643459 in php_handler (r=0xa99ae0)
        at /tmp/buildd/php5-5.2.6.dfsg.1/sapi/apache2handler/sapi_apache2.c:586

Выглядит как ошибка. Вам следует обновить PHP до версии 5.3.3-7 и повторить попытку.

Я предоставил обходной путь для segfaulting apache здесь: Совет по отладке Apache с ошибками сегментации PHP

Но да, другой респондент прав. Вам следует обновить PHP и / или apache. Вы должны знать об изменениях между php 5.2.x и php 5.3.x, некоторые из них, вероятно, потребуют от вас изменения кода.