Rake always segfaults and core dumps, even when successful
I have a VPS running 64-bit Debian Lenny, and I'm deploying a couple of Rails 3 apps.
I have no problem locally, but whenever Rake is run from the command line (or capistrano) Rake segfaults, and core dumps... even though Rake seems to complete successfully in most cases!
I have spent weeks trying to fix this, tried installing REE, 1.8.7, 1.9.2-p180 & 1.9.2-p290... All of them fail.
I'm unsure how to get any meaningful information from the core dumps... and all my searches on Google have been fruitless.
What options are there to stop this from happening? And is there a way to stop the core dumps from consuming all my disk space?!
[BUG] Segmentation fault
ruby 1.9.2p290 (2011-07-09 revision 32553) [x86_64-linux]
-- control frame ----------
--------------------------开发者_StackOverflow社区-
-- 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
EDIT: coredump analysis yields:
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 ?? ()
I'm unsure how to get any meaningful information from the core dumps...
Have you tried the standard way of getting info from core dumps?
gdb /path/to/executable /path/to/core
(gdb) where
精彩评论