Bug 48510 - Memory leak after undeploying web application using custom log formatter
Summary: Memory leak after undeploying web application using custom log formatter
Status: RESOLVED DUPLICATE of bug 48421
Alias: None
Product: Tomcat 6
Classification: Unclassified
Component: Catalina (show other bugs)
Version: 6.0.20
Hardware: PC Windows XP
: P2 normal (vote)
Target Milestone: default
Assignee: Tomcat Developers Mailing List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-01-08 06:02 UTC by dsavickas
Modified: 2010-01-12 13:06 UTC (History)
0 users



Attachments
Zipped Maven project folder (3.51 KB, application/zip)
2010-01-08 06:02 UTC, dsavickas
Details

Note You need to log in before you can comment on or make changes to this bug.
Description dsavickas 2010-01-08 06:02:55 UTC
Created attachment 24819 [details]
Zipped Maven project folder

After undeploying web application (see attachment) instance of CustomFormatter is left non-reclaimed. As CustomFormatter is loaded by WebAppClassLoader, the classloader remains in memory too.

To reproduce: deploy attached web application and stop/start it several times, then do a heap dump. Check the dump using Eclipse Memory Analyzer or YourKit Java Profiler and notice multiple WebAppClassLoaders present in the dump.

Issue seems to be related to org.apache.juli.ClassLoaderLogManager.
org.apache.juli.ClassLoaderLogManager$LogNode keeps a reference to java.util.logging.Logger. Logger has a handler with CustomFormatter.
Comment 1 Mark Thomas 2010-01-12 13:06:04 UTC
Thanks for the test case. This bug has the same root cause as bug 48421 so I am marking it as a duplicate.

*** This bug has been marked as a duplicate of bug 48421 ***