tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael Heinen <mhn4...@googlemail.com>
Subject memory leak warning "ThreadLocal with key of type [null]" in 6.0.29
Date Tue, 01 Feb 2011 16:10:01 GMT
  Hi,

I got following warning after stopping my context with Tomcat 6.0.29

01.02.2011 15:58:00 org.apache.catalina.loader.WebappClassLoader 
clearThreadLocalMap
SCHWERWIEGEND: The web application [/myapp] created a ThreadLocal with 
key of type [null] (value [com.MyClass$1@7cef53]) and a value of type 
[org.apache.commons.codec.net.URLCodec] (value 
[org.apache.commons.codec.net.URLCodec@445c74]) but failed to remove it 
when the web application was stopped. This is very likely to create a 
memory leak.

I searched in this list and found some answers saying that these 
messages with "key of type [null]" are false positives.
This should have been fixed in 6.0.25 according to these posts and 
according the relase notes:
"Modify ThreadLocal memory leak detection to not report false positives 
and to simplify implementation. (markt/kkolinko) "

The corresponding lines in myClass are:
private static final ThreadLocal<URLCodec> sURLCodec = new 
ThreadLocal<URLCodec>() {
   protected URLCodec initialValue() {
     return new URLCodec();
}};

Is this a false alarm or wrong usage?

Regards,
Michael

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


Mime
View raw message