6

Is it just me, or has Ruby 1.9.3 introduced frequent segmentation faults when running RSpec?

Since upgrading to 1.9.3, I find startup time is noticeably quicker, however I get segmentation faults when running RSpec around 50% of the time.

The output that I am getting from Ruby is at http://pastebin.com/89YmpzaJ and my Gemfile is at http://pastebin.com/L6r73Max

Does anyone know what could be causing this? I am seeing this problem on both my CI server and my local development machine.

Matthew O'Riordan
  • 7,981
  • 4
  • 45
  • 59
  • I have add segmentation faults trying to use rails 3.1 with ruby 1.8.7 that went away when I made sure rails used 1.9.2+ Don't know if that helps (so not an answer) but I thought I would mention it. Sometimes when you have multiple ruby versions the wrong one gets picked too. – Michael Durrant Nov 09 '11 at 13:40

3 Answers3

7

There appears to be a problem with pry-doc/yard that can cause segfaults in yard. The best workaround I know of is to simply not use pry-doc. Pry-rails depends on pry-doc as a convenience, so in addition to removing pry-doc from your Gemfile, you will need modify pry-rails to remove its dependency on pry-doc.

(I've already forked pry-rails to do that: https://github.com/chrisfarber/pry-rails.)

Chris Farber
  • 336
  • 2
  • 5
1

the problem doesn't lie with ruby 1.9.3 but with your compiler, i guess you're on mac os x lio n and use Xcode 4.2? the new default compiler (llvm) somehow introduces a bug, which causes the continuation check in yard to cause a seg fault. as far as i remember, it should work, if you compile it with gcc 4.2

i think, this should do it

CC=gcc-4.2 rvm install 1.9.3
Marian Theisen
  • 6,100
  • 29
  • 39
0

I had the same problem and after updating pry-doc to version 0.4.2, rspec runs all the time with out "segmentation faults"

user773093
  • 149
  • 1
  • 3