Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Critical
-
Resolution: Fixed
-
Affects Version/s: 0.6.10, 0.6.12
-
Fix Version/s: 6.14.0
-
Component/s: Platform
-
Environment:Hide
Solaris 11, fully patched running under VMware Fusion 4.
Ruby as installed by the OS, with an updated rubygems.[uname -a] SunOS s11u0-a 5.11 11.0 i86pc i386 i86pc
[ruby -v] ruby 1.8.7 (2011-02-18 patchlevel 334) [i386-solaris2.11]
[gem -v] 1.8.15Also fails on Ubuntu 12.04 with stock ruby (1.8.7 p352)
ShowSolaris 11, fully patched running under VMware Fusion 4. Ruby as installed by the OS, with an updated rubygems. [uname -a] SunOS s11u0-a 5.11 11.0 i86pc i386 i86pc [ruby -v] ruby 1.8.7 (2011-02-18 patchlevel 334) [i386-solaris2.11] [gem -v] 1.8.15 Also fails on Ubuntu 12.04 with stock ruby (1.8.7 p352)
Description
Ohai segfaults out ruby when running the solaris2::dmi plugin as it calls popen4. It may be an issue with Oracle's build of ruby as well, but it's being triggered in the popen4 function from ohai/mixin/command.rb. It smells like a ruby issue to me, but looking for another opinion before I give up on bootstrapping Solaris 11 without building a new ruby.
I'll put up the core file on request along with full logs if needed.
$ irb
irb(main):001:0> require 'rubygems'
=> true
irb(main):002:0> require 'ohai'
=> true
irb(main):003:0> ohai = Ohai::System.new()
=> #<Ohai::System:0x8440180 @plugin_path="", @data={}, @providers={}, @seen_plugins={}>
irb(main):004:0> ohai.require_plugin("solaris2::dmi")
/var/ruby/1.8/gem_home/gems/ohai-0.6.10/lib/ohai/mixin/command.rb:284: [BUG] Segmentation fault
ruby 1.8.7 (2011-02-18 patchlevel 334) [i386-solaris2.11]
Abort (core dumped)
gdb /usr/bin/ruby
GNU gdb 6.8
Copyright (C) 2008 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "i386-pc-solaris2.11"...
(gdb) core core-irb
... [libraries]
(gdb) bt
#0 0xfeaa87f5 in _lwp_kill () from /usr/lib/libc.so.1
#1 0xfeaa16fa in thr_kill () from /usr/lib/libc.so.1
#2 0xfea50d5d in raise () from /usr/lib/libc.so.1
#3 0xfea288fd in abort () from /usr/lib/libc.so.1
#4 0xfee13d32 in rb_bug () from /usr/ruby/1.8/lib/libruby.so
#5 0xfeef84f9 in sigsegv () from /usr/ruby/1.8/lib/libruby.so
#6 0xfeaa3d45 in __sighndlr () from /usr/lib/libc.so.1
#7 0xfea9731b in call_user_handler () from /usr/lib/libc.so.1
#8 <signal handler called>
#9 0xfeefcf8c in st_foreach () from /usr/ruby/1.8/lib/libruby.so
#10 0x08059fbf in rb_mark_tbl ()
#11 0xfee9f718 in mark_load_arg () from /usr/ruby/1.8/lib/libruby.so
#12 0x0805ae8b in gc_mark_children ()
#13 0x0805c846 in garbage_collect ()
#14 0x080598a6 in rb_newobj ()
#15 0xfeefdb3d in rb_str_buf_new () from /usr/ruby/1.8/lib/libruby.so
#16 0xfee7645c in rb_io_getline_fast () from /usr/ruby/1.8/lib/libruby.so
#17 0xfee78d73 in rb_io_gets_m () from /usr/ruby/1.8/lib/libruby.so
#18 0x08079920 in rb_call0 ()
#19 0x0807a78c in rb_call ()
#20 0x0806ad2f in rb_eval ()
#21 0x08069b43 in rb_eval ()
,,, [lots of rb_call, rb_eval]
(gdb) bt
Can you try to wrap in a GC.disable and GC.enable pair like the patch I have on
CHEF-2916to popen4 in lib/ohai/mixin/command.rb ?