Return-Path: X-Original-To: apmail-logging-log4j-dev-archive@www.apache.org Delivered-To: apmail-logging-log4j-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 69DAD18700 for ; Thu, 21 Jan 2016 15:21:40 +0000 (UTC) Received: (qmail 58105 invoked by uid 500); 21 Jan 2016 15:21:40 -0000 Delivered-To: apmail-logging-log4j-dev-archive@logging.apache.org Received: (qmail 57938 invoked by uid 500); 21 Jan 2016 15:21:40 -0000 Mailing-List: contact log4j-dev-help@logging.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Help: List-Post: List-Id: "Log4J Developers List" Reply-To: "Log4J Developers List" Delivered-To: mailing list log4j-dev@logging.apache.org Received: (qmail 57853 invoked by uid 99); 21 Jan 2016 15:21:40 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 21 Jan 2016 15:21:40 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id C76E52C1F57 for ; Thu, 21 Jan 2016 15:21:39 +0000 (UTC) Date: Thu, 21 Jan 2016 15:21:39 +0000 (UTC) From: "Misagh Moayyed (JIRA)" To: log4j-dev@logging.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (LOG4J2-1259) Log4j threads are leaking on tomcat shutdown MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/LOG4J2-1259?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15110747#comment-15110747 ] Misagh Moayyed commented on LOG4J2-1259: ---------------------------------------- log4j2.xml is here: https://github.com/Jasig/cas/blob/master/cas-server-webapp/src/main/resources/log4j2.xml No system properties defined. Nothing special about the configuration really. Generate the war, drop it in webapps, startup.bat|sh. Tomcat comes up. shutdown.sh|bat. See the threads in the logs. Log4j jar files are part of WEB-INF\lib. I don't define anything peculiar or special for the classpath. I simply just drop the war into a vanilla brand-new tomcat environment. The webapp has about 40-50 JARs in the lib directory. > Log4j threads are leaking on tomcat shutdown > -------------------------------------------- > > Key: LOG4J2-1259 > URL: https://issues.apache.org/jira/browse/LOG4J2-1259 > Project: Log4j 2 > Issue Type: Bug > Components: Appenders > Affects Versions: 2.5 > Reporter: Misagh Moayyed > > Running log4j2 v2.5 with disruptor 3.3.x. AsyncLoggers configured. log4j-web also included in the web application deployed in Tomcat 8. The context listener is correctly starting up and shutting down, catalina.properties does not include the log4j*.jar entry. Yet I see: > {code} > 20-Jan-2016 14:59:26.322 WARNING [localhost-startStop-2] org.apache.catalina.loader.WebappClassLoaderBase.clearReferencesThreads The web application [cas-server-webapp-4.3.0-SNAPSHOT] appears to have started a thread named [Log4j2-Log4j2Scheduled-5] 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.parkNanos(LockSupport.java:215) > java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.awaitNanos(AbstractQueuedSynchronizer.java:2078) > java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(ScheduledThreadPoolExecutor.java:1093) > java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(ScheduledThreadPoolExecutor.java:809) > 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) > 20-Jan-2016 14:59:26.336 WARNING [localhost-startStop-2] org.apache.catalina.loader.WebappClassLoaderBase.clearReferencesThreads The web application [cas-server-webapp-4.3.0-SNAPSHOT] appears to have started a thread named [Log4j2-AsyncLoggerConfig-6] 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.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:2039) > com.lmax.disruptor.BlockingWaitStrategy.waitFor(BlockingWaitStrategy.java:45) > com.lmax.disruptor.ProcessingSequenceBarrier.waitFor(ProcessingSequenceBarrier.java:56) > com.lmax.disruptor.BatchEventProcessor.run(BatchEventProcessor.java:124) > java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) > java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) > java.lang.Thread.run(Thread.java:745) > {code} -- This message was sent by Atlassian JIRA (v6.3.4#6332) --------------------------------------------------------------------- To unsubscribe, e-mail: log4j-dev-unsubscribe@logging.apache.org For additional commands, e-mail: log4j-dev-help@logging.apache.org