[jboss-jira] [JBoss JIRA] (JGRP-1500) ThreadLocal leak in FlowControl

Bela Ban (JIRA) jira-events at lists.jboss.org
Tue Aug 14 09:18:15 EDT 2012


     [ https://issues.jboss.org/browse/JGRP-1500?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Bela Ban resolved JGRP-1500.
----------------------------

    Resolution: Done

    
> ThreadLocal leak in FlowControl
> -------------------------------
>
>                 Key: JGRP-1500
>                 URL: https://issues.jboss.org/browse/JGRP-1500
>             Project: JGroups
>          Issue Type: Bug
>    Affects Versions: 2.12.3
>         Environment: Tomcat
>            Reporter: Elliot Lovy
>            Assignee: Bela Ban
>             Fix For: 3.0.12, 3.2
>
>
> 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 at 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.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the jboss-jira mailing list