You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@logging.apache.org by "Maksim Fedorov (Jira)" <ji...@apache.org> on 2022/05/13 11:54:00 UTC
[jira] [Created] (LOG4J2-3505) Threads get stuck inside TimeoutBlockingWaitStrategy when using async logging
Maksim Fedorov created LOG4J2-3505:
--------------------------------------
Summary: Threads get stuck inside TimeoutBlockingWaitStrategy when using async logging
Key: LOG4J2-3505
URL: https://issues.apache.org/jira/browse/LOG4J2-3505
Project: Log4j 2
Issue Type: Bug
Components: Appenders
Affects Versions: 2.17.1
Reporter: Maksim Fedorov
Attachments: threads.txt
In our project we are using log4j2 2.17.1 in async mode with RollingRandomAccessFile appenders, LMAX Disruptor version is 3.4.4. Sometimes our application gets in a situation when some of its threads get stuck infinitely inside Disruptor's {{TimeoutBlockingWaitStrategy#signalAllWhenBlocking}} method, while log4j2 async logger threads are sitting in {{TimeoutBlockingWaitStrategy#waitFor}} (see the attached excerpt from the thread dump). From this point logging stops completely and the abovementioned application threads become unable to make any progress. We added a custom async log queue policy which discards all messages regardless of the log level in case of an overflow, but it didn't help. Here is our logging configuration:
{noformat}
-Dlog4j2.contextSelector=org.apache.logging.log4j.core.async.AsyncLoggerContextSelector
-Dlog4j2.asyncLoggerRingBufferSize=524288
-Dlog4j2.asyncQueueFullPolicy=com.mycompany.logging.DiscardingLogQueueFullPolicy
{noformat}
--
This message was sent by Atlassian Jira
(v8.20.7#820007)