logging-log4j-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Remko Popma (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (LOG4J2-1172) ThreadLocal leak [AsyncLogger$Info] on Tomcat when using AsyncLoggerContextSelector
Date Fri, 23 Oct 2015 18:24:27 GMT

     [ https://issues.apache.org/jira/browse/LOG4J2-1172?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Remko Popma updated LOG4J2-1172:
--------------------------------
    Summary: ThreadLocal leak [AsyncLogger$Info] on Tomcat when using AsyncLoggerContextSelector
 (was: ThreadLocal leak on Tomcat when using AsyncLoggerContextSelector)

> ThreadLocal leak [AsyncLogger$Info] on Tomcat when using AsyncLoggerContextSelector
> -----------------------------------------------------------------------------------
>
>                 Key: LOG4J2-1172
>                 URL: https://issues.apache.org/jira/browse/LOG4J2-1172
>             Project: Log4j 2
>          Issue Type: Bug
>          Components: Configurators, Web/Servlet
>    Affects Versions: 2.4, 2.4.1, 2.5
>            Reporter: Remko Popma
>             Fix For: 2.5
>
>
> Tomcat warns at SEVERE level about a ThreadLocal leak (AsyncLogger$Info).
> Steps to reproduce:
> * Make all loggers async by using the AsyncLoggerContextSelector 
> * Place the log4j jar files in the web app's WEB-INF/lib folder, and the configuration
file in the class path or in a location configured in the web.xml
> * Start the web app, trigger some logging, then stop the web app.
> Tomcat will warn
> {quote}
> SEVERE: The web application \[webapp] created a ThreadLocal with key of type \[org.apache.logging.log4j.core.async.AsyncLogger$Info$1]
(value \[org.apache.logging.log4j.core.async.AsyncLogger$Info$1@136a1c9]) and a value of type
\[org.apache.logging.log4j.core.async.AsyncLogger.Info] (value \[org.apache.logging.log4j.core.async.AsyncLogger$Info@597fb9])
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.
> {quote}
> Note: as of log4j 2.5, {{Info}} is no longer an inner class of {{AsyncLogger}}, so the
message may look slightly different.



--
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


Mime
View raw message