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

Tomcat 8.5.14 reports stale thread created by Logback

    XMLWordPrintable

Details

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Major Major
    • None
    • 1.2.2
    • logback-core
    • None
    • Apache Tomcat/8.5.14, Java 8

    Description

      Tomcat tells me:

      2017-06-04T01:00:09.200 WARNUNG [localhost-startStop-2] org.apache.catalina.loader.WebappClassLoaderBase.clearReferencesThreads The web application [tedab-services] appears to have started a thread named [logback-1] but has failed to stop it. This is very likely to create a memory leak. Stack trace of thread:
       sun.misc.Unsafe.park(Native Method)
       java.util.concurrent.locks.LockSupport.park(LockSupport.java:175)
       java.util.concurrent.SynchronousQueue$TransferStack.awaitFulfill(SynchronousQueue.java:458)
       java.util.concurrent.SynchronousQueue$TransferStack.transfer(SynchronousQueue.java:362)
       java.util.concurrent.SynchronousQueue.take(SynchronousQueue.java:924)
       java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1067)
       java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1127)
       java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
       java.lang.Thread.run(Thread.java:745)
      

      My logback.xml is:

      <configuration>
      
      	<insertFromJNDI env-entry-name="java:comp/env/context/baseName" as="contextName" />
      	<contextName>${contextName}</contextName>
      
      	<appender name="FILE"
      		class="ch.qos.logback.core.rolling.RollingFileAppender">
      		<file>${catalina.base}/logs/${CONTEXT_NAME}.log</file>
      		<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
      			<!-- daily rollover -->
      			<fileNamePattern>${catalina.base}/logs/${CONTEXT_NAME}.log.%d.gz</fileNamePattern>
      			<maxHistory>30</maxHistory>
      		</rollingPolicy>
      		<encoder>
      			<pattern>%d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n</pattern>
      		</encoder>
      	</appender>
      
      	<root level="INFO">
      		<appender-ref ref="FILE" />
      	</root>
      
      	<logger name="com.company" level="INFO" />
      	<logger name="org.springframework" level="WARN" />
      
      </configuration>
      

      Attachments

        Activity

          People

            logback-dev Logback dev list
            michael-o Michael Osipov
            Votes:
            1 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: