Uploaded image for project: 'logback'
  1. logback
  2. LOGBACK-1354

Errors cause AsyncAppender's worker thread to terminate causing halting

    Details

    • Type: Bug
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 1.2.3
    • Fix Version/s: None
    • Component/s: logback-core
    • Labels:
      None
    • Environment:

      (Not environment specific.)

      Description

      The AsyncAppender worker thread, defined in AsyncAppenderBase, consumes log entries from a bounded blocking queue. Should this worker thread terminate prematurely for any reason and the AsyncAppender be configured as blocking (neverBlock=false) the queue fills and any calls to log block indefinitely.

      The worker thread is currently indirectly tolerant of exceptions thrown by an appender, due to the exception handling in AppenderBase.doAppend, but this exception handling does not cover other Throwable types.

      Ideally, the AsyncAppender worker thread should do everything possible to stay alive while the appender is started.

      Please find attached a patch that can be applied to logback 1.2.3 and/or logback master.

      Branch of master with patch applied: https://github.com/greg-a-atkinson/logback/tree/master_LOGBACK-1354

      Branch of tag 1.2.3 with patch applied: https://github.com/greg-a-atkinson/logback/tree/v_1.2.3_LOGBACK-1354

        Attachments

          Activity

            People

            • Assignee:
              logback-dev Logback dev list
              Reporter:
              Atkinson Greg
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated: