https://issues.apache.org/bugzilla/show_bug.cgi?id=4913
--- Comment #3 from Tom W <[email protected]> --- Ten years on, this is still an issue. I've attached a test case to reproduce the problem, and hopefully accelerate a fix. The test case is a webapp that I deploy to Tomcat (v7.0.26 in my case) and configures logging. The webapp can be undeployed, but results in a leak because Log4j's Filewatchdog thread is still running, despite the explicit call to LogManager.shutdown() in the ContextListener. To Reproduce: 1) Install Tomcat with the manager application (not covered here) 2) Build the attached webapp (Ant) 3) Deploy the LeakyWeb.war file to Tomcat, either via Tomcat's manager application, or by dropping the war file into the "webapps" directory. 4) [Optional] Visit http://localhost:8080/LeakyWeb to view the "Success" method. 5) Use Tomcat's manager application to undeploy the webapp. 5a) Note this error message from Tcomat: May 1, 2012 11:43:08 AM org.apache.catalina.loader.WebappClassLoader clearReferencesThreads SEVERE: The web application [/LeakyWeb] appears to have started a thread named [FileWatchdog] but has failed to stop it. This is very likely to create a memory leak. 6) Alternatively, press the "Find Leaks" button in Tomcat's manager application to see the same information. DESIRED OUTCOME: Invoking LogManager.shutdown() should interrupt and shut down any watchdog threads that were started by the associated configurer (PropertyConfigurer in this case.) Naturally this same problem applies to the XML config files as well. -- You are receiving this mail because: You are the assignee for the bug.
