You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hivemind.apache.org by "Knut Wannheden (JIRA)" <hi...@jakarta.apache.org> on 2006/08/03 11:08:15 UTC

[jira] Resolved: (HIVEMIND-161) ThreadLocal object is never removed in ThreadEventNotifierImpl and holds the classloader

     [ http://issues.apache.org/jira/browse/HIVEMIND-161?page=all ]

Knut Wannheden resolved HIVEMIND-161.
-------------------------------------

    Fix Version/s: 1.1.1
       Resolution: Fixed

> ThreadLocal object is never removed in ThreadEventNotifierImpl and holds the classloader
> ----------------------------------------------------------------------------------------
>
>                 Key: HIVEMIND-161
>                 URL: http://issues.apache.org/jira/browse/HIVEMIND-161
>             Project: HiveMind
>          Issue Type: Bug
>          Components: framework
>    Affects Versions: 1.1
>         Environment: Tomcat 5.5.12, J2SE 1.6 Mustang build 62, Win XP SP2
>            Reporter: Kyrill Alyoshin
>         Assigned To: Howard M. Lewis Ship
>            Priority: Critical
>             Fix For: 1.1.1
>
>         Attachments: hivemind-threadlocals.pdf
>
>
> The following prevents the web application classloader from being garbage collected on hot redeploys of web applications. 
> Please note that the issue is present on J2SE 1.5 as well. I use 1.6 only because it has far better support for JVMTI and as such the issue was easy to discover with YourKit profiler. Here it is:
> 1. org.apache.hivemind.service.impl.ThreadEventNotifierImpl puts EventListenerList ("list" variable) on its private ThreadLocal "_storage" variable in addThreadCleanupListener method.
> 2. No where in that class does the actual list gets removed from ThreadLocal.
> Thus, the WebappClassLoader cannot be garbage collected because one of the object that it loaded (i.e. EventListenerList) is strongly referenced by live threads in the container, which leads to huge memory leaks on hot-redeploys.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira