Some short answers :

- (for the moment) threads are always reused, even after an application is 
stopped.
- tomcat 6.0.26 tries to clean the threadlocals which may provoke a leak, but 
1) it was unsafe and has been disabled by default from 6.0.27 (see 
https://issues.apache.org/bugzilla/show_bug.cgi?id=48895 ) and 2) some leak 
through threadlocals might not be detected and thus not cleared, as explained 
in 
http://wiki.apache.org/tomcat/MemoryLeakProtection#webappClassInstanceAsThreadLocalIndirectValue
- To improve over this situation, threads are now being renewed after an 
application is stopped. This change is currently only in SVN trunk for tomcat 
7. See https://issues.apache.org/bugzilla/show_bug.cgi?id=49159
- please upgrade to 6.0.29 and post the logs again. There has been some 
improvement in the diagnostics.

Sylvain

On 11 déc. 2010, at 21:01, Srikanth Konjarla wrote:

> Pid,
> 
> Thanks for your patience. Here is the output from catalina.out file
> while the webapp is being undeployed. As you can see there are few
> threadLocals that are cleaned up.
> 
> ----------------------------------------------------------------------
> Dec 10, 2010 8:46:56 PM org.apache.catalina.loader.WebappClassLoader
> clearThreadLocalMap
> SEVERE: A web application created a ThreadLocal with key of type
> [java.lang.ThreadLocal] (value [java.lang.threadlo...@7ee75db3]) and a
> value of type [org.apache.catalina.loader.WebappClassLoader] (value
> [WebappClassLoader
>  delegate: false
>  repositories:
>    /WEB-INF/classes/
> ----------> Parent Classloader:
> org.apache.catalina.loader.standardclassloa...@1eb3319f
> ]) but failed to remove it when the web application was stopped. To
> prevent a memory leak, the ThreadLocal has been forcibly removed.
> Dec 10, 2010 8:46:56 PM org.apache.catalina.loader.WebappClassLoader
> clearThreadLocalMap
> SEVERE: A web application created a ThreadLocal with key of type
> [java.lang.ThreadLocal] (value [java.lang.threadlo...@7ee75db3]) and a
> value of type [org.apache.catalina.loader.WebappClassLoader] (value
> [WebappClassLoader
>  delegate: false
>  repositories:
>    /WEB-INF/classes/
> ----------> Parent Classloader:
> org.apache.catalina.loader.standardclassloa...@1eb3319f
> ]) but failed to remove it when the web application was stopped. To
> prevent a memory leak, the ThreadLocal has been forcibly removed.
> Dec 10, 2010 8:46:56 PM org.apache.catalina.loader.WebappClassLoader
> clearThreadLocalMap
> SEVERE: A web application created a ThreadLocal with key of type
> [org.apache.xml.security.utils.UnsyncByteArrayOutputStream$1] (value
> [org.apache.xml.security.utils.unsyncbytearrayoutputstrea...@775d1479])
> and a value of type [byte[]] (value [...@5faeed4]) but failed to remove
> it when the web application was stopped. To prevent a memory leak, the
> ThreadLocal has been forcibly removed.
> Dec 10, 2010 8:46:56 PM org.apache.catalina.loader.WebappClassLoader
> clearThreadLocalMap
> SEVERE: A web application created a ThreadLocal with key of type
> [org.apache.axis.utils.XMLUtils.ThreadLocalDocumentBuilder] (value
> [org.apache.axis.utils.xmlutils$threadlocaldocumentbuil...@3a0ee334])
> and a value of type [org.apache.xerces.jaxp.DocumentBuilderImpl] (value
> [org.apache.xerces.jaxp.documentbuilderi...@61583db6]) but failed to
> remove it when the web application was stopped. To prevent a memory
> leak, the ThreadLocal has been forcibly removed.
> ------------------------------------------------------------------------
> 
> Srikanth


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Reply via email to