Apache w/mod_rails 分段错误
我正在 Apache 2 上使用 mod_rails (passenger) 2.0.3 和 Enterprise Ruby 1.8.6 运行 Redmine。 当我尝试登录时,我经常会遇到来自 Apache 的段错误。 有人知道我如何调试这个问题吗? 我在 Apache 的 error.log 中看到类似的内容:
[Mon Jan 19 17:09:48 2009] [notice] child pid 8714 exit signal Segmentation failure (11)
我可以让应用程序正常工作的唯一方法是重新启动整个系统(仅重新启动 Apache 没有帮助)。
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).
第一步是:
找出核心文件留在系统上的位置(如有必要,启用核心转储)。
对生成的核心文件运行
file(1)
。 这可能会说“...由httpd生成”,但最好检查一下。针对 (2) 中的可执行文件名称和 (1) 中的核心文件启动
gdb
,然后开始挖掘。 命令where
(或bt
)是一个很好的起点:这将为您提供进程转储核心时的堆栈跟踪。听起来您没有大量的 C 编码经验,祝您好运! 追查这种错误可真可谓是一条狗。 您可以尝试在此处发布 (3) 中的堆栈跟踪,但在等待答案时不要屏住呼吸。 最好的情况是,失败的函数名称可能是一个可以提供给 Google 的良好字符串。
First steps are:
Find out where the core file is being left on your system (enable core dumps if necessary).
Run
file(1)
on the resulting core file. This will probably say "... generated by httpd", but it's as well to check.Fire up
gdb
against the executable name from (2) and the core file from (1), and start digging. The commandwhere
(orbt
) 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.