Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

#118 Possible memory leak in Tomcat

open
nobody
None
5
2011-02-25
2011-02-25
Anonymous
No

Using version 2.4-jdk5 on Tomcat 6.0.28 yields the following in the log files:

The web application [...] created a ThreadLocal with key of type [net.sf.json.AbstractJSON.CycleSet] (value [net.sf.json.AbstractJSON$CycleSet@26960369]) and a value of type [java.lang.ref.SoftReference] (value [java.lang.ref.SoftReference@42b9f649]) but failed to remove it when the web application was stopped. This is very likely to create a memory leak.

Discussion


  • Anonymous
    2011-10-14

    This memory leak was confirmed, at least in 2.2.2 in Jboss 4/Tomcat. A similar ThreadLocal object used. In a multi-user environment (Jboss/Tomcat) , this will cause on HashSet to be created by user. As threads are resused, the HashSet are never flushed causing OOM errors.