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

Deadlock when using pure async and toString logs another message

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.6.2
    • 2.7
    • None
    • None
    • 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. 10511.jstack
          324 kB
          Leon Finker
        2. async_deadlock.txt
          6 kB
          Leon Finker
        3. LOG4J2-1518.patch
          3 kB
          Leon Finker

        Issue Links

          Activity

            People

              rpopma Remko Popma
              leonfin Leon Finker
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: