[ 
https://issues.apache.org/jira/browse/LOG4J2-2166?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16429820#comment-16429820
 ] 

Gary Gregory commented on LOG4J2-2166:
--------------------------------------

[~henrydlwang]:(

Thank you for your report.

Can you post the NPE here please? Maybe we can fail more gracefully in this 
case.

Gary

> while shutdown IBM liberty with dubbo and log4j2(Async); log4j2 cause OOME 
> ---------------------------------------------------------------------------
>
>                 Key: LOG4J2-2166
>                 URL: https://issues.apache.org/jira/browse/LOG4J2-2166
>             Project: Log4j 2
>          Issue Type: Bug
>          Components: Appenders, Configurators
>    Affects Versions: 2.9.1
>         Environment: SUSE Linux Enterprise Server 11 PS4; 
> CPU 4core 64-bit;
> IBM liberty-16.0.0.3
> IBM J9VM JRE 1.8.0 
>            Reporter: henrydlwang
>            Priority: Major
>         Attachments: IMG_0288.HEIC, IMG_0290.HEIC, IMG_0291.HEIC
>
>
> I set properties 
> Log4jContextSelector=org.apache.logging.log4j.core.async.AsyncLoggerContextSelector
>  to make all logging async; it works quite well while my app is up which is 
> running on liberty. 
> when I try to  shut it down with liberty's stop command. Log4j cannot stop 
> normally, it looks like that its AsyncLoggerDisruptor.stop(at line 152) 
> method want to load class DiscardingAsyncQueueFullPolicy, but the ClassLoader 
> cannot be found, so system begin to throws NPE;  at the same time log4j 
> cannot write any more message, as it cannot get logger any more as system is 
> shutting down. so log4j began to thow exception eventually it cause OOME. 
> I guess it's async logger issue. so I remove the Log4jContextSelector 
> properties and try. it works. I will try sync logger and async appender later.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to