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

Leon Finker commented on LOG4J2-1914:
-------------------------------------

Hi Gary,

Tried with 2.8.2 and same exception. It's hard to find the actual place though 
that's causing it on the caller's thread.

> AsyncLogger and message formatting (ConcurrentModificationException)
> --------------------------------------------------------------------
>
>                 Key: LOG4J2-1914
>                 URL: https://issues.apache.org/jira/browse/LOG4J2-1914
>             Project: Log4j 2
>          Issue Type: Bug
>    Affects Versions: 2.7
>            Reporter: Leon Finker
>
> Hi,
> The docs specify that the default for log4j.format.msg.async is false. But we 
> still got the following log4j2 AsyncLogger processing exception. Does it mean 
> that message formatting is async or maybe async up to 2.7 only? Or is this 
> something else?  Thank you
> 2017-05-18 08:02:44,570 Log4j2-TF-3-AsyncLoggerConfig-2 ERROR An exception 
> occurred processing Appender AppLogFile 
> java.util.ConcurrentModificationException
>                 at java.util.HashMap$HashIterator.nextNode(Unknown Source)
>                 at java.util.HashMap$EntryIterator.next(Unknown Source)
>                 at java.util.HashMap$EntryIterator.next(Unknown Source)
>                 at 
> org.apache.logging.log4j.message.ParameterFormatter.appendMap(ParameterFormatter.java:569)
>                 at 
> org.apache.logging.log4j.message.ParameterFormatter.appendPotentiallyRecursiveValue(ParameterFormatter.java:505)
>                 at 
> org.apache.logging.log4j.message.ParameterFormatter.recursiveDeepToString(ParameterFormatter.java:432)
>                 at 
> org.apache.logging.log4j.message.ParameterFormatter.formatMessage2(ParameterFormatter.java:189)
>                 at 
> org.apache.logging.log4j.message.ParameterizedMessage.formatTo(ParameterizedMessage.java:225)
>                 at 
> org.apache.logging.log4j.core.pattern.MessagePatternConverter.format(MessagePatternConverter.java:117)
>                 at 
> org.apache.logging.log4j.core.pattern.PatternFormatter.format(PatternFormatter.java:38)
>                 at 
> org.apache.logging.log4j.core.layout.PatternLayout$PatternSerializer.toSerializable(PatternLayout.java:294)
>                 at 
> org.apache.logging.log4j.core.layout.PatternLayout.toText(PatternLayout.java:195)
>                 at 
> org.apache.logging.log4j.core.layout.PatternLayout.encode(PatternLayout.java:180)
>                 at 
> org.apache.logging.log4j.core.layout.PatternLayout.encode(PatternLayout.java:57)
>                 at 
> org.apache.logging.log4j.core.appender.AbstractOutputStreamAppender.directEncodeEvent(AbstractOutputStreamAppender.java:176)
>                 at 
> org.apache.logging.log4j.core.appender.AbstractOutputStreamAppender.tryAppend(AbstractOutputStreamAppender.java:169)
>                 at 
> org.apache.logging.log4j.core.appender.AbstractOutputStreamAppender.append(AbstractOutputStreamAppender.java:160)
>                 at 
> org.apache.logging.log4j.core.appender.RollingRandomAccessFileAppender.append(RollingRandomAccessFileAppender.java:104)
>                 at 
> org.apache.logging.log4j.core.config.AppenderControl.tryCallAppender(AppenderControl.java:156)
>                 at 
> org.apache.logging.log4j.core.config.AppenderControl.callAppender0(AppenderControl.java:129)
>                 at 
> org.apache.logging.log4j.core.config.AppenderControl.callAppenderPreventRecursion(AppenderControl.java:120)
>                 at 
> org.apache.logging.log4j.core.config.AppenderControl.callAppender(AppenderControl.java:84)
>                 at 
> org.apache.logging.log4j.core.config.LoggerConfig.callAppenders(LoggerConfig.java:447)
>                 at 
> org.apache.logging.log4j.core.async.AsyncLoggerConfig.asyncCallAppenders(AsyncLoggerConfig.java:114)
>                 at 
> org.apache.logging.log4j.core.async.AsyncLoggerConfigDisruptor$Log4jEventWrapperHandler.onEvent(AsyncLoggerConfigDisruptor.java:112)
>                 at 
> org.apache.logging.log4j.core.async.AsyncLoggerConfigDisruptor$Log4jEventWrapperHandler.onEvent(AsyncLoggerConfigDisruptor.java:98)
>                 at 
> com.lmax.disruptor.BatchEventProcessor.run(BatchEventProcessor.java:129)
>                 at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown 
> Source)
>                 at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown 
> Source)
>                 at java.lang.Thread.run(Unknown Source)



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Reply via email to