[logback-dev] [JIRA] Created: (LBCORE-205) SocketAppender is causing a classloader leak

Joern Huxhorn (JIRA) noreply-jira at qos.ch
Sun May 1 01:56:51 CEST 2011

SocketAppender is causing a classloader leak

                 Key: LBCORE-205
                 URL: http://jira.qos.ch/browse/LBCORE-205
             Project: logback-core
          Issue Type: Bug
          Components: Appender
    Affects Versions: 0.9.28
         Environment: 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.12
            Reporter: Joern Huxhorn
            Assignee: Logback dev list
            Priority: Critical

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
    You can toggle the warning by removing or adding the SocketAppender in
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):

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

This message is automatically generated by JIRA.
If you think it was sent incorrectly contact one of the administrators: http://jira.qos.ch/secure/Administrators.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira


More information about the logback-dev mailing list