Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

This project is archived and is in readonly mode.

Segmentation fault in ActiveSupport::Multibyte::UnicodeDatabase on MRI 1.8.7-p248

#3654

Invoking ActiveSupport::Multibyte::UnicodeDatabase#load segfaults on ruby 1.8.7-p248. I tested with both edge (ae270f597decb66444d91b27509c7dc1fc24a6b6) and 2-3-stable (c362a76d00c9d023e23fb15aae638512a09e2948). You can see this crash in the test suite (i.e., by running rake test from the activesupport root) or with the following irb session (also from the activesupport root):

irb(main):001:0> require './lib/active_support/multibyte/unicode_database.rb'
=> true
irb(main):002:0> ActiveSupport::Multibyte::UnicodeDatabase.new.codepoints
./lib/active_support/multibyte/unicode_database.rb:37: [BUG] Segmentation fault
ruby 1.8.7 (2009-12-24 patchlevel 248) [i686-darwin9.8.0]

Abort trap

This does not happen on ruby 1.8.7-p174. All my testing was done on OS X 10.5.8 using MRIs as installed by rvm.

There is some indication that the problem is with ruby rather than activesupport itself -- e.g., rake gem ; gem install pkg/activesupport-3.0.pre.gem will also segfault under p248. I'm reporting it here because p248 is the current release of 1.8.7 and rails-core might want to note the incompatibility if it doesn't turn out to be fixable. I've reported the bug on the MRI issue tracker as issue 2257: http://redmine.ruby-lang.org/issues/show/2557 .

Reported by Rhett Sutphin · January 4th, 2010 @ 09:33 PM

State: wontfix
Milestone: none
Assigned to: nobody
Importance: Low

Activity

  1. Seth Ladd
    Seth Ladd

    I just ran into this. I have the same version of Ruby (installed via rvm) on a Mac OS X Leopard machine.

    March 24th, 2010 @ 09:28 AM

  2. Seth Ladd
    Seth Ladd

    Looks like all you can do for now is downgrade to ruby-1.8.7-p174

    March 24th, 2010 @ 09:31 AM

  3. Anthony Eden
    Anthony Eden

    Have you tried going to ruby-1.8.7-p249? I just tried:

    ~ [ruby-1.8.7-p249]$ irb -rubygems ruby-1.8.7-p249 > require 'active_support'
    => true ruby-1.8.7-p249 > ActiveSupport::Multibyte::UnicodeDatabase.new.codepoints
    => {6148=>#<ActiveSupport::Multibyte::Codepoint:0x1018d4b48 @code=6148, @decomp_mapping=nil, @decomp_type=nil, @lowercase_mapping=0, @combining_class=0, @uppercase_mapping=0>, 10247=>#<ActiveSupport::Multibyte::Codepoint:0x1018d4af8 @code=10247, @decomp_mapping=nil, @decomp_type=nil, @lowercase_mapping=0, @combining_class=0, @uppercase_mapping=0>, 43039=>#<ActiveSupport::Multibyte::Codepoint:0x1018d4b98 @code=43039, @decomp_mapping=nil, @decomp_type=nil, @lowercase_mapping=0, @combining_class=0, @uppercase_mapping=0>, 67633=>#<ActiveSupport::Multibyte::Codepoint:0x1018d4be8 @code=67633, @decomp_mapping=nil, @decomp_type=nil, @lowercase_mapping=0, @combining_class=0, @uppercase_mapping=0>, 194702=>#<ActiveSupport::Multibyte::Codepoint:0x1018d4d50 @code=194702, @decomp_mapping=[24266], @decomp_type=nil, @lowercase_mapping=0, @combining_class=0, @uppercase_mapping=0>, 4099=>#<ActiveSupport::Multibyte::Codepoint:0x1018d4968 @code=4099, @decomp_mapping=nil, @decomp_type=nil, @lowercase_mapping=0, @combining_class=0, @uppercase_mapping=0>,... etc ...

    March 24th, 2010 @ 05:23 PM

  4. Anthony Eden
    Anthony Eden

    Have you tried going to ruby-1.8.7-p249? I just tried:

    ~ [ruby-1.8.7-p249]$ irb -rubygems ruby-1.8.7-p249 > require 'active_support'
    => true ruby-1.8.7-p249 > ActiveSupport::Multibyte::UnicodeDatabase.new.codepoints
    => {6148=>#<ActiveSupport::Multibyte::Codepoint:0x1018d4b48 @code=6148, @decomp_mapping=nil, @decomp_type=nil, @lowercase_mapping=0, @combining_class=0, @uppercase_mapping=0>, 10247=>#<ActiveSupport::Multibyte::Codepoint:0x1018d4af8 @code=10247, @decomp_mapping=nil, @decomp_type=nil, @lowercase_mapping=0, @combining_class=0, @uppercase_mapping=0>, 43039=>#<ActiveSupport::Multibyte::Codepoint:0x1018d4b98 @code=43039, @decomp_mapping=nil, @decomp_type=nil, @lowercase_mapping=0, @combining_class=0, @uppercase_mapping=0>, 67633=>#<ActiveSupport::Multibyte::Codepoint:0x1018d4be8 @code=67633, @decomp_mapping=nil, @decomp_type=nil, @lowercase_mapping=0, @combining_class=0, @uppercase_mapping=0>, 194702=>#<ActiveSupport::Multibyte::Codepoint:0x1018d4d50 @code=194702, @decomp_mapping=[24266], @decomp_type=nil, @lowercase_mapping=0, @combining_class=0, @uppercase_mapping=0>, 4099=>#<ActiveSupport::Multibyte::Codepoint:0x1018d4968 @code=4099, @decomp_mapping=nil, @decomp_type=nil, @lowercase_mapping=0, @combining_class=0, @uppercase_mapping=0>,... etc ...

    March 24th, 2010 @ 05:24 PM

  5. Rhett Sutphin
    Rhett Sutphin

    I still see the problem with 1.8.7-p249. What platform are you using, Anthony?

    March 25th, 2010 @ 04:22 PM

  6. Denis Odorcic
    Denis Odorcic

    I can confirm that I get this problem all the time as well in 1.8.7-p249 and 248. I use the same setups as you guys as well.

    March 25th, 2010 @ 07:31 PM

  7. Jeremy Kemper
    Jeremy Kemper
    • State changed from new to wontfix

    Sorry about this, but it's a Ruby issue. Please do raise it on http://redmine.ruby-lang.org/

    March 25th, 2010 @ 10:44 PM

  8. Rhett Sutphin
    Rhett Sutphin
    • Tag changed from 1.8.7, crash, ruby to 1.8.7, crash, documentation, ruby

    Per the original report, it has been reported at ruby-lang: http://redmine.ruby-lang.org/issues/show/2557 .

    I appreciate that it's not something that can be fixed in rails, but given that 3.0 is going to be 1.8.7+ and that AS segfaults on a popular platform for rails development on the current release of 1.8.7, it seems like something you'd want to list in the release notes.

    March 25th, 2010 @ 10:50 PM

  9. Jeremy Kemper
    Jeremy Kemper

    Definitely for the release notes. This is unfortunate :(

    Do you get the same crash on Rails 2.3? On git master?

    March 25th, 2010 @ 11:45 PM

  10. Rhett Sutphin
    Rhett Sutphin

    I had done my testing on master, so yes to that. I just tried 2-3-stable and it segfaults the same way there.

    March 26th, 2010 @ 03:20 PM

  11. Jeremy Kemper
    Jeremy Kemper

    Thanks for verifying, Rhett. Pretty major regression.

    March 26th, 2010 @ 04:35 PM

  12. Jeremy Kemper
    Jeremy Kemper

    Look like all we need is a new 1.8.7 release, since it's fixed in ruby svn already. Whew!

    March 26th, 2010 @ 04:37 PM

  13. Rhett Sutphin
    Rhett Sutphin
    • Tag changed from 1.8.7, crash, documentation, ruby to os x, 1.8.7, crash, documentation, ruby

    it's fixed in ruby svn already

    Would that it were so. With a just-installed 1.8.7 from SVN HEAD (rvm's 1.8.7-head), I still get the segfault on OS X.

    On the bright side, I finally got around to trying this on something other than OS X. The segfault does not occur on Ubuntu (kernel version 2.6.28-18-server) with 1.8.7-p249. Seems like it is OS X-only.

    March 26th, 2010 @ 06:11 PM