[jboss-jira] [JBoss JIRA] (JGRP-1652) TP.ProtocolAdapter ThreadLocal leak on Tomcat shutdown

Bela Ban (JIRA) jira-events at lists.jboss.org
Thu Jul 11 07:47:21 EDT 2013


    [ https://issues.jboss.org/browse/JGRP-1652?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12789078#comment-12789078 ] 

Bela Ban commented on JGRP-1652:
--------------------------------

I don't think we're using ProtocolAdapter.thread_local in TUNNEL as TUNNEL.init() throws an exception when created as a shared transport (this isn't supported).
I'm removing thread_local for now. As indicated in the comments we need to find a better way to accommodate TUNNEL with shared transports.
                
> 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
>             Fix For: 3.3.3, 3.4
>
>
> 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 at 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 at 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


More information about the jboss-jira mailing list