You are not logged in.

#1 2012-04-13 16:52:00

synthead
Member
From: Seattle
Registered: 2006-05-09
Posts: 1,326

ruby-enterprise 1.8.7-12: timeout.rb:60: [BUG] Segmentation fault

Something in timeout.rb is making gem segfault.  There's discussion around the Internet about glibc 2.14 giving ruby a hard time, so perhaps this is relavant to the issue, being that we're on 2.15 now?

$ sudo gem update --system
/opt/ruby-enterprise/lib/ruby/1.8/timeout.rb:60: [BUG] Segmentation fault
ruby 1.8.7 (2012-02-08 MBARI 8/0x6770 on patchlevel 358) [x86_64-linux], MBARI 0x6770, Ruby Enterprise Edition 2012.02

Where line 60 lives:

 52   def timeout(sec, klass = nil)
 53     return yield if sec == nil or sec.zero?
 54     raise ThreadError, "timeout within critical session" if Thread.critical
 55     exception = klass || Class.new(ExitException)
 56     begin
 57       x = Thread.current
 58       y = Thread.start {
 59         begin
 60           sleep sec
 61         rescue => e
 62           x.raise e
 63         else
 64           x.raise exception, "execution expired" if x.alive?
 65         end
 66       }
 67       yield sec
 68       #    return true
 69     rescue exception => e
 70       rej = /\A#{Regexp.quote(__FILE__)}:#{__LINE__-4}\z/o
 71       (bt = e.backtrace).reject! {|m| rej =~ m}
 72       level = -caller(CALLER_OFFSET).size
 73       while THIS_FILE =~ bt[level]
 74         bt.delete_at(level)
 75         level += 1
 76       end
 77       raise if klass            # if exception class is specified, it
 78                                 # would be expected outside.
 79       raise Error, e.message, e.backtrace
 80     ensure
 81       if y and y.alive?
 82         y.kill
 83         y.join # make sure y is dead.
 84       end
 85     end
 86   end

Touch my kernel

Offline

#2 2012-04-20 11:07:35

whites11
Member
Registered: 2010-03-23
Posts: 18

Re: ruby-enterprise 1.8.7-12: timeout.rb:60: [BUG] Segmentation fault

same here with ruby 1.8.7 and ree sad

Offline

#3 2012-04-22 17:56:38

synthead
Member
From: Seattle
Registered: 2006-05-09
Posts: 1,326

Re: ruby-enterprise 1.8.7-12: timeout.rb:60: [BUG] Segmentation fault

Until a patch gets worked out, this seems to be a good way to get it moving: https://bbs.archlinux.org/viewtopic.php?id=139547


Touch my kernel

Offline

#4 2012-04-23 13:54:30

synthead
Member
From: Seattle
Registered: 2006-05-09
Posts: 1,326

Re: ruby-enterprise 1.8.7-12: timeout.rb:60: [BUG] Segmentation fault

Yeah! Solved!

Install gcc45 from the AUR, compile and install it, then download the ruby-enterprise from the AUR and compile it like so:

CC=gcc-4.5 makepkg

Install the compiled Ruby EE package, and wham, it works.


Touch my kernel

Offline

#5 2012-05-10 19:11:23

lfxgroove
Member
Registered: 2012-05-10
Posts: 13

Re: ruby-enterprise 1.8.7-12: timeout.rb:60: [BUG] Segmentation fault

If you're using rvm it should work the same way, ie:

CC=gcc-4.5 rvm install ree

or some other package of your choice

Offline

#6 2012-07-23 14:39:53

sardaukar
Member
From: Netherlands
Registered: 2011-01-05
Posts: 32
Website

Re: ruby-enterprise 1.8.7-12: timeout.rb:60: [BUG] Segmentation fault

Thanks for the tip!

Offline

Board footer

Powered by FluxBB