Uploaded image for project: 'XNIO'
  1. XNIO
  2. XNIO-173

Memory leak in ByteBufferSlicePool.QueueThread

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • 3.0.7.GA, 3.1.0.Beta6
    • 3.0.4.GA
    • api
    • None

      ByteBufferSlicePool.QueueThread.run() is missing a for(; loop. As a result, it cleans up one reference and then exits. If slices are explicitly freed via Slice.free(), there is no leak. But if the slice is garbage collected, Slice.dispatch() is called, a Ref is added to REFERENCE_QUEUE. This Ref has a strong reference to the Slice, which has a strong reference to the parent region, which is huge. If the QueueThread isn't running, the Slice is not recycled and is instead leaked.

              dlloyd@redhat.com David Lloyd
              jgarver_jira Jake Garver (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: