Ad

Apache W/mod_rails Segmentation Fault

- 1 answer

I am running Redmine on Apache 2 with mod_rails (passenger) 2.0.3 and Enterprise Ruby 1.8.6. Every so often I get a segfault from Apache when I try to login. Anyone know how I can debug this issue? I see something like this in Apache's error.log:

[Mon Jan 19 17:09:48 2009] [notice] child pid 8714 exit signal Segmentation fault (11)

The only way I can get the application to work after that is restart the whole system (restarting Apache only doesn't help).

Ad

Answer

First steps are:

  1. Find out where the core file is being left on your system (enable core dumps if necessary).

  2. Run file(1) on the resulting core file. This will probably say "... generated by httpd", but it's as well to check.

  3. Fire up gdb against the executable name from (2) and the core file from (1), and start digging. The command where (or bt) is a good place to start: this will give you a stack trace at the time the process dumped core.

It sounds like you don't have a mass of C coding experience, so good luck! Tracking down this kind of error can be a real dog. You can try posting the stack trace from (3) here, but don't hold your breath whilst waiting for an answer. At best, the failing function name might be a good string to feed to Google.

Ad
source: stackoverflow.com
Ad