cmsdaq / DAQExpert

New expert system processing data model produced by DAQAggregator
1 stars 2 forks source link

thread leak when undeploying the DAQExpert #228

Open andreh12 opened 6 years ago

andreh12 commented 6 years ago

when undeploying the DAQExpert (deleting the .war file in the webapps directory) one finds messages like the following in catalina.out:

15-Jun-2018 14:33:53.754 WARNING [ContainerBackgroundProcessor[StandardEngine[Catalina]]] org.apache.catalina.loader.WebappClassLoaderBase.clearReferencesThreads The web application [DAQExpert] appears to have started a thread named [com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread-#0] but has failed to stop it. This is very likely to create a memory leak. Stack trace of thread:
 java.lang.Object.wait(Native Method)
 com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread.run(ThreadPoolAsynchronousRunner.java:534)

At some point we should try to find out how these threads are started and if we can stop them in a destroy() method in any of the classes inheriting from HttpServlet.

andreh12 commented 6 years ago

Grepping for the class name in this error message I find that com/mchange/v2/async/ThreadPoolAsynchronousRunner$PoolThread.class is contained in the c3p0 library (WEB-INF/lib/c3p0-0.9.1.jar)