Skip to content

ThreadLocal leakage on redeploy #2

@stain

Description

@stain

If QueryExpander/IMS war file is redeployed to a running Tomcat instance, warning messages like the below are produced:

INFO: Undeploying context [/QueryExpander]
May 18, 2015 7:08:56 PM org.apache.catalina.core.ApplicationContext log
INFO: Closing Spring root WebApplicationContext
May 18, 2015 7:08:56 PM org.apache.catalina.loader.WebappClassLoader clearReferencesJdbc
SEVERE: The web application [/QueryExpander] registered the JDBC driver [com.mysql.jdbc.Driver] but failed to unregister it when the web application was stopped. To prevent a memory leak, the JDBC Driver has been forcibly unregistered.
May 18, 2015 7:08:56 PM org.apache.catalina.loader.WebappClassLoader checkThreadLocalMapForLeaks
SEVERE: The web application [/QueryExpander] created a ThreadLocal with key of type [com.sun.xml.bind.v2.runtime.Coordinator$1] (value [com.sun.xml.bind.v2.runtime.Coordinator$1@50f1a73a]) and a value of type [java.lang.Object[]] (value [[Ljava.lang.Object;@2919fa5a]) but failed to remove it when the web application was stopped. Threads are going to be renewed over time to try and avoid a probable memory leak.
May 18, 2015 7:08:56 PM org.apache.catalina.loader.WebappClassLoader checkThreadLocalMapForLeaks
SEVERE: The web application [/QueryExpander] created a ThreadLocal with key of type [java.lang.ThreadLocal] (value [java.lang.ThreadLocal@68833fca]) and a value of type [org.apache.cxf.jaxrs.ext.MessageContextImpl] (value [org.apache.cxf.jaxrs.ext.MessageContextImpl@d11c61]) but failed to remove it when the web application was stopped. Threads are going to be renewed over time to try and avoid a probable memory leak.
May 18, 2015 7:08:56 PM org.apache.catalina.loader.WebappClassLoader checkThreadLocalMapForLeaks
SEVERE: The web application [/QueryExpander] created a ThreadLocal with key of type [com.sun.xml.bind.v2.runtime.Coordinator$1] (value [com.sun.xml.bind.v2.runtime.Coordinator$1@50f1a73a]) and a value of type [java.lang.Object[]] (value [[Ljava.lang.Object;@209e24b2]) but failed to remove it when the web application was stopped. Threads are going to be renewed over time to try and avoid a probable memory leak.
May 18, 2015 7:08:56 PM org.apache.catalina.loader.WebappClassLoader checkThreadLocalMapForLeaks
SEVERE: The web application [/QueryExpander] created a ThreadLocal with key of type [java.lang.ThreadLocal] (value [java.lang.ThreadLocal@68833fca]) and a value of type [org.apache.cxf.jaxrs.ext.MessageContextImpl] (value [org.apache.cxf.jaxrs.ext.MessageContextImpl@6e7b32d8]) but failed to remove it when the web application was stopped. Threads are going to be renewed over time to try and avoid a probable memory leak.
May 18, 2015 7:08:56 PM org.apache.catalina.loader.WebappClassLoader checkThreadLocalMapForLeaks
SEVERE: The web application [/QueryExpander] created a ThreadLocal with key of type [com.sun.xml.bind.v2.runtime.Coordinator$1] (value [com.sun.xml.bind.v2.runtime.Coordinator$1@50f1a73a]) and a value of type [java.lang.Object[]] (value [[Ljava.lang.Object;@5a473b92]) but failed to remove it when the web application was stopped. Threads are going to be renewed over time to try and avoid a probable memory leak.
May 18, 2015 7:08:56 PM org.apache.catalina.loader.WebappClassLoader checkThreadLocalMapForLeaks
SEVERE: The web application [/QueryExpander] created a ThreadLocal with key of type [java.lang.ThreadLocal] (value [java.lang.ThreadLocal@68833fca]) and a value of type [org.apache.cxf.jaxrs.ext.MessageContextImpl] (value [org.apache.cxf.jaxrs.ext.MessageContextImpl@7a981c8b]) but failed to remove it when the web application was stopped. Threads are going to be renewed over time to try and avoid a probable memory leak.
May 18, 2015 7:08:56 PM org.apache.catalina.loader.WebappClassLoader checkThreadLocalMapForLeaks
SEVERE: The web application [/QueryExpander] created a ThreadLocal with key of type [com.sun.xml.bind.v2.runtime.Coordinator$1] (value [com.sun.xml.bind.v2.runtime.Coordinator$1@50f1a73a]) and a value of type [java.lang.Object[]] (value [[Ljava.lang.Object;@187a288e]) but failed to remove it when the web application was stopped. Threads are going to be renewed over time to try and avoid a probable memory leak.
May 18, 2015 7:08:56 PM org.apache.catalina.loader.WebappClassLoader checkThreadLocalMapForLeaks
SEVERE: The web application [/QueryExpander] created a ThreadLocal with key of type [java.lang.ThreadLocal] (value [java.lang.ThreadLocal@68833fca]) and a value of type [org.apache.cxf.jaxrs.ext.MessageContextImpl] (value [org.apache.cxf.jaxrs.ext.MessageContextImpl@7bfc8f2f]) but failed to remove it when the web application was stopped. Threads are going to be renewed over time to try and avoid a probable memory leak.

This indicates a potential memory leak over time if the WAR is redeployed multiple times without restarting Tomcat.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions