org.jgroups.protocols.FlowControl has a thread local leak.
Tomcat's memory management shows:
SEVERE: The web application [/app] created a ThreadLocal with key of type [null] (value [org.jgroups.protocols.FlowControl$1@79c1187f]) and a value of type [java.lang.Boolean] (value [false]) but failed to remove it when the web application was stopped. This is very likely to create a memory leak.
The fix seems straightforward to me, just replace the two instances of:
ignore_thread.set(false);
with
ignore_thread.remove();
I have verified this does indeed prevent the leak.
Since false is the default value the thread local would get created with, then setting it to false is equivalent to removing it, with the added benefit of actually removing the ThreadLocal from the application server's thread.
So it only exists while it is set to true.
- is related to
-
JGRP-1655 ThreadLocal leaks discovered after enabling Tomcat 7 ThreadLocal detection listener
- Resolved