Uploaded image for project: 'logback'
  1. logback
  2. LOGBACK-48

SocketAppender is causing a classloader leak

    Details

    • Type: Bug
    • Status: Open
    • Priority: Critical
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: logback-core
    • Labels:
      None
    • Environment:

      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

        Attachments

          Activity

            People

            • Assignee:
              logback-dev Logback dev list
              Reporter:
              jhuxhorn Joern Huxhorn
            • Votes:
              2 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated: