You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4j-dev@logging.apache.org by "Remko Popma (JIRA)" <ji...@apache.org> on 2013/10/15 02:22:42 UTC

[jira] [Updated] (LOG4J2-425) Permgen leak in AsyncLoggerConfigHelper

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

Remko Popma updated LOG4J2-425:
-------------------------------

    Description: 
Thread local 'currentLogEvent' is not cleaned on shutdown which prevent  web applications clean undeploying.
Tomcat prints following:
{code}
SEVERE: The web application [/web] created a ThreadLocal with key of type [java.lang.ThreadLocal] (value [java.lang.ThreadLocal@22410487]) and a value of type [org.apache.logging.log4j.core.impl.Log4jLogEvent] (value [Logger=********* Level=INFO Message=************]) 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.
{code}

We use async loggers declared explicitly in log4j2.xml:
<AsyncLogger name="logger" additivity="false" level="trace"> ......

We use RollingRandomAccessFile as appender.




  was:
Thread local 'currentLogEvent' is not cleaned on shutdown which prevent  web applications clean undeploying.
Tomcat prints following:
SEVERE: The web application [/web] created a ThreadLocal with key of type [java.lang.ThreadLocal] (value [java.lang.ThreadLocal@22410487]) and a value of type [org.apache.logging.log4j.core.impl.Log4jLogEvent] (value [Logger=********* Level=INFO Message=************]) 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.

We use async loggers declared explicitly in log4j2.xml:
<AsyncLogger name="logger" additivity="false" level="trace"> ......

We use RollingRandomAccessFile as appender.





> Permgen leak in AsyncLoggerConfigHelper
> ---------------------------------------
>
>                 Key: LOG4J2-425
>                 URL: https://issues.apache.org/jira/browse/LOG4J2-425
>             Project: Log4j 2
>          Issue Type: Bug
>          Components: Appenders
>    Affects Versions: 2.0-beta9
>         Environment: JDK7, Win8 64bit
>            Reporter: Sergey Alaev
>
> Thread local 'currentLogEvent' is not cleaned on shutdown which prevent  web applications clean undeploying.
> Tomcat prints following:
> {code}
> SEVERE: The web application [/web] created a ThreadLocal with key of type [java.lang.ThreadLocal] (value [java.lang.ThreadLocal@22410487]) and a value of type [org.apache.logging.log4j.core.impl.Log4jLogEvent] (value [Logger=********* Level=INFO Message=************]) 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.
> {code}
> We use async loggers declared explicitly in log4j2.xml:
> <AsyncLogger name="logger" additivity="false" level="trace"> ......
> We use RollingRandomAccessFile as appender.



--
This message was sent by Atlassian JIRA
(v6.1#6144)

---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-dev-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-dev-help@logging.apache.org