Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

Under load, my PHP5-fpm (on 32bit ubuntu 10.10) produces segfaults like the following:

kernel: [4881937.884863] php5-fpm[2638]: segfault at 4204eb41 ip 0832d235 sp bfcea5e0 error 4 in php5-fpm[8048000+70d000]

How do I make it so these segfaults produce a core dump so that I can inspect the call stack to figure out where the segfault is coming from?

Where do the core dumps go once they are produced?

share|improve this question

1 Answer 1

up vote 6 down vote accepted

You can enable core dump with:

su -
echo '/tmp/core-%e.%p' > /proc/sys/kernel/core_pattern
echo 0 > /proc/sys/kernel/core_uses_pid
ulimit -c unlimited

Set the rlimit_core directive in /etc/php-fpm.d/www.conf to unlimited:

rlimit_core = unlimited
share|improve this answer
    
I just found the answer here: bugs.php.net/bugs-generating-backtrace.php –  rynop Aug 25 '11 at 16:00

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.