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.

I have questions about segmentation faults.

I am runnbing Debian + Nging + Php5-fpm + Mysql + Imagemagick.

  1. How to find out what script (or program) is causing segmentation faults? I need a very simple step-by-step instruction. I searched Google and all available insructions are for professionals - "if you have a core file do this.., "connect debugger" etc.

  2. In my case segmentation faults are not regular. Sometimes I have 10 segfaults just in 1 day but sometimes I don't have any for months. I don't have any scripts that run only sometimes. If it's a script problem, I must have hundreds of segfaults every day. So, why segfaults are only occurring sometimes?

  3. What are the most frequent cases of segfaults?

.

[28-May-2013 21:33:51] WARNING: [pool www] child 19448 exited on signal 11 (SIGSEGV) after 3514.206284 seconds from start
[28-May-2013 21:33:56] WARNING: [pool www] child 20302 exited on signal 11 (SIGSEGV) after 4.462827 seconds from start
[07-Jun-2013 20:57:40] WARNING: [pool www] child 2685 exited on signal 11 (SIGSEGV) after 58927.043729 seconds from start
[07-Jun-2013 20:58:37] WARNING: [pool www] child 2684 exited on signal 11 (SIGSEGV) after 58987.506016 seconds from start
[10-Jun-2013 01:23:01] WARNING: [pool www] child 14603 exited on signal 11 (SIGSEGV) after 51802.304617 seconds from start
[10-Jun-2013 01:23:58] WARNING: [pool www] child 9218 exited on signal 11 (SIGSEGV) after 74891.918340 seconds from start
[24-Jun-2013 00:04:39] WARNING: [pool www] child 22121 exited on signal 11 (SIGSEGV) after 156563.946260 seconds from start
[24-Jun-2013 00:06:01] WARNING: [pool www] child 25055 exited on signal 11 (SIGSEGV) after 81.358472 seconds from start
[24-Jun-2013 00:07:10] WARNING: [pool www] child 20595 exited on signal 11 (SIGSEGV) after 165026.445021 seconds from start
[24-Jun-2013 00:07:55] WARNING: [pool www] child 22122 exited on signal 11 (SIGSEGV) after 156754.694714 seconds from start
[13-Jul-2013 15:59:31] WARNING: [pool www] child 24307 exited on signal 11 (SIGSEGV) after 2526.197996 seconds from start
[13-Jul-2013 15:59:42] WARNING: [pool www] child 24318 exited on signal 11 (SIGSEGV) after 2528.783217 seconds from start
[13-Jul-2013 16:02:29] WARNING: [pool www] child 24389 exited on signal 11 (SIGSEGV) after 2260.254718 seconds from start
[13-Jul-2013 16:19:51] WARNING: [pool www] child 25119 exited on signal 11 (SIGSEGV) after 1209.036619 seconds from start
[15-Jul-2013 01:22:29] WARNING: [pool www] child 20613 exited on signal 11 (SIGSEGV) after 3060.402119 seconds from start
share|improve this question

closed as off-topic by Dennis Kaarsemaker, Falcon Momot, Tim Brigham, Stephane, Nathan C Jul 17 '13 at 14:14

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "Questions about software development are off-topic here, but can be asked on Stack Overflow." – Dennis Kaarsemaker, Tim Brigham, Nathan C
If this question can be reworded to fit the rules in the help center, please edit the question.

    
You say: "I searched Google and all available insructions are for professionals". This site is also for professionals, working on system administration. Try Stack Overflow for help with debugging your code. –  Dennis Kaarsemaker Jul 16 '13 at 22:06
    
A segfault is the result of a program bug, usually. The information you've provided here would be of no use to anyone trying to see what is going on; pattern analysis is not useful in this case and a segfault indicates one of a very large field of potential problems. –  Falcon Momot Jul 17 '13 at 1:34

1 Answer 1

up vote 1 down vote accepted
  1. I don't think I'd start with core dumps since you're not comfortable with the tools. First, since it's the child segfaulting, check for php errors. Fix any php errors. Post any php errors you can't figure out.

  2. often segfaults are memory related and memory is changing all the time, especially as server load changes.

  3. memory problems, stack problems. misconfiguration of anything in php stack. php errors that lead to bigger problems after they occur.

Are you running the latest Imagemagick?

Are you running an opcode cache (apc etc)? if so, try turning off and see if errors disappear.

If none of those work, you'll have to set up Xdebug and debug the app.

share|improve this answer

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