Uploaded image for project: 'JBoss Enterprise Application Platform'
  1. JBoss Enterprise Application Platform
  2. JBEAP-25836

(7.4.z) UNDERTOW-2309 Possible memory leak in DefaultByteBufferPool

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Cannot Reproduce
    • Icon: Major Major
    • None
    • None
    • None
    • False
    • None
    • False
    • Hide

      See JBEAP-25588 for reproduction steps.

      Show
      See JBEAP-25588 for reproduction steps.

      Couple of memory leaks were reported by QE, which manifest when reloading the app container (JBEAP-25588). This ticket is about the Undertow related class instances.

      Following class instances are created at each app server reload, but are never garbage collected:

      |          386752 bytes (+1344)|          6043 instances (+21)|io.undertow.server.DefaultByteBufferPool
      |           142104 bytes (+504)|          5921 instances (+21)|io.undertow.server.DefaultByteBufferPool$ThreadLocalData
      

      DefaultByteBufferPool defines a non-static ThreadLocal<ThreadLocalData> threadLocalCache field.

      The threads where ThreadLocalData instances are stored into the threadLocalCache fields are the "MSC service threads". These threads survive the server reloads.

      To me it looks that the reason why above instances are not garbage collected is that the ThreadLocalData instance references are kept in the Thread.threadLocals map of the MSC service threads (i.e. the map where ThreadLocal values are stored).

            thofman Tomas Hofman
            thofman Tomas Hofman
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: