CoreDumpDirectory isn't working on ubuntu; getting segmentation fault with php

前端 未结 3 1405
清酒与你
清酒与你 2021-02-06 09:50

I\'m trying to solve a segmentation fault. This message appears in my apache-error.log:

[notice] child pid 3979 exit signal Segmentation fault (11)

3条回答
  •  别跟我提以往
    2021-02-06 10:26

    I finally was able to see Apache's core dump in Ubuntu:

    1. edit /etc/default/apport
    2. edit apache2.conf:

        CoreDumpDirectory /tmp/apache2-gdb-dump
      
    3. make sure Apache can write to it:

      # chmod 777 /tmp/apache2-gdb-dump
      
    4. remove core dump size limit:

      # ulimit -c unlimited
      
    5. Optionally, change the name pattern of the core dumps:

      # echo 'coredump-%e.%p' > /proc/sys/kernel/core_pattern
      

    To analyse the dump use gdb:

    $ gdb apache2 /tmp/apache2-gdb-dump/coredump-x.x
    

    To see stacktrace details, in gdb:

    gdb> where
    

    This I did, and I obtained the core-dump. However, my problem was not solved by looking at the coredump; it was apparently an issue in my php script.

    More info: http://matrafox.info/apache-child-pid-exit-signal-segmentation-fault.html

提交回复
热议问题