1

The following errors when I run rspec:

rspec spec/mailers/lead_mailer_spec.rb
/Users/ryanbales/.rvm/gems/ruby-1.9.3-p484/gems/honeybadger-1.16.1/lib/honeybadger/exception_extensions.rb:11: [BUG] Segmentation fault
ruby 1.9.3p484 (2013-11-22 revision 43786) [x86_64-darwin14.1.0]
..............................
[NOTE]
You may have encountered a bug in the Ruby interpreter or extension libraries.
Bug reports are welcome.
For details: http://www.ruby-lang.org/bugreport.html

https://gist.github.com/ryankbales/b1732adee7fe503627d1

(The full error and stack trace are in the provided gist above)

I've gone through several solutions without finding the permanent one yet. At most I can run the spec in the gist above twice without reproducing and than it will go back to the same segfault. It will happen with any spec actually, but this is the one I am working on at the moment.

On a hunch, I ran brew link openssl, however that didn't help. The solutions that did get the spec to run a couple times were the popular "uninstall & reinstall nokogiri", gem pristine --all along with a complete recompile of the ruby gemset using rvm.

Here's some stats:

Rails 3.0.20 ruby 1.9.3p484 OSX Yosemite 10.10.2

Thanks.

RyanKB
  • 11
  • 3

1 Answers1

0

I can't give a full answer, but at least I can start you down the path. Segfaults are extremely difficult to figure out in Ruby (or at least they are for me).

In my experience, they're generally caused by a couple offending gems but occasionally Ruby itself. My first inkling would be to look at any of the gems that compile native extensions. Nokogiri, as you noted above, is a popular offender. ImageMagick, and some of the parsers can be bad too. You can use this page to find suspects: https://stackoverflow.com/a/24313346/203731

If you don't have a lot of C extension gems, try installing a different patch level of Ruby. I had a lot of trouble with 1.9.3p280 but my coworkers had no trouble with it. Then they couldn't handle p484 while I laughed and pranced about the room showing off my glorious p484 install (It was a slow day).

Anyways, I'm guessing this is for your local dev environment, so using an outdated Ruby patchlevel probably won't do you too much harm. Maybe don't got to DEFCON with it unpatched.

If none of those work, it may be time to start selectively commenting out parts of your Gemfile, bundling, then running rspec. It's not pretty, but it would probably work.

I hope this helps!

Community
  • 1
  • 1
Chuck Vose
  • 4,560
  • 24
  • 31