OpenCSW Bug Tracker


Viewing Issue Simple Details Jump to Notes ] View Advanced ] Issue History ] Print ]
ID Category Severity Reproducibility Date Submitted Last Update
0004399 [ruby] regular use minor sometimes 2010-04-16 18:09 2010-12-04 20:00
Reporter nutznboltz View Status public  
Assigned To bwalton
Priority normal Resolution fixed  
Status closed  
Summary 0004399: Segmentation Fault in Garbage Collection for Ruby 1.8.7 prior to Dec 2009
Description A known bug exists in Ruby that causes it crash with segmentation faults (SIGSEGV, signal 11, etc.) when it allocates objects frequently.

This is causing the Ops Code Chef client to crash on our Solaris 10 systems.

A upstream fix was released. Could someone rebuild the OpenCSW Ruby from the latest 1.8.7 sources?
Additional Information http://www.ruby-forum.com/topic/161876 [^]

``With 1.8.7, the ruby developers chose to change both the public APIs and aspects of the GC/memory management internals.''

http://www.ruby-forum.com/topic/198545 [^]

``Ruby-core > [Bug 0002326] 1.8.7 Segmentation fault''
Tags No tags attached.
Attached Files

- Relationships

-  Notes
(0007868)
bwalton (administrator)
2010-04-17 03:18

I'll get to this asap. Currently, I'm unable to update the rbconfig.rb.GCC4 due to a gcc4 bug.

Will queue.
(0007890)
nutznboltz (reporter)
2010-04-19 15:56

Thank you kindly!
(0008030)
nutznboltz (reporter)
2010-06-15 21:47

Is your problem:
ld.so.1: ruby: fatal: libgcc_s.so.1: open failed: No such file or directory

You can work around that by invoking configure with DLDFLAGS=-Wl,-R,/opt/csw/gcc4/lib

My complete configure options are:

--prefix=/opt/csw --exec_prefix=/opt/csw --bindir=/opt/csw/bin --sbindir=/opt/csw/sbin --libexecdir=/opt/csw/libexec --datadir=/opt/csw/share --sysconfdir=/opt/csw/etc --sharedstatedir=/opt/csw/share --localstatedir=/opt/csw/var --libdir=/opt/csw/lib --infodir=/opt/csw/share/info --includedir=/opt/csw/include --mandir=/opt/csw/share/man --enable-pthread --enable-shared --with-tcl-dir=/opt/csw --with-tk-dir=/opt/csw --with-dbm-dir=/opt/csw --with-gdbm-dir=/opt/csw --with-iconv-dir=/opt/csw --with-openssl-dir=/opt/csw --with-readline-dir=/opt/csw --with-zlib-dir=/opt/csw --enable-install-doc CC=/opt/csw/gcc4/bin/gcc 'CFLAGS=-mtune=i686 -O2 -pipe -m32 -march=i386 -I/opt/csw/include' 'LDFLAGS=-L/opt/csw/gcc4/lib/. -m32 -march=i386 -R /opt/csw/gcc4/lib -L/opt/csw/lib' CPPFLAGS=-I/opt/csw/include DLDFLAGS=-Wl,-R,/opt/csw/gcc4/lib
(0008031)
nutznboltz (reporter)
2010-06-15 22:16

$ ruby --version
ruby 1.8.7 (2010-01-10 patchlevel 249) [i386-solaris2.10]

$ ruby -r rbconfig -e 'puts Config::CONFIG["configure_args"]'
 '--prefix=/opt/csw' '--exec_prefix=/opt/csw' '--bindir=/opt/csw/bin' '--sbindir=/opt/csw/sbin' '--libexecdir=/opt/csw/libexec' '--datadir=/opt/csw/share' '--sysconfdir=/opt/csw/etc' '--sharedstatedir=/opt/csw/share' '--localstatedir=/opt/csw/var' '--libdir=/opt/csw/lib' '--infodir=/opt/csw/share/info' '--includedir=/opt/csw/include' '--mandir=/opt/csw/share/man' '--enable-pthread' '--enable-shared' '--with-tcl-dir=/opt/csw' '--with-tk-dir=/opt/csw' '--with-dbm-dir=/opt/csw' '--with-gdbm-dir=/opt/csw' '--with-iconv-dir=/opt/csw' '--with-openssl-dir=/opt/csw' '--with-readline-dir=/opt/csw' '--with-zlib-dir=/opt/csw' '--enable-install-doc' 'CC=/opt/csw/gcc4/bin/gcc' 'CFLAGS=-mtune=i686 -O2 -pipe -m32 -march=i386 -I/opt/csw/include' 'LDFLAGS=-L/opt/csw/gcc4/lib/. -m32 -march=i386 -R /opt/csw/gcc4/lib -L/opt/csw/lib' 'CPPFLAGS=-I/opt/csw/include' 'DLDFLAGS=-Wl,-R,/opt/csw/gcc4/lib'
(0008034)
nutznboltz (reporter)
2010-06-16 17:18

http://redmine.ruby-lang.org/issues/show/2247 [^]
says: {{ Also, when compiling with a recent gcc at optimization level -O2 (or higher), util.c throws a number of warnings about breaking strict-aliasing rules. There is no /easy/ fix for this, but the work-around is to simply compile that one file with -fno-strict-aliasing ... }}
(0008035)
nutznboltz (reporter)
2010-06-16 17:34

$ ruby --version
ruby 1.8.7 (2010-01-10 patchlevel 249) [i386-solaris2.10]

$ ruby -r rbconfig -e 'puts Config::CONFIG["configure_args"]'
 '--prefix=/opt/csw' '--exec_prefix=/opt/csw' '--bindir=/opt/csw/bin' '--sbindir=/opt/csw/sbin' '--libexecdir=/opt/csw/libexec' '--datadir=/opt/csw/share' '--sysconfdir=/opt/csw/etc' '--sharedstatedir=/opt/csw/share' '--localstatedir=/opt/csw/var' '--libdir=/opt/csw/lib' '--infodir=/opt/csw/share/info' '--includedir=/opt/csw/include' '--mandir=/opt/csw/share/man' '--enable-pthread' '--enable-shared' '--with-tcl-dir=/opt/csw' '--with-tk-dir=/opt/csw' '--with-dbm-dir=/opt/csw' '--with-gdbm-dir=/opt/csw' '--with-iconv-dir=/opt/csw' '--with-openssl-dir=/opt/csw' '--with-readline-dir=/opt/csw' '--with-zlib-dir=/opt/csw' '--enable-install-doc' 'CC=/opt/csw/gcc4/bin/gcc' 'CFLAGS=-mtune=i686 -O2 -fno-strict-aliasing -pipe -m32 -march=i386 -I/opt/csw/include' 'LDFLAGS=-L/opt/csw/gcc4/lib/. -m32 -march=i386 -R /opt/csw/gcc4/lib -L/opt/csw/lib' 'CPPFLAGS=-I/opt/csw/include' 'DLDFLAGS=-R/opt/csw/gcc4/lib'
(0008036)
nutznboltz (reporter)
2010-06-16 21:46
edited on: 2010-06-16 21:55

Unfortunately, Chef and Puppet get stuck looping on:
lwp_park(0xFE46EF30, 0) Err#62 ETIME
with that Ruby.

Attempting with --disable-fastthread does not improve this situation.

Chef and Puppet work fine with
$ ruby --version
ruby 1.8.6 (2010-02-05 patchlevel 399) [i386-solaris2.10]


$ ruby -r rbconfig -e 'puts Config::CONFIG["configure_args"]' '--prefix=/opt/csw' '--exec_prefix=/opt/csw' '--bindir=/opt/csw/bin' '--sbindir=/opt/csw/sbin' '--libexecdir=/opt/csw/libexec' '--datadir=/opt/csw/share' '--sysconfdir=/opt/csw/etc' '--sharedstatedir=/opt/csw/share' '--localstatedir=/opt/csw/var' '--libdir=/opt/csw/lib' '--infodir=/opt/csw/share/info' '--includedir=/opt/csw/include' '--mandir=/opt/csw/share/man' '--enable-pthread' '--enable-shared' '--enable-install-doc' 'CC=/opt/csw/gcc4/bin/gcc' 'CFLAGS=-mtune=i686 -O2 -fno-strict-aliasing -pipe -m32 -march=i386 -I/opt/csw/include' 'LDFLAGS=-L/opt/csw/gcc4/lib/. -m32 -march=i386 -R /opt/csw/gcc4/lib -L/opt/csw/lib' 'CPPFLAGS=-I/opt/csw/include' 'DLDFLAGS=-R/opt/csw/gcc4/lib'

(0008108)
bwalton (administrator)
2010-07-13 03:15

I'm hoping to have updated packages in my experimental repo by tomorrow. Sorry for the long delay on this.
(0008111)
bwalton (administrator)
2010-07-14 04:46

Please test the updated packages available from: http://mirror.opencsw.org/experimental.html#bwalton [^]

Thanks.
(0008129)
nutznboltz (reporter)
2010-07-22 21:41

$ ruby --version
ruby 1.8.7 (2010-06-23 patchlevel 299) [i386-solaris2.9]

$ ruby -r rbconfig -e 'puts Config::CONFIG["configure_args"]'
 '--prefix=/opt/csw' '--exec_prefix=/opt/csw' '--bindir=/opt/csw/bin' '--sbindir=/opt/csw/sbin' '--libexecdir=/opt/csw/libexec' '--datadir=/opt/csw/share' '--sysconfdir=/opt/csw/etc' '--sharedstatedir=/opt/csw/share' '--localstatedir=/opt/csw/var' '--libdir=/opt/csw/lib' '--infodir=/opt/csw/share/info' '--includedir=/opt/csw/include' '--mandir=/opt/csw/share/man' '--enable-pthread' '--enable-shared' '--with-tcl-dir=/opt/csw' '--with-tk-dir=/opt/csw' '--with-dbm-dir=/opt/csw/bdb48' '--with-gdbm-dir=/opt/csw' '--with-iconv-dir=/opt/csw' '--with-openssl-dir=/opt/csw' '--with-readline-dir=/opt/csw' '--with-zlib-dir=/opt/csw' '--enable-install-doc' 'CC=/opt/studio/SOS12/SUNWspro/bin/cc' 'CFLAGS=-xO3 -m32 -xarch=386 -xnorunpath' 'LDFLAGS=-L/opt/csw/lib' 'CPPFLAGS=-I/opt/csw/include'
(0008130)
nutznboltz (reporter)
2010-07-22 22:21

I have installed the ruby and rubydev packages and Chef and Puppet are running to completion without errors. They are run every 30 minutes from cron. I'll let you know how they are again tomorrow.
(0008145)
nutznboltz (reporter)
2010-07-29 18:25

I'm still getting E-mail from cron about chef-client segfaulting with the Ruby 1.8.7p299 you provided.

I'm not seeing any E-mail from the zones running chef-client on Ruby 1.8.6p399 I built.
(0008151)
bwalton (administrator)
2010-07-31 04:12

Ok, but down-revving ruby isn't really an option...Let me dig around a bit and see if there are any 'test' patches that can be applied.
(0008424)
bwalton (administrator)
2010-10-28 03:54

I'm rolling a new package with a patch that will hopefully address this issue. Will you be able to test them when they're ready?

Thanks
-Ben
(0008426)
bwalton (administrator)
2010-10-31 13:39

Ok, there are updated ruby packages available here: http://buildfarm.opencsw.org/experimental.html#ruby [^]

Aside from the patch to (hopefully) fix the GC segfault, there is also a change to the libruby.so.1 SONAME. These changes will likely break binary gems and I'm still determining the best course of action (short term, simply install CSWrubydev). You should still be able to perform the testing required to ensure the GC issue is or is not handled though.
(0008519)
bwalton (administrator)
2010-12-04 19:22

Ok, this seems to work ok. Can you verify it against your segfault issue. I'd like to release these...
(0008520)
nutznboltz (reporter)
2010-12-04 19:45

It all works great! Thanks so much!
(0008521)
bwalton (administrator)
2010-12-04 19:59

Pushed to release.

-Ben


Copyright © 2000 - 2008 Mantis Group
Powered by Mantis Bugtracker