Uploaded image for project: 'Log4net'
  1. Log4net
  2. LOG4NET-510

FileAppender.InterProcessLock.AcquireLock blocks everything

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Critical
    • Resolution: Fixed
    • 1.2.13
    • None
    • Appenders
    • None
    • Windows 2012
    • Important

    Description

      There's a chance InterProcessLock.AcquireLock hangs, and lots of Appender.AppenderSkeleton.DoAppend threads queued.

      It happens to our service every 2 days, all happen after mid-night. So after a new log file created, few new line in the file added. But not always happens.

      As there're hundreds of Appender.AppenderSkeleton.DoAppend threads queued, it blocks everywhere in the service that uses log4net.

      log4net is supposed to be 'failure-free' or at least fails quietly, not block the whole application.

      config uses
      <lockingModel type="log4net.Appender.FileAppender+InterProcessLock" />

      So far it has hanged for few (8+) hours already.

      The attached screen shot was taken by remote debug from a server after 8+ hours of hanging.

      Attachments

        1. screenshot-1.png
          80 kB
          StevenXi

        Issue Links

          Activity

            People

              Unassigned Unassigned
              stevenxi StevenXi
              Votes:
              2 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: