[
https://issues.jboss.org/browse/JGRP-1652?page=com.atlassian.jira.plugin....
]
Manuel Dominguez Sarmiento commented on JGRP-1652:
--------------------------------------------------
Perhaps it could be handled on TP.ProtocolAdapter.stop():
public void stop() {
TP tp=getTransport();
if(tp != null)
tp.unregisterProbeHandler(this);
-----> thread_local.remove() <-----
}
and proper handling in TUNNEL.handleDownEvent() so that it does not throw NPE when trying
to access the thread_local.
TP.ProtocolAdapter ThreadLocal leak on Tomcat shutdown
------------------------------------------------------
Key: JGRP-1652
URL:
https://issues.jboss.org/browse/JGRP-1652
Project: JGroups
Issue Type: Bug
Affects Versions: 3.3.2
Reporter: Manuel Dominguez Sarmiento
Assignee: Bela Ban
We're getting the following Tomcat errors on shutdown:
SEVERE: The web application [/claro-ar] appears to have started a thread named
[Thread-639] but has failed to stop it. This is very likely to create a memory leak.
Jul 04, 2013 6:16:51 PM org.apache.catalina.loader.WebappClassLoader
checkThreadLocalMapForLeaks
SEVERE: The web application [/claro-ar] created a ThreadLocal with key of type
[java.lang.ThreadLocal] (value [java.lang.ThreadLocal@a5d04a6]) and a value of type
[org.jgroups.protocols.TP.ProtocolAdapter] (value [session (21)]) but failed to remove it
when the web application was stopped. Threads are going to be renewed over time to try and
avoid a probable memory leak.
Jul 04, 2013 6:16:51 PM org.apache.catalina.loader.WebappClassLoader
checkThreadLocalMapForLeaks
SEVERE: The web application [/claro-ar] created a ThreadLocal with key of type
[java.lang.ThreadLocal] (value [java.lang.ThreadLocal@a5d04a6]) and a value of type
[org.jgroups.protocols.TP.ProtocolAdapter] (value [claro-ar (21)]) but failed to remove it
when the web application was stopped. Threads are going to be renewed over time to try and
avoid a probable memory leak.
This happens every single time on shutdown. This seems to be related to the current
TUNNEL implementation. In TP.ProtocolAdapter:
// kludge, only used by TUNNEL
static final ThreadLocal<ProtocolAdapter> thread_local=new
ThreadLocal<ProtocolAdapter>();
In TUNNEL:
// TODO [JGRP-1194] - Revisit implementation of TUNNEL and shared transport
ProtocolAdapter adapter = ProtocolAdapter.thread_local.get();
Since we do not use TUNNEL, we would appreciate this feature could be turned off, as it
affects webapp hot redeployment.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see:
http://www.atlassian.com/software/jira