-
Bug
-
Resolution: Done
-
Critical
-
8.0 Update 1.1
-
False
-
None
-
False
-
-
-
-
-
-
Low
-
?
-
Workaround Exists
-
-
-
-
Due to UNDERTOW-2309, DefaultByteBufferPool can now leak buffers over time as threads are released (such as idle threads above task-core-threads being released and recreated with load oscillations over time).
Before UNDERTOW-2309, the ThreadLocalData buffers were stored directly on the Thread via the standard java ThreadLocals so if the Thread died, the ThreadLocalData was inherently released from the Thread's own local map. But now if a thread dies, it is not ever released from the io.undertow.server.DefaultByteBufferPool$ThreadLocalCache's localsByThread map. So a heap dump shows the entries piling up here:
Class Name | Ref. Objects | Shallow Heap | Ref. Shallow Heap | Retained Heap --------------------------------------------------------------------------------------------------------------------------------------------------------------- [56] class io.undertow.protocols.ssl.UndertowXnioSsl @ 0xaf1b2a10 | 71,676 | 8 | 1,720,224 | 32 '- DEFAULT_BUFFER_POOL io.undertow.server.DefaultByteBufferPool @ 0xaf1b2a80 | 71,676 | 64 | 1,720,224 | 20,792,448 '- threadLocalCache io.undertow.server.DefaultByteBufferPool$ThreadLocalCache @ 0xaf1b2ac0| 71,676 | 16 | 1,720,224 | 18,071,056 '- localsByThread java.util.HashMap @ 0xaf1b2ad0 | 71,676 | 48 | 1,720,224 | 18,071,040 '- table java.util.HashMap$Node[131072] @ 0xb3c67d20 | 71,676 | 524,304 | 1,720,224 | 18,070,992 |- [108494] java.util.HashMap$Node @ 0xb1610fb0 | 6 | 32 | 144 | 1,488 | |- next java.util.HashMap$Node @ 0xb1def998 | 5 | 32 | 120 | 1,240 | |- value io.undertow.server.DefaultByteBufferPool$ThreadLocalData @ 0xb15d5e98| 1 | 24 | 24 | 128 ---------------------------------------------------------------------------------------------------------------------------------------------------------------
- clones
-
JBEAP-27062 [GSS](7.4.z) UNDERTOW-2389/UNDERTOW-2385 - DefaultByteBufferPool leaks buffers for released threads
- Closed
- is caused by
-
UNDERTOW-2309 Possible memory leak in DefaultByteBufferPool
- Closed
- is incorporated by
-
JBEAP-26817 (8.0.z) Upgrade undertow from 2.3.11.SP1-redhat-00001 to 2.3.14.SP1
- Closed
- relates to
-
UNDERTOW-2389 DefaultByteBufferPool leaks buffers for released threads
- Resolved
-
UNDERTOW-2385 Memory leak in ThreadLocalCache
- Resolved
- links to