There is a bug in the GetLoggingInternal method of the AbstractCachingLoggerFactoryAdapter making it vurnerable to race condition. The developer of that method assumed that reading from a Hashtable is always thread-safe, while it's only thread-safe when no elements can be added at the same time. In this case reads (calls to _cachedLoggers[name]) can be mixed with a write operation (call to _cachedLoggers.Add(name, log)), because the read is not enclosed in the lock statement.
There are two solutions two this problem:
1. enclose the read operation inside of the lock operation (but this isn't good for performance)
2. Make _cachedLoggers instances readonly and replace them completely by a new instance when adding. The attached file shows a possible implementation of this solution.
Fix for AbstractCachingLoggerFactoryAdapter.GetLoggerInternal method.
My apologies for posting this bug report without a Source Forge account. As you can see I now created an account.
there is a lock, don't worry