Details
-
Bug
-
Resolution: Unresolved
-
Critical
-
None
-
None
-
None
-
Apache Maven 3.0.3 (r1075438; 2011-02-28 18:31:09+0100)
Maven home: /opt/local/share/java/maven3
Java version: 1.6.0_24, vendor: Apple Inc.
Java home: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home
Default locale: en_US, platform encoding: MacRoman
OS name: "mac os x", version: "10.6.7", arch: "x86_64", family: "mac"
Tomcat 7.0.12Apache Maven 3.0.3 (r1075438; 2011-02-28 18:31:09+0100) Maven home: /opt/local/share/java/maven3 Java version: 1.6.0_24, vendor: Apple Inc. Java home: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home Default locale: en_US, platform encoding: MacRoman OS name: "mac os x", version: "10.6.7", arch: "x86_64", family: "mac" Tomcat 7.0.12
Description
A classloader leak is caused by SocketAppender which prevents webapps from
being properly undeployed and garbage collected.
Steps to reproduce:
1.) Download and start Lilith.
A server needs to be running and accepting the connection of the SocketAppender.
Otherwise the leak will not happen.
2.) Build the webapp at
https://github.com/huxi/lilith/tree/master/sandbox/logback-access-sandbox
You can toggle the warning by removing or adding the SocketAppender in
logback.xml.
3.) Deploy the webapp on Tomcat 7.0.12.
4.) Produce some events by accessing the webapp.
5.) Undeploy the webapp.
6.) Click on "Find leaks".
Clicking on "Find leaks" causes the following message to be emitted:
The following web applications were stopped (reloaded, undeployed), but their
classes from previous runs are still loaded in memory, thus causing a memory
leak (use a profiler to confirm):
/lb-access-sandbox
Unfortunately, there is no other information in any log file.
The above warning message disappears if the logback-classic SocketAppender
is removed from the configuration.
I stumbled upon this issue while fixing http://sourceforge.net/apps/trac/lilith/ticket/96