Bug #2667
closedSegmentation fault error
Description
=begin
I just downloaded and compiled from source ruby-1.9.1-p376 yesterday. No special settings other then I did the following ./configure --bindir=/usr/bin
It worked fine yesterday, I also compiled rubygems-1.3.5 and installed a few gems and that to worked fine with out issue.
ruby -v
ruby 1.9.1p376 (2009-12-07 revision 26041) [x86_64-linux]
This morning, when I typed gem list I get the following error
gem list
/usr/bin/ruby: [BUG] Segmentation fault
ruby 1.9.1p376 (2009-12-07 revision 26041) [x86_64-linux]
-- control frame ----------
c:0002 p:-60416372 s:0004 b:0004 l:000003 d:000003 TOP
c:0001 p:0000 s:0002 b:0002 l:000f88 d:000f88 TOP¶
-- Ruby level backtrace information-----------------------------------------
-- C level backtrace information -------------------------------------------
0x4d86a1 /usr/bin/ruby(rb_vm_bugreport+0x41) [0x4d86a1]
0x503c5e /usr/bin/ruby [0x503c5e]
0x503dc1 /usr/bin/ruby(rb_bug+0xb1) [0x503dc1]
0x48c3cf /usr/bin/ruby [0x48c3cf]
0x30c9e0e7c0 /lib64/libpthread.so.0 [0x30c9e0e7c0]
0x4919e1 /usr/bin/ruby(st_lookup+0x11) [0x4919e1]
0x4c8735 /usr/bin/ruby [0x4c8735]
0x4c8783 /usr/bin/ruby(rb_get_method_body+0x23) [0x4c8783]
0x4c88c9 /usr/bin/ruby(rb_method_basic_definition_p+0x9) [0x4c88c9]
0x4cbb3a /usr/bin/ruby(rb_obj_respond_to+0x6a) [0x4cbb3a]
0x43c95e /usr/bin/ruby [0x43c95e]
0x43edda /usr/bin/ruby(rb_convert_type+0x5a) [0x43edda]
0x499abe /usr/bin/ruby(rb_string_value+0x3e) [0x499abe]
0x49a60f /usr/bin/ruby(rb_str_append+0x2f) [0x49a60f]
0x4bc4b5 /usr/bin/ruby [0x4bc4b5]
0x4bb478 /usr/bin/ruby [0x4bb478]
0x4c3823 /usr/bin/ruby(rb_iseq_compile_node+0x6f3) [0x4c3823]
0x4c711c /usr/bin/ruby [0x4c711c]
0x4c718b /usr/bin/ruby(rb_iseq_new_with_opt+0x1b) [0x4c718b]
0x4bb00b /usr/bin/ruby [0x4bb00b]
0x4bd975 /usr/bin/ruby [0x4bd975]
0x4bb478 /usr/bin/ruby [0x4bb478]
0x4bbc49 /usr/bin/ruby [0x4bbc49]
0x4bb478 /usr/bin/ruby [0x4bb478]
0x4c3599 /usr/bin/ruby(rb_iseq_compile_node+0x469) [0x4c3599]
0x4c711c /usr/bin/ruby [0x4c711c]
0x4c718b /usr/bin/ruby(rb_iseq_new_with_opt+0x1b) [0x4c718b]
0x4c798d /usr/bin/ruby(rb_iseq_compile_with_option+0x13d) [0x4c798d]
0x4df314 /usr/bin/ruby(Init_prelude+0xa4) [0x4df314]
0x48b515 /usr/bin/ruby [0x48b515]
0x4cb19a /usr/bin/ruby(rb_vm_call_cfunc+0xba) [0x4cb19a]
0x489884 /usr/bin/ruby(ruby_process_options+0xa4) [0x489884]
0x4177a0 /usr/bin/ruby(ruby_options+0x90) [0x4177a0]
0x4156c5 /usr/bin/ruby(main+0x45) [0x4156c5]
0x30c921d994 /lib64/libc.so.6(__libc_start_main+0xf4) [0x30c921d994]
0x4155c9 /usr/bin/ruby [0x4155c9]
[NOTE]
You may encounter a bug of Ruby interpreter. Bug reports are welcome.
For details: http://www.ruby-lang.org/bugreport.html
Aborted
typing irb I get a similar error
irb
/usr/bin/ruby: [BUG] Segmentation fault
ruby 1.9.1p376 (2009-12-07 revision 26041) [x86_64-linux]
-- control frame ----------
c:0002 p:-4586356 s:0004 b:0004 l:000003 d:000003 TOP
c:0001 p:0000 s:0002 b:0002 l:000f08 d:000f08 TOP¶
-- Ruby level backtrace information-----------------------------------------
-- C level backtrace information -------------------------------------------
0x4d86a1 /usr/bin/ruby(rb_vm_bugreport+0x41) [0x4d86a1]
0x503c5e /usr/bin/ruby [0x503c5e]
0x503dc1 /usr/bin/ruby(rb_bug+0xb1) [0x503dc1]
0x48c3cf /usr/bin/ruby [0x48c3cf]
0x30c9e0e7c0 /lib64/libpthread.so.0 [0x30c9e0e7c0]
0x4919e1 /usr/bin/ruby(st_lookup+0x11) [0x4919e1]
0x4c8735 /usr/bin/ruby [0x4c8735]
0x4c8783 /usr/bin/ruby(rb_get_method_body+0x23) [0x4c8783]
0x4c88c9 /usr/bin/ruby(rb_method_basic_definition_p+0x9) [0x4c88c9]
0x4cbb3a /usr/bin/ruby(rb_obj_respond_to+0x6a) [0x4cbb3a]
0x43c95e /usr/bin/ruby [0x43c95e]
0x43edda /usr/bin/ruby(rb_convert_type+0x5a) [0x43edda]
0x499abe /usr/bin/ruby(rb_string_value+0x3e) [0x499abe]
0x49a60f /usr/bin/ruby(rb_str_append+0x2f) [0x49a60f]
0x4bc4b5 /usr/bin/ruby [0x4bc4b5]
0x4bb478 /usr/bin/ruby [0x4bb478]
0x4c3823 /usr/bin/ruby(rb_iseq_compile_node+0x6f3) [0x4c3823]
0x4c711c /usr/bin/ruby [0x4c711c]
0x4c718b /usr/bin/ruby(rb_iseq_new_with_opt+0x1b) [0x4c718b]
0x4bb00b /usr/bin/ruby [0x4bb00b]
0x4bd975 /usr/bin/ruby [0x4bd975]
0x4bb478 /usr/bin/ruby [0x4bb478]
0x4bbc49 /usr/bin/ruby [0x4bbc49]
0x4bb478 /usr/bin/ruby [0x4bb478]
0x4c3599 /usr/bin/ruby(rb_iseq_compile_node+0x469) [0x4c3599]
0x4c711c /usr/bin/ruby [0x4c711c]
0x4c718b /usr/bin/ruby(rb_iseq_new_with_opt+0x1b) [0x4c718b]
0x4c798d /usr/bin/ruby(rb_iseq_compile_with_option+0x13d) [0x4c798d]
0x4df314 /usr/bin/ruby(Init_prelude+0xa4) [0x4df314]
0x48b515 /usr/bin/ruby [0x48b515]
0x4cb19a /usr/bin/ruby(rb_vm_call_cfunc+0xba) [0x4cb19a]
0x489884 /usr/bin/ruby(ruby_process_options+0xa4) [0x489884]
0x4177a0 /usr/bin/ruby(ruby_options+0x90) [0x4177a0]
0x4156c5 /usr/bin/ruby(main+0x45) [0x4156c5]
0x30c921d994 /lib64/libc.so.6(__libc_start_main+0xf4) [0x30c921d994]
0x4155c9 /usr/bin/ruby [0x4155c9]
[NOTE]
You may encounter a bug of Ruby interpreter. Bug reports are welcome.
For details: http://www.ruby-lang.org/bugreport.html
Whats strange is that it worked fine yesterday and then this morning it doesn't with no other changes made.
=end
Files
Updated by ajaym (Adam Jay) over 15 years ago
=begin
Sorry, should have also included OS info
CentOS release 5.4 (Final)
2.6.18-164.el5 #1 SMP Thu Sep 3 03:28:30 EDT 2009 x86_64 x86_64 x86_64 GNU/Linux
=end
Updated by naruse (Yui NARUSE) over 15 years ago
=begin
it looks you failed installation process.
please try again from extract tarball.
Anyway, is it ok that install bin-dir is /usr/bin?
=end
Updated by ajaym (Adam Jay) over 15 years ago
=begin
After I opened this ticket I did a 'make install' again and it worked. It also worked all day yesterday (2 days), this morning, I got the segmentation fault again
$ irb
internal:gem_prelude: compile/should not be reached: compile.c:473
/usr/bin/ruby:10808: [BUG] Segmentation fault
ruby 1.9.1p376 (2009-12-07 revision 26041) [x86_64-linux]
-- control frame ----------
c:0002 p:-4895604 s:0004 b:0004 l:000003 d:000003 TOP /usr/bin/ruby:10808
c:0001 p:0000 s:0002 b:0002 l:001e98 d:001e98 TOP¶
-- Ruby level backtrace information-----------------------------------------
-- C level backtrace information -------------------------------------------
0x4d86a1 /usr/bin/ruby(rb_vm_bugreport+0x41) [0x4d86a1]
0x503c5e /usr/bin/ruby [0x503c5e]
0x503dc1 /usr/bin/ruby(rb_bug+0xb1) [0x503dc1]
0x48c3cf /usr/bin/ruby [0x48c3cf]
0x36ab20e930 /lib64/libpthread.so.0 [0x36ab20e930]
0x4b97d5 /usr/bin/ruby [0x4b97d5]
0x4bb083 /usr/bin/ruby [0x4bb083]
0x4bd292 /usr/bin/ruby [0x4bd292]
0x4bb478 /usr/bin/ruby [0x4bb478]
0x4c3823 /usr/bin/ruby(rb_iseq_compile_node+0x6f3) [0x4c3823]
0x4c711c /usr/bin/ruby [0x4c711c]
0x4c718b /usr/bin/ruby(rb_iseq_new_with_opt+0x1b) [0x4c718b]
0x4bb00b /usr/bin/ruby [0x4bb00b]
0x4bd975 /usr/bin/ruby [0x4bd975]
0x4bb478 /usr/bin/ruby [0x4bb478]
0x4bbc49 /usr/bin/ruby [0x4bbc49]
0x4bb478 /usr/bin/ruby [0x4bb478]
0x4c3599 /usr/bin/ruby(rb_iseq_compile_node+0x469) [0x4c3599]
0x4c711c /usr/bin/ruby [0x4c711c]
0x4c718b /usr/bin/ruby(rb_iseq_new_with_opt+0x1b) [0x4c718b]
0x4c798d /usr/bin/ruby(rb_iseq_compile_with_option+0x13d) [0x4c798d]
0x4df314 /usr/bin/ruby(Init_prelude+0xa4) [0x4df314]
0x48b515 /usr/bin/ruby [0x48b515]
0x4cb19a /usr/bin/ruby(rb_vm_call_cfunc+0xba) [0x4cb19a]
0x489884 /usr/bin/ruby(ruby_process_options+0xa4) [0x489884]
0x4177a0 /usr/bin/ruby(ruby_options+0x90) [0x4177a0]
0x4156c5 /usr/bin/ruby(main+0x45) [0x4156c5]
0x36aa61d994 /lib64/libc.so.6(__libc_start_main+0xf4) [0x36aa61d994]
0x4155c9 /usr/bin/ruby [0x4155c9]
[NOTE]
You may encounter a bug of Ruby interpreter. Bug reports are welcome.
For details: http://www.ruby-lang.org/bugreport.html
Also to answer your other question, this machine is replacing an existing server which originally had it installed in /usr/bin, which is why its installed there.
If you need any other information from me, let me know.
=end
Updated by Philippe (Philippe Latulippe) over 15 years ago
=begin
I'm getting something very similar. I compiled ruby-1.9-p376 with --prefix=/usr and after a day it would immediately crash when run. After recompiling, everything was fine for another day, then that crash again:
$ ruby
: compile/should not be reached: compile.c:473
ruby:32: [BUG] Segmentation fault
ruby 1.9.1p376 (2009-12-07 revision 26041) [i686-linux]
-- control frame ----------
c:0002 p:-40997560 s:0004 b:0004 l:000003 d:000003 TOP ruby:32
c:0001 p:0000 s:0002 b:0002 l:000dd4 d:000dd4 TOP¶
-- Ruby level backtrace information-----------------------------------------
-- C level backtrace information -------------------------------------------
0x811d378 ruby(rb_vm_bugreport+0x48) [0x811d378]
[NOTE]
You may encounter a bug of Ruby interpreter. Bug reports are welcome.
For details: http://www.ruby-lang.org/bugreport.html
Aborted
I am also on CentOS, just not the same version:
Linux 2.6.18-128.1.6.el5 #1 SMP Tue Apr 14 13:36:07 EDT 2009 i686 i686 i386 GNU/Linux
=end
Updated by rogerdpack (Roger Pack) over 15 years ago
=begin
what if you compile it with --prefix=xxx -- does it err?
could you post gdb backtrace information?
-r
=end
Updated by Philippe (Philippe Latulippe) about 15 years ago
=begin
This time it took exactly a month for it to happen again. Here is the backtrace after running "ruby" with no arguments.
I will compile it with the default prefix and report back if it breaks again, or in a month if it doesn't.
=end
Updated by twbrandt (Tom Brandt) about 15 years ago
=begin
I too am seeing this:
$ rails -v
internal:gem_prelude: compile/should not be reached: compile.c:473
/usr/bin/ruby:10808: [BUG] Segmentation fault
ruby 1.9.1p376 (2009-12-07 revision 26041) [x86_64-linux]
-- control frame ----------
c:0002 p:-20772724 s:0004 b:0004 l:000003 d:000003 TOP /usr/bin/ruby:10808
c:0001 p:0000 s:0002 b:0002 l:0012b8 d:0012b8 TOP¶
-- Ruby level backtrace information-----------------------------------------
-- C level backtrace information -------------------------------------------
0x4d86a1 /usr/bin/ruby(rb_vm_bugreport+0x41) [0x4d86a1]
0x503c5e /usr/bin/ruby [0x503c5e]
0x503dc1 /usr/bin/ruby(rb_bug+0xb1) [0x503dc1]
0x48c3cf /usr/bin/ruby [0x48c3cf]
0x368ba0e930 /lib64/libpthread.so.0 [0x368ba0e930]
0x4b97d5 /usr/bin/ruby [0x4b97d5]
0x4bb083 /usr/bin/ruby [0x4bb083]
0x4bd292 /usr/bin/ruby [0x4bd292]
0x4bb478 /usr/bin/ruby [0x4bb478]
0x4c3823 /usr/bin/ruby(rb_iseq_compile_node+0x6f3) [0x4c3823]
0x4c711c /usr/bin/ruby [0x4c711c]
0x4c718b /usr/bin/ruby(rb_iseq_new_with_opt+0x1b) [0x4c718b]
0x4bb00b /usr/bin/ruby [0x4bb00b]
0x4bd975 /usr/bin/ruby [0x4bd975]
0x4bb478 /usr/bin/ruby [0x4bb478]
0x4bbc49 /usr/bin/ruby [0x4bbc49]
0x4bb478 /usr/bin/ruby [0x4bb478]
0x4c3599 /usr/bin/ruby(rb_iseq_compile_node+0x469) [0x4c3599]
0x4c711c /usr/bin/ruby [0x4c711c]
0x4c718b /usr/bin/ruby(rb_iseq_new_with_opt+0x1b) [0x4c718b]
0x4c798d /usr/bin/ruby(rb_iseq_compile_with_option+0x13d) [0x4c798d]
0x4df314 /usr/bin/ruby(Init_prelude+0xa4) [0x4df314]
0x48b515 /usr/bin/ruby [0x48b515]
0x4cb19a /usr/bin/ruby(rb_vm_call_cfunc+0xba) [0x4cb19a]
0x489884 /usr/bin/ruby(ruby_process_options+0xa4) [0x489884]
0x4177a0 /usr/bin/ruby(ruby_options+0x90) [0x4177a0]
0x4156c5 /usr/bin/ruby(main+0x45) [0x4156c5]
0x368ae1d994 /lib64/libc.so.6(__libc_start_main+0xf4) [0x368ae1d994]
0x4155c9 /usr/bin/ruby [0x4155c9]
[NOTE]
You may encounter a bug of Ruby interpreter. Bug reports are welcome.
For details: http://www.ruby-lang.org/bugreport.html
Aborted
This is on CentOS 5.4 (Final)
I originally installed Ruby on 23 March 2010 and everything worked fine until today, 27 March 2010.
I have reinstalled it from the tarball, no problems yet.
=end
Updated by twbrandt (Tom Brandt) about 15 years ago
=begin
It happened again this morning:
$ cap deploy:migrations
internal:gem_prelude: compile/should not be reached: compile.c:473
/usr/bin/ruby:10808: [BUG] Segmentation fault
ruby 1.9.1p376 (2009-12-07 revision 26041) [x86_64-linux]
-- control frame ----------
c:0002 p:-7010164 s:0004 b:0004 l:000003 d:000003 TOP /usr/bin/ruby:10808
c:0001 p:0000 s:0002 b:0002 l:0010d8 d:0010d8 TOP¶
-- Ruby level backtrace information-----------------------------------------
-- C level backtrace information -------------------------------------------
0x4d86a1 /usr/bin/ruby(rb_vm_bugreport+0x41) [0x4d86a1]
0x503c5e /usr/bin/ruby [0x503c5e]
0x503dc1 /usr/bin/ruby(rb_bug+0xb1) [0x503dc1]
0x48c3cf /usr/bin/ruby [0x48c3cf]
0x368ba0e930 /lib64/libpthread.so.0 [0x368ba0e930]
0x4b97d5 /usr/bin/ruby [0x4b97d5]
0x4bb083 /usr/bin/ruby [0x4bb083]
0x4bd292 /usr/bin/ruby [0x4bd292]
0x4bb478 /usr/bin/ruby [0x4bb478]
0x4c3823 /usr/bin/ruby(rb_iseq_compile_node+0x6f3) [0x4c3823]
0x4c711c /usr/bin/ruby [0x4c711c]
0x4c718b /usr/bin/ruby(rb_iseq_new_with_opt+0x1b) [0x4c718b]
0x4bb00b /usr/bin/ruby [0x4bb00b]
0x4bd975 /usr/bin/ruby [0x4bd975]
0x4bb478 /usr/bin/ruby [0x4bb478]
0x4bbc49 /usr/bin/ruby [0x4bbc49]
0x4bb478 /usr/bin/ruby [0x4bb478]
0x4c3599 /usr/bin/ruby(rb_iseq_compile_node+0x469) [0x4c3599]
0x4c711c /usr/bin/ruby [0x4c711c]
0x4c718b /usr/bin/ruby(rb_iseq_new_with_opt+0x1b) [0x4c718b]
0x4c798d /usr/bin/ruby(rb_iseq_compile_with_option+0x13d) [0x4c798d]
0x4df314 /usr/bin/ruby(Init_prelude+0xa4) [0x4df314]
0x48b515 /usr/bin/ruby [0x48b515]
0x4cb19a /usr/bin/ruby(rb_vm_call_cfunc+0xba) [0x4cb19a]
0x489884 /usr/bin/ruby(ruby_process_options+0xa4) [0x489884]
0x4177a0 /usr/bin/ruby(ruby_options+0x90) [0x4177a0]
0x4156c5 /usr/bin/ruby(main+0x45) [0x4156c5]
0x368ae1d994 /lib64/libc.so.6(__libc_start_main+0xf4) [0x368ae1d994]
0x4155c9 /usr/bin/ruby [0x4155c9]
[NOTE]
You may encounter a bug of Ruby interpreter. Bug reports are welcome.
For details: http://www.ruby-lang.org/bugreport.html
Aborted
=end
Updated by mame (Yusuke Endoh) about 15 years ago
- Status changed from Open to Rejected
=begin
Hi,
I found a mail in ruby-talk (Thanks, Douglas Seifert!):
On some redhat based distros, if you compile ruby 1.9.1 from source and
install it as /usr/bin/ruby and have the "prelink" rpm installed, the ruby
binary can become corrupted by prelink.
snip
The solution is to either uninstall the prelink package or add the following
line to /etc/prelink.conf-b /usr/bin/ruby
This tells prelink to not touch the ruby interpreter.
So this is not a bug of ruby.
CentOS is really annoying, but I recommend you not to install /usr/bin
directly on Linux. It violates FHS.
I found the following Japanese article too:
"prelink in CentOS 4.7 corrupts a binary of 1.9.1"
"CentOS 4.7 では prelink が ruby 1.9.1 のバイナリを破壊する"
http://www.moreslowly.jp/mw/index.php?title=CentOS_4.7_%E3%81%A7%E3%81%AF_prelink_%E3%81%8C_ruby_1.9.1_%E3%81%AE%E3%83%90%E3%82%A4%E3%83%8A%E3%83%AA%E3%82%92%E7%A0%B4%E5%A3%8A%E3%81%99%E3%82%8B
--
Yusuke Endoh [email protected]
=end