[jira] [Commented] (LOG4J2-2166) while shutdown IBM liberty with dubbo and log4j2(Async); log4j2 cause OOME
[ 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)
[jira] [Commented] (LOG4J2-2166) while shutdown IBM liberty with dubbo and log4j2(Async); log4j2 cause OOME
[ https://issues.apache.org/jira/browse/LOG4J2-2166?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16306900#comment-16306900 ] Matt Sicker commented on LOG4J2-2166: - This reminds me of a similar issue we had long ago regarding a Configuration being loaded at the end. That was replaced with a NullConfiguration on shutdown to avoid unloaded classes from causing an error. Could such a similar idea work here? > 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 > 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 (v6.4.14#64029)
[jira] [Commented] (LOG4J2-2166) while shutdown IBM liberty with dubbo and log4j2(Async); log4j2 cause OOME
[ https://issues.apache.org/jira/browse/LOG4J2-2166?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16306660#comment-16306660 ] henrydlwang commented on LOG4J2-2166: - I try to use mix synclogger & asynclogger in my app i.e. all logger were async except root logger; and set logger's additivity property to false; the OOME problem is solved. but NullPointException still exist. anyway it does not cause jvm dump... > 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 > 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 (v6.4.14#64029)