Details

    • Type: Bug Bug
    • Status: Resolved Resolved
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: JRuby 1.6.4
    • Fix Version/s: JRuby 1.7.0.pre1
    • Component/s: None
    • Labels:
      None
    • Number of attachments :
      0

      Description

      Every time RubyIO's constructor that accepts a STDIO as the 2nd argument it called it calls runtime.putFilenoMap to keep track of internal to external filenos for these special streams. This ultimately ends up putting key/value integer pairs in Ruby's filenoExtIntMap and filenoIntExtMap, the latter which grows in size every time this RubyIO constructor is called. When the RubyIO gets closed its entry in filenoIntExtMap does not get cleaned up and thus that map has the potential to grow indefinitely.

      The bug is marked as minor because this is only an issue if large numbers of STDIO RubyIOs are created in a single runtime. The proposed fix is to delete the entries out of filenoIntExtMap in OpenFile's finalize method or somewhere else appropriate that gets called on both close and finalization of RubyIOs.

        Activity

        Hide
        Ben Browning added a comment -

        Pull request submitted - https://github.com/jruby/jruby/pull/90

        Show
        Ben Browning added a comment - Pull request submitted - https://github.com/jruby/jruby/pull/90
        Show
        Hiro Asari added a comment - I merged the patch. master: https://github.com/jruby/jruby/commit/3c70e35a71 1.6: https://github.com/jruby/jruby/commit/91e529a
        Hide
        Ben Browning added a comment -

        Thanks!

        Show
        Ben Browning added a comment - Thanks!

          People

          • Assignee:
            Hiro Asari
            Reporter:
            Ben Browning
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: