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 A657110676 for ; Fri, 31 Jan 2014 13:40:49 +0000 (UTC) Received: (qmail 76176 invoked by uid 500); 31 Jan 2014 13:40:47 -0000 Delivered-To: apmail-logging-log4j-dev-archive@logging.apache.org Received: (qmail 76143 invoked by uid 500); 31 Jan 2014 13:40:46 -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 76084 invoked by uid 99); 31 Jan 2014 13:40:43 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 31 Jan 2014 13:40:43 +0000 Date: Fri, 31 Jan 2014 13:40:43 +0000 (UTC) From: "Gary Gregory (JIRA)" To: log4j-dev@logging.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (LOG4J2-323) ThreadLocal-leak on tomcat shutdown when using async logging 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-323?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13887754#comment-13887754 ] Gary Gregory commented on LOG4J2-323: ------------------------------------- oops, my bad on the override. > ThreadLocal-leak on tomcat shutdown when using async logging > ------------------------------------------------------------ > > Key: LOG4J2-323 > URL: https://issues.apache.org/jira/browse/LOG4J2-323 > Project: Log4j 2 > Issue Type: Bug > Affects Versions: 2.0-beta9 > Environment: Mac OS X 10.8.4, Tomcat 7.0.42, java version 1.6.0_51 > Reporter: Michael Kloster > Assignee: Nick Williams > Priority: Minor > Fix For: 2.0-rc1 > > > When shutting down Tomcat 7.0.42, catalina.out displays the following warning indicating a memory leak: > {code} > Jul 28, 2013 9:55:59 AM org.apache.coyote.AbstractProtocol start > INFO: Starting ProtocolHandler ["http-bio-8080"] > Jul 28, 2013 9:55:59 AM org.apache.coyote.AbstractProtocol start > INFO: Starting ProtocolHandler ["ajp-bio-8009"] > Jul 28, 2013 9:55:59 AM org.apache.catalina.startup.Catalina start > INFO: Server startup in 841 ms > Jul 28, 2013 9:56:09 AM org.apache.catalina.core.StandardServer await > INFO: A valid shutdown command was received via the shutdown port. Stopping the Server instance. > Jul 28, 2013 9:56:09 AM org.apache.coyote.AbstractProtocol pause > INFO: Pausing ProtocolHandler ["http-bio-8080"] > Jul 28, 2013 9:56:09 AM org.apache.coyote.AbstractProtocol pause > INFO: Pausing ProtocolHandler ["ajp-bio-8009"] > Jul 28, 2013 9:56:09 AM org.apache.catalina.core.StandardService stopInternal > INFO: Stopping service Catalina > Jul 28, 2013 9:56:09 AM org.apache.catalina.loader.WebappClassLoader checkThreadLocalMapForLeaks > SEVERE: The web application [/asynclog] created a ThreadLocal with key of type [java.lang.ThreadLocal] (value [java.lang.ThreadLocal@648bfdea]) and a value of type [org.apache.logging.log4j.core.async.AsyncLogger.Info] (value [org.apache.logging.log4j.core.async.AsyncLogger$Info@4e26d560]) but failed to remove it when the web application was stopped. Threads are going to be renewed over time to try and avoid a probable memory leak. > Jul 28, 2013 9:56:09 AM org.apache.coyote.AbstractProtocol stop > INFO: Stopping ProtocolHandler ["http-bio-8080"] > Jul 28, 2013 9:56:09 AM org.apache.coyote.AbstractProtocol stop > INFO: Stopping ProtocolHandler ["ajp-bio-8009"] > Jul 28, 2013 9:56:09 AM org.apache.coyote.AbstractProtocol destroy > INFO: Destroying ProtocolHandler ["http-bio-8080"] > Jul 28, 2013 9:56:09 AM org.apache.coyote.AbstractProtocol destroy > INFO: Destroying ProtocolHandler ["ajp-bio-8009"] > {code} > {code:xml|title=log4j2.xml|borderStyle=solid} > > > > filePattern="logs/my-%d{COMPACT}.log"> > > > > > > > > > > > > > > > > > > > {code} > {code:title=log4j2.xml|borderStyle=solid} > #!/bin/bash > CATALINA_OPTS=-DLog4jContextSelector=org.apache.logging.log4j.core.async.AsyncLoggerContextSelector > {code} -- This message was sent by Atlassian JIRA (v6.1.5#6160) --------------------------------------------------------------------- To unsubscribe, e-mail: log4j-dev-unsubscribe@logging.apache.org For additional commands, e-mail: log4j-dev-help@logging.apache.org