Hello team I am using Apache Log4j2 2.13.0 with LMax Disrupter 3.4.2
I encountering problems were occasionally an instance will go into deadlock. All threads are deadlocking here: org.apache.logging.log4j.core.async.AsyncLoggerDisruptor.enqueueLogMessageWhenQueueFull(RingBufferLogEventTranslator) AsyncLoggerDisruptor.java:229 org.apache.logging.log4j.spi.AbstractLogger.warn(Message) AbstractLogger.java:2629 except one thread that seems to be runnable here Log4j2-TF-1-AsyncLogger[AsyncContext@1de0aca6]-1 Runnable Thread ID: 22 org.apache.logging.log4j.core.async.RingBufferLogEventHandler.onEvent(Object, long, boolean) RingBufferLogEventHandler.java:29 com.lmax.disruptor.BatchEventProcessor.processEvents() BatchEventProcessor.java:168 com.lmax.disruptor.BatchEventProcessor.run() BatchEventProcessor.java:125 java.lang.Thread.run() Thread.java:834 I can see similar deadlock issues reported in the past https://issues.apache.org/jira/browse/LOG4J2-1518 where toString was also logging. I can't see evidence of that in my thread dump or my code but it's possible a dependency somewhere is doing this. I wonder if this recent change has caused a regression https://github.com/apache/logging-log4j2/commit/72e777708b50b5cf6240f70eafcc4b08797a0047#diff-f77d8b534ecffa0241d582d43424f4a5 as the deadlock I am seeing is happening here? https://github.com/apache/logging-log4j2/blob/master/log4j-core/src/main/java/org/apache/logging/log4j/core/async/AsyncLoggerDisruptor.java#L229 Any suggestions how to resolve? Thank you! Mark