Mantis - Hessian
|
|||||
Viewing Issue Advanced Details | |||||
|
|||||
ID: | Category: | Severity: | Reproducibility: | Date Submitted: | Last Update: |
4376 | major | always | 02-07-11 05:11 | 02-26-12 03:51 | |
|
|||||
Reporter: | p_wright | Platform: | |||
Assigned To: | OS: | ||||
Priority: | normal | OS Version: | |||
Status: | new | Product Version: | 4.0.13 | ||
Product Build: | Resolution: | open | |||
Projection: | none | ||||
ETA: | none | Fixed in Version: | |||
|
|||||
Summary: | 0004376: Memory leak due to ServiceContext not clearing ThreadLocal | ||||
Description: |
HessianServlet sets up a ServiceContext type for convenience, this uses a ThreadLocal to store an instance of ServiceContext however when the service call completes it does not clean up the ThreadLocal. This dangling ThreadLocal reference prevents Tomcat from freeing the ClassLoader associated with the webapp. It looks like ServiceContext.end() should call _localContext.remove() |
||||
Steps To Reproduce: | |||||
Additional Information: |
The error message produced by Tomcat 7: SEVERE: The web application [/hessianwebapp] created a ThreadLocal with key of type [java.lang.ThreadLocal] (value [java.lang.ThreadLocal@655e3dc4]) and a value of type [com.caucho.services.server.ServiceContext] (value [com.caucho.services.server.ServiceContext@e2942da]) but failed to remove it when the web application was stopped. This is very likely to create a memory leak. 07-Feb-2011 12:56:31 org.apache.catalina.loader.WebappClassLoader clearThreadLocalMap SEVERE: The web application [/hessianwebapp] created a ThreadLocal with key of type [java.lang.ThreadLocal] (value [java.lang.ThreadLocal@655e3dc4]) and a value of type [com.caucho.services.server.ServiceContext] (value [com.caucho.services.server.ServiceContext@36e3fd79]) but failed to remove it when the web application was stopped. This is very likely to create a memory leak. 07-Feb-2011 12:56:31 org.apache.catalina.loader.WebappClassLoader clearThreadLocalMap SEVERE: The web application [/hessianwebapp] created a ThreadLocal with key of type [java.lang.ThreadLocal] (value [java.lang.ThreadLocal@655e3dc4]) and a value of type [com.caucho.services.server.ServiceContext] (value [com.caucho.services.server.ServiceContext@32162f16]) but failed to remove it when the web application was stopped. This is very likely to create a memory leak. 07-Feb-2011 12:56:31 org.apache.catalina.loader.WebappClassLoader clearThreadLocalMap SEVERE: The web application [/hessianwebapp] created a ThreadLocal with key of type [java.lang.ThreadLocal] (value [java.lang.ThreadLocal@655e3dc4]) and a value of type [com.caucho.services.server.ServiceContext] (value [com.caucho.services.server.ServiceContext@4e6d670a]) but failed to remove it when the web application was stopped. This is very likely to create a memory leak. 07-Feb-2011 12:56:31 org.apache.catalina.loader.WebappClassLoader clearThreadLocalMap SEVERE: The web application [/hessianwebapp] created a ThreadLocal with key of type [java.lang.ThreadLocal] (value [java.lang.ThreadLocal@655e3dc4]) and a value of type [com.caucho.services.server.ServiceContext] (value [com.caucho.services.server.ServiceContext@7087e9bf]) but failed to remove it when the web application was stopped. This is very likely to create a memory leak. 07-Feb-2011 12:56:31 org.apache.catalina.loader.WebappClassLoader clearThreadLocalMap SEVERE: The web application [/hessianwebapp] created a ThreadLocal with key of type [java.lang.ThreadLocal] (value [java.lang.ThreadLocal@655e3dc4]) and a value of type [com.caucho.services.server.ServiceContext] (value [com.caucho.services.server.ServiceContext@6b033450]) but failed to remove it when the web application was stopped. This is very likely to create a memory leak. 07-Feb-2011 12:56:31 org.apache.catalina.loader.WebappClassLoader clearThreadLocalMap SEVERE: The web application [/hessianwebapp] created a ThreadLocal with key of type [java.lang.ThreadLocal] (value [java.lang.ThreadLocal@655e3dc4]) and a value of type [com.caucho.services.server.ServiceContext] (value [com.caucho.services.server.ServiceContext@1f5fa713]) but failed to remove it when the web application was stopped. This is very likely to create a memory leak. 07-Feb-2011 12:56:31 org.apache.catalina.loader.WebappClassLoader clearThreadLocalMap SEVERE: The web application [/hessianwebapp] created a ThreadLocal with key of type [java.lang.ThreadLocal] (value [java.lang.ThreadLocal@655e3dc4]) and a value of type [com.caucho.services.server.ServiceContext] (value [com.caucho.services.server.ServiceContext@40d1e07c]) but failed to remove it when the web application was stopped. This is very likely to create a memory leak. |
||||
Relationships | |||||
Attached Files: |
Notes | |||||
|
|||||
|
|