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

Prudent FileAppender is stopped if a thread is ever interrupted prior to a logging call

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: 1.0.13
    • Fix Version/s: 1.1.3
    • Component/s: logback-core
    • Labels:
      None
    • Environment:

      N/A

      Description

      If a thread is ever interrupted immediately followed by a logging call using a prudent FileAppender then the FileAppender is stopped and no logging can be done by any other thread.

      FileLockInterruptedException is thrown by FileChannel.lock used in FileAppender.safeWrite. This exception should not stop the entire appender, for my use cases it would be enough to just catch the exception and reset the interrupted flag.

      I've attached a very simple unit test that demonstrates this issue.

        Attachments

          Activity

            People

            • Assignee:
              tony19 Tony Trinh
              Reporter:
              jjensen Joe Jensen
            • Votes:
              2 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: