logging-log4j-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Leon Finker (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (LOG4J2-1518) Deadlock when using pure async and toString logs another message
Date Mon, 05 Sep 2016 12:16:21 GMT

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

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

Logging from toString wouldn't be intentional. It can happen when someone calls some other
method, which calls some other method, etc. eventually something logs. It happened in our
case and causes denial of service since all threads of the process eventually deadlock on
logging. The particular instance of code was fixed. But with millions lines of code and many
library dependencies it's hard to know what's lurking out there. It's a bug waiting to happen
under the right conditions. Same as LOG4J2-1457. I think the deadlocks warrant emergency fix.

> 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
>             Fix For: 2.7
>
>         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-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-dev-help@logging.apache.org


Mime
View raw message