Doug Bryant

Tech thought and notes

Ruby 1.8.4 on FreeBSD Core Dumps

I spent the better part of the last couple of days trying to track down why after upgrading to Ruby 1.8.4 on FreeBSD, I started getting core dumps in one particular place in my application.

After much time on IRC and some gdb voodoo I finally figured out the source of the problem. There appeared to be a stack management problem. Even with 64 meg of stack space, ruby would core dump. This behavior did not occur on OSX.

I emailed the ruby-core mailing list and one of the FreeBSD guys got right back to me.

Apparently the problem is with the freebsd pthread implementation and ruby.

Solution – install the port ruby18-nopthreads

Magically the problem disappears.