Uploaded image for project: 'Geode'
  1. Geode
  2. GEODE-6662

NioPlainEngine.ensureWrappedCapacity does not return old buffer when allocating new one

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 1.9.0
    • messaging
    • None

    Description

      NioPlainEngine.ensureWrappedCapacity does not return old buffer when allocating new one.

      The problem is the last block of code that calls Buffers.acquireBuffer, copies the "oldBuffer" into it, but then does not return "oldBuffer". It should have called Buffers.releaseBuffer. These direct buffers can eventually get garbage collected but the reason we have a pool of direct buffers is that the jvm can be very slow about returning the direct, native, memory they use so this could cause an out of direct memory failure. It will also cause the stats maintained by Buffers tracking how much memory is allocated to never be decremented.

      It is possible that this block of code in ensureWrappedCapacity is dead code but it is hard to tell for sure.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              dschneider Darrel Schneider
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 20m
                  20m