Uploaded image for project: 'Log4j 2'
  1. Log4j 2
  2. LOG4J2-1518

Deadlock when using pure async and toString logs another message

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.6.2
    • Fix Version/s: 2.7
    • Component/s: None
    • Labels:
      None
    • Environment:

      Solaris

      Description

      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

        Attachments

        1. LOG4J2-1518.patch
          3 kB
          Leon Finker
        2. 10511.jstack
          324 kB
          Leon Finker
        3. async_deadlock.txt
          6 kB
          Leon Finker

          Issue Links

            Activity

              People

              • Assignee:
                remkop@yahoo.com Remko Popma
                Reporter:
                leonfin Leon Finker
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: