[ 
https://issues.apache.org/jira/browse/LOG4NET-418?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15540806#comment-15540806
 ] 

Dominik Psenner commented on LOG4NET-418:
-----------------------------------------

According to https://github.com/cjbhaines/Log4Net.Async/issues/30 the exception 
stacktrace looks like:

"log4net:ERROR Subscriber task was aborted.
System.Threading.ThreadAbortException: Thread was being aborted.
at System.Threading.Monitor.ObjWait(Boolean exitContext, Int32 
millisecondsTimeout, Object obj)
at System.Threading.SemaphoreSlim.WaitUntilCountOrTimeout(Int32 
millisecondsTimeout, UInt32 startTime, CancellationToken cancellationToken)
at System.Threading.SemaphoreSlim.Wait(Int32 millisecondsTimeout, 
CancellationToken cancellationToken)
at 
System.Collections.Concurrent.BlockingCollection1.TryTakeWithNoTimeValidation(T&
 item, Int32 millisecondsTimeout, CancellationToken cancellationToken, 
CancellationTokenSource combinedTokenSource) at 
System.Collections.Concurrent.BlockingCollection1.d__68.MoveNext()
at Log4Net.Async.ParallelForwardingAppender.SubscriberLoop()
log4net:ERROR Exception while logging
System.Threading.LockRecursionException: Recursive read lock acquisitions not 
allowed in this mode.
at System.Threading.ReaderWriterLockSlim.TryEnterReadLockCore(TimeoutTracker 
timeout)
at System.Threading.ReaderWriterLockSlim.TryEnterReadLock(TimeoutTracker 
timeout)
at log4net.Repository.Hierarchy.Logger.CallAppenders(LoggingEvent loggingEvent)
at log4net.Repository.Hierarchy.Logger.Log(Type 
callerStackBoundaryDeclaringType, Level level, Object message, Exception 
exception)"

and a System.Threading.ThreadAbortException indicates another issue that at 
first sight looks unrelated. ThreadAbortException is generally thrown when a 
thread should be aborted (i.e. terminated) and that can indeed happen with when 
an async log request is being processed but the thread that it runs on gets 
terminated before it can complete its task. We will need more information to 
shed more light on this but this information should point you into a direction 
that should help you understand the root cause of the issue.

> Recursive read lock acquisitions not allowed in this mode.
> ----------------------------------------------------------
>
>                 Key: LOG4NET-418
>                 URL: https://issues.apache.org/jira/browse/LOG4NET-418
>             Project: Log4net
>          Issue Type: Bug
>          Components: Appenders
>            Reporter: Fabio Marini
>
> I'm getting the unhandled exception above when calling 
> log.Logger.Repository.GetAppenders(); - understand unhandled exceptions 
> should not occur and should be treated as bugs?



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to