Details

    • Type: Bug Bug
    • Status: Resolved Resolved
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: JRuby 1.6.4
    • Fix Version/s: JRuby-OSSL 0.7.6
    • Component/s: C Extensions
    • Labels:
      None
    • Environment:
      Mac OS Lion, jruby 1.6.3 (ruby-1.8.7-p330) (2011-10-26 d9009b7) (Java HotSpot(TM) 64-Bit Server VM 1.6.0_26) [darwin-x86_64-java]
    • Number of attachments :
      0

      Description

      Error is usually along the lines of:

      java(61909,0x10d6e6000) malloc: *** error for object 0x7ff14a8307c0: pointer being freed was not allocated
      *** set a breakpoint in malloc_error_break to debug
      

      JRuby 1.6.3 didn't have this issue, JRuby 1.6.4 and 1.6.5 do.

      Git bisect (using `ant clean cext` shows the bad commit as:

      d9009b75eb0dc63b17c3583549f9042135737224 is the first bad commit
      commit d9009b75eb0dc63b17c3583549f9042135737224
      Author: Wayne Meissner <wmeissner@gmail.com>
      Date:   Mon Aug 15 21:14:51 2011 +1000
      
          Improve cext ruby object -> native handle GC correctness
      
      :040000 040000 cf2e090681f2ab84eded1eda90e5daec26ba0fed 13d9c3697b91e2ed4a7303bf7ab84e9670ab0ef0 M	cext
      :040000 040000 f5900d637bdbd8cb82cc1f40dfc8afe2841108fd e4f2e5f9b43b5bd4d8174ff1005f600df6ba7028 M	src
      

        Issue Links

          Activity

          Hide
          Charles Oliver Nutter added a comment -

          CONFIRMED! Ok...so ignore all my complete obliviousness to bisecting, reproductions, and everything else on this bug. Looks good, Mat...I think if it can be fixed, we have what we need to diagnose it.

          Show
          Charles Oliver Nutter added a comment - CONFIRMED! Ok...so ignore all my complete obliviousness to bisecting, reproductions, and everything else on this bug. Looks good, Mat...I think if it can be fixed, we have what we need to diagnose it.
          Hide
          Mat Schaffer added a comment -

          Great! And thanks so much for JRuby, it's been an invaluable tool.

          Show
          Mat Schaffer added a comment - Great! And thanks so much for JRuby, it's been an invaluable tool.
          Hide
          Wayne Meissner added a comment -

          I think I fixed this in commit 204f5d669b2604a72957006990ee59e8a5e19ae8

          At least, running Mat's test case, no longer crashes. Should cherry-pick that back to 1.6.x once someone else confirms it as fixed.

          Show
          Wayne Meissner added a comment - I think I fixed this in commit 204f5d669b2604a72957006990ee59e8a5e19ae8 At least, running Mat's test case, no longer crashes. Should cherry-pick that back to 1.6.x once someone else confirms it as fixed.
          Hide
          Mat Schaffer added a comment -

          Just tested on 27b399053666545a which contains 204f5d669b2 and the server stayed running after 60s. I also tested against b97c22a (204f5d669b2^) which crashed after 5s. Looks like you got it. Well done, Wayne!

          Show
          Mat Schaffer added a comment - Just tested on 27b399053666545a which contains 204f5d669b2 and the server stayed running after 60s. I also tested against b97c22a (204f5d669b2^) which crashed after 5s. Looks like you got it. Well done, Wayne!
          Hide
          Charles Oliver Nutter added a comment -

          Cherry-picked to 1.6! Thanks everyone!

          commit 8905123edf98610511b3ce12dd5a4d22d813c3c7
          Author: Wayne Meissner <wmeissner@gmail.com>
          Date:   Thu Feb 16 13:02:12 2012 +1000
          
              Fix JRUBY-6164.  Problem was multiple cleaners on the same data object.
          
          Show
          Charles Oliver Nutter added a comment - Cherry-picked to 1.6! Thanks everyone! commit 8905123edf98610511b3ce12dd5a4d22d813c3c7 Author: Wayne Meissner <wmeissner@gmail.com> Date: Thu Feb 16 13:02:12 2012 +1000 Fix JRUBY-6164. Problem was multiple cleaners on the same data object.

            People

            • Assignee:
              Charles Oliver Nutter
              Reporter:
              Mat Schaffer
            • Votes:
              2 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: