JRuby (please use github issues at http://bugs.jruby.org)
  1. JRuby (please use github issues at http://bugs.jruby.org)
  2. JRUBY-6345

sigsegv at BitMap::set_union(BitMap)+0x20 while updating rubygems

    Details

    • Type: Bug Bug
    • Status: Closed Closed
    • Priority: Major Major
    • Resolution: Not A Bug
    • Affects Version/s: JRuby 1.7.0.pre1
    • Fix Version/s: None
    • Component/s: None
    • Environment:
      Linux (Ubuntu 10.04LTS)
      Oracle JRE7u2
      rubygems 1.3.7 or 1.8.5
    • Number of attachments :
      0

      Description

      While doing a fresh install of JRuby 1.7.0dev (2012-01-12 11:11 build) and then running update_rubygems (with rubygems-update version 1.3.7 or 1.8.5 - both behave the same), I get the following sigsev error if I use the Oracle JRE7u2 without turning off the invokedynamic:

      root@jic:/home/jchiu/jr17# update_rubygems
      RubyGems 1.8.5 installed
      #
      # A fatal error has been detected by the Java Runtime Environment:
      #
      #  SIGSEGV (0xb) at pc=0xb6d8e9c0, pid=21281, tid=2425326448
      #
      # JRE version: 7.0_02-b13
      # Java VM: Java HotSpot(TM) Client VM (22.0-b10 mixed mode linux-x86 )
      # Problematic frame:
      # V  [libjvm.so+0xa09c0]  BitMap::set_union(BitMap)+0x20
      #
      # Core dump written. Default location: /usr/lib/ruby/gems/shared/gems/rubygems-update-1.8.5/core or core.21281
      #
      # An error report file with more information is saved as:
      # /usr/lib/ruby/gems/shared/gems/rubygems-update-1.8.5/hs_err_pid21281.log
      #
      # If you would like to submit a bug report, please visit:
      #   http://bugreport.sun.com/bugreport/crash.jsp
      #
      root@jic:/home/jchiu/jr17# JAVA_OPTS="-Xcompile.invokedynamic=false" update_rubygems
      RubyGems 1.8.5 installed
      
      === 1.8.5 / 2011-05-31
      
      * 2 minor enhancement:
      
        * The -u option to 'update local source cache' is official deprecated.
        * Remove has_rdoc deprecations from Specification.
      
      * 2 bug fixes:
      
        * Handle bad specs more gracefully.
        * Reset any Gem paths changed in the installer.
      
      
      ------------------------------------------------------------------------------
      
      RubyGems installed the following executables:
      	/usr/bin/jgem
      
      root@jic:/home/jchiu/jr17# update_rubygems
      RubyGems 1.8.5 installed
      #
      # A fatal error has been detected by the Java Runtime Environment:
      #
      #  SIGSEGV (0xb) at pc=0xb6cff9c0, pid=21413, tid=2430110576
      #
      # JRE version: 7.0_02-b13
      # Java VM: Java HotSpot(TM) Client VM (22.0-b10 mixed mode linux-x86 )
      # Problematic frame:
      # V  [libjvm.so+0xa09c0]  BitMap::set_union(BitMap)+0x20
      #
      # Core dump written. Default location: /usr/lib/ruby/gems/shared/gems/rubygems-update-1.8.5/core or core.21413
      #
      # An error report file with more information is saved as:
      # /usr/lib/ruby/gems/shared/gems/rubygems-update-1.8.5/hs_err_pid21413.log
      #
      # If you would like to submit a bug report, please visit:
      #   http://bugreport.sun.com/bugreport/crash.jsp
      #
      root@jic:/home/jchiu/jr17# java -version
      java version "1.7.0_02"
      Java(TM) SE Runtime Environment (build 1.7.0_02-b13)
      Java HotSpot(TM) Server VM (build 22.0-b10, mixed mode)
      root@jic:/home/jchiu/jr17#
      
      

        Activity

        Hide
        Joseph Chiu added a comment - - edited

        Apologies for bad formatting - first time using this bug-tracking system... Also, thanks to JRUBY-6297 which made me realize to test invoke dynamic

        Show
        Joseph Chiu added a comment - - edited Apologies for bad formatting - first time using this bug-tracking system... Also, thanks to JRUBY-6297 which made me realize to test invoke dynamic
        Hide
        Joseph Chiu added a comment -

        A colleague asked that I try: JAVA_VM="-server" without JAVA_OPTS="-Xcompile.invokedynamic=false" – that also was successful in installing RubyGems without segfaulting.

        Show
        Joseph Chiu added a comment - A colleague asked that I try: JAVA_VM="-server" without JAVA_OPTS="-Xcompile.invokedynamic=false" – that also was successful in installing RubyGems without segfaulting.
        Hide
        Hiro Asari added a comment -

        I don't recommend updating RubyGems this way. (Or, updating RubyGems on JRuby in general.)

        The master branch has RubyGems 1.8.13, and it has many customizations that we put in so that it works with JRuby. This also includes enhancements like maven integration. By using RubyGems' update facility, you are overwriting those.

        $ jruby -v -S gem --version
        jruby 1.7.0.dev (ruby-1.8.7-p357) (2012-01-13 694e204) (Java HotSpot(TM) 64-Bit Server VM 1.6.0_29) [darwin-x86_64-java]
        1.8.13
        

        Until RubyGems can handle JRuby when it updates, please do not do this.

        Show
        Hiro Asari added a comment - I don't recommend updating RubyGems this way. (Or, updating RubyGems on JRuby in general.) The master branch has RubyGems 1.8.13, and it has many customizations that we put in so that it works with JRuby. This also includes enhancements like maven integration. By using RubyGems' update facility, you are overwriting those. $ jruby -v -S gem --version jruby 1.7.0.dev (ruby-1.8.7-p357) (2012-01-13 694e204) (Java HotSpot(TM) 64-Bit Server VM 1.6.0_29) [darwin-x86_64-java] 1.8.13 Until RubyGems can handle JRuby when it updates, please do not do this.
        Hide
        Joseph Chiu added a comment -

        Thank you, Hiro! I apologize that I am coming at this as a fairly new participant to JRuby and Ruby in general.

        Given that a number of changes were incorporated to support JRuby, perhaps a special check that generates a warning might be helpful to catch this situation?

        Show
        Joseph Chiu added a comment - Thank you, Hiro! I apologize that I am coming at this as a fairly new participant to JRuby and Ruby in general. Given that a number of changes were incorporated to support JRuby, perhaps a special check that generates a warning might be helpful to catch this situation?
        Hide
        Hiro Asari added a comment -

        Joseph,

        Perhaps you are right. Do you mind opening a separate ticket for that?

        I'm going to resolve this one as "not a bug" in the meantime.

        Show
        Hiro Asari added a comment - Joseph, Perhaps you are right. Do you mind opening a separate ticket for that? I'm going to resolve this one as "not a bug" in the meantime.

          People

          • Assignee:
            Hiro Asari
            Reporter:
            Joseph Chiu
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: