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

Leon Finker commented on LOG4J2-1518:
-------------------------------------

Do you mean this issue? https://github.com/LMAX-Exchange/disruptor/issues/138
If that's the case, then please upgrade log4j2 to disruptor 3.3.5. But in my 
case the disruptor background thread is RUNNABLE and looping in 
ProcessingSequenceBarrier.waitFor. So sounds similar but not exactly the same. 
Checked 3 instances thread dumps and exactly the same for AsyncLogger thread. 
So it's just looping and pegging the CPU, but not picking up any of the events. 
100% CPU usage by the JVM confirmed when this happened.
{noformat}
"Log4j2-AsyncLogger[AsyncContext@18b4aac2]1" #24 daemon prio=5 os_prio=64 
tid=0x0000000001f8d800 nid=0x2b runnable [0xfffffd7e695fe000]
   java.lang.Thread.State: RUNNABLE
        at 
com.lmax.disruptor.ProcessingSequenceBarrier.waitFor(ProcessingSequenceBarrier.java:56)
        at 
com.lmax.disruptor.BatchEventProcessor.run(BatchEventProcessor.java:124)
        at 
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
        at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
        at java.lang.Thread.run(Thread.java:745)
{noformat}

Disruptor 3.3.5 changelog:
    Fix NPE in TimeoutBlockingWaitStrategy when used with WorkProcessor
    Add LiteTimeoutBlockingWaitStrategy
    Resignal any waiting threads when trying to publish to a full ring buffer


> Deadlock when using pure async and toString logs another message
> ----------------------------------------------------------------
>
>                 Key: LOG4J2-1518
>                 URL: https://issues.apache.org/jira/browse/LOG4J2-1518
>             Project: Log4j 2
>          Issue Type: Bug
>    Affects Versions: 2.6.2
>         Environment: Solaris
>            Reporter: Leon Finker
>            Assignee: Remko Popma
>         Attachments: 10511.jstack, async_deadlock.txt
>
>
> Hi,
> It looks like this was reported before in: LOG4J2-471
> We've encountered similar issue with one of the libraries where it's toString 
> was indirectly also logging. This caused a deadlock when RingBuffer was full. 
> Please see attached stack snippet.
> According to the following docs, it's possible to set sync policy to 
> synchronously log the event if buffer is full. I don't see it documented. 
> What's the policy option?
> https://issues.apache.org/jira/plugins/servlet/mobile#issue/LOG4J2-1080
> https://logging.apache.org/log4j/2.x/log4j-core/apidocs/org/apache/logging/log4j/core/async/AsyncQueueFullPolicyFactory.html
> Thank you



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-dev-unsubscr...@logging.apache.org
For additional commands, e-mail: log4j-dev-h...@logging.apache.org

Reply via email to