logging-log4net-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Fyodor Soikin (JIRA)" <j...@apache.org>
Subject [jira] [Created] (LOG4NET-431) The AppenderSkeleton.DoAppend methods may cause deadlocks
Date Sat, 05 Apr 2014 01:52:20 GMT
Fyodor Soikin created LOG4NET-431:
-------------------------------------

             Summary: The AppenderSkeleton.DoAppend methods may cause deadlocks
                 Key: LOG4NET-431
                 URL: https://issues.apache.org/jira/browse/LOG4NET-431
             Project: Log4net
          Issue Type: Bug
          Components: Appenders
            Reporter: Fyodor Soikin


The AppenderSkeleton.DoAppender method calls a few methods (in particular, FilterEvent, PreAppendCheck,
and Append), which are virtual.

Calling code you don't control from within a synchronization block is a major no-no, thread-safely
speaking. It may cause deadlocks - and, in my case, does cause them.

In my particular case, the runaway code path starts with calling .ToString() on one of the
format arguments. That particular argument is a complex object, whose ToString() implementation
calls a few other components, some of which also use [poorly designed] synchronization constructs.



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Mime
View raw message