耙子总是会出现段错误和核心转储,即使成功也是如此

时间:2011-08-21 18:59:00

标签: ruby-on-rails ruby ruby-on-rails-3 rake segmentation-fault

我有一个运行64位Debian Lenny的VPS,我正在部署几个Rails 3应用程序。

我在本地没有问题,但每当Rake从命令行(或capistrano)运行时,Rake段错误和核心转储......即使Rake似乎在大多数情况下完成成功! / p>

我花了几周试图解决这个问题,尝试安装REE,1.8.7,1.9.2-p180& 1.9.2-p290 ......所有这些都失败了。

我不确定如何从核心转储中获取任何有意义的信息......而我在谷歌上的所有搜索都没有结果。

有什么选择可以阻止这种情况发生? 有没有办法阻止核心转储占用我的所有磁盘空间?!

[BUG] Segmentation fault
ruby 1.9.2p290 (2011-07-09 revision 32553) [x86_64-linux]

-- control frame ----------
---------------------------

-- C level backtrace information -------------------------------------------
/usr/local/rvm/rubies/ruby-1.9.2-p290/lib/libruby.so.1.9(rb_vm_bugreport+0x5f)[0x2afdf1ff2b7f]
/usr/local/rvm/rubies/ruby-1.9.2-p290/lib/libruby.so.1.9 [0x2afdf1ecf81c]
/usr/local/rvm/rubies/ruby-1.9.2-p290/lib/libruby.so.1.9(rb_bug+0xb3) [0x2afdf1ecf993]
/usr/local/rvm/rubies/ruby-1.9.2-p290/lib/libruby.so.1.9 [0x2afdf1f81b8c]
/lib/libpthread.so.0 [0x2afdf22aba80]
/lib/libselinux.so.1 [0x2aaab7d3531d]
/lib/libselinux.so.1 [0x2aaab7d2857f]

[NOTE]
You may have encountered a bug in the Ruby interpreter or extension libraries.
Bug reports are welcome.
For details: http://www.ruby-lang.org/bugreport.html

Aborted (core dumped)

Exiting via interrupt: 2

编辑:coredump分析产生:

sudo gdb /usr/local/rvm/rubies/ruby-1.9.2-p290/bin/ruby core.5654
#0 rb_vm_get_sourceline (cfp=<value optimized out>) at vm.c:696
#1 0x00002ba7e901697c in rb_bug (fmt=0x1e4d0540 "�\026�\036") at error.c:246
#2 0x00002ba7e90c8b8c in sigsegv (sig=<value optimized out>, info=<value optimized out>, ctx=<value optimized out>) at signal.c:613
#3 <signal handler called> #4 0x00002aaab7d3531d in ?? () from /lib/libselinux.so.1
#5 0x00002aaab7d2857f in ?? () from /lib/libselinux.so.1
#6 0x0000000000000000 in ?? ()

1 个答案:

答案 0 :(得分:1)

  

我不确定如何从核心转储中获取任何有意义的信息......

您是否尝试过以标准方式从核心转储中获取信息?

gdb /path/to/executable /path/to/core
(gdb) where