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

SocketAppender is causing a classloader leak

    XMLWordPrintable

Details

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Critical Critical
    • None
    • None
    • logback-core
    • None

    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

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

            Dates

              Created:
              Updated: