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

"LockRecursionException: A read lock may not be acquired with the write lock held in this mode." exception

Attach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.2.13
    • Fix Version/s: 2.0.8
    • Component/s: Core
    • Labels:
      None
    • Environment:
      Windows 7 x64 / .NET 4.5.2

      Description

      I'm getting this exception when trying to call ILog.Error() method (the logger used is RollingFileAppender):

      log4net:ERROR Exception while logging
      System.Threading.LockRecursionException: A read lock may not be acquired with the write lock held in this mode.
      at System.Threading.ReaderWriterLockSlim.TryEnterReadLockCore(TimeoutTracker timeout)
      at System.Threading.ReaderWriterLockSlim.TryEnterReadLock(TimeoutTracker timeout)
      at System.Threading.ReaderWriterLockSlim.EnterReadLock()
      at log4net.Util.ReaderWriterLock.AcquireReaderLock()
      at log4net.Repository.Hierarchy.Logger.CallAppenders(LoggingEvent loggingEvent)
      at log4net.Repository.Hierarchy.Logger.ForcedLog(Type callerStackBoundaryDeclaringType, Level level, Object message, Exception exception)
      at log4net.Repository.Hierarchy.Logger.Log(Type callerStackBoundaryDeclaringType, Level level, Object message, Exception exception)

      Any ideas why it might be happening?

        Attachments

        Issue Links

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              fandrei Andrei Faber

              Dates

              • Created:
                Updated:
                Resolved:

                Issue deployment