This project is archived and is in readonly mode.

#3654 ✓wontfix
Rhett Sutphin

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

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

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 .

Comments and changes to this ticket

  • Seth Ladd

    Seth Ladd March 24th, 2010 @ 09:28 AM

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

  • Seth Ladd

    Seth Ladd March 24th, 2010 @ 09:31 AM

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

  • Anthony Eden

    Anthony Eden March 24th, 2010 @ 05:23 PM

    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 ...

  • Anthony Eden

    Anthony Eden March 24th, 2010 @ 05:24 PM

    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 ...

  • Rhett Sutphin

    Rhett Sutphin March 25th, 2010 @ 04:22 PM

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

  • Denis Odorcic

    Denis Odorcic March 25th, 2010 @ 07:31 PM

    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.

  • Jeremy Kemper

    Jeremy Kemper March 25th, 2010 @ 10:44 PM

    • 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/

  • Rhett Sutphin

    Rhett Sutphin March 25th, 2010 @ 10:50 PM

    • 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.

  • Jeremy Kemper

    Jeremy Kemper March 25th, 2010 @ 11:45 PM

    Definitely for the release notes. This is unfortunate :(

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

  • Rhett Sutphin

    Rhett Sutphin March 26th, 2010 @ 03:20 PM

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

  • Jeremy Kemper

    Jeremy Kemper March 26th, 2010 @ 04:35 PM

    Thanks for verifying, Rhett. Pretty major regression.

  • Jeremy Kemper

    Jeremy Kemper March 26th, 2010 @ 04:37 PM

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

  • Rhett Sutphin

    Rhett Sutphin March 26th, 2010 @ 06:11 PM

    • 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.

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

<h2 style="font-size: 14px">Tickets have moved to Github</h2>

The new ticket tracker is available at <a href="https://github.com/rails/rails/issues">https://github.com/rails/rails/issues</a>

Pages