[slf4j-dev] [Bug 176] Initialization (getILoggerFactory) is not thread safe

bugzilla-daemon at qos.ch bugzilla-daemon at qos.ch
Tue Oct 8 08:51:06 CEST 2013


http://bugzilla.slf4j.org/show_bug.cgi?id=176

--- Comment #25 from Simon Arlott <bugzilla.slf4j.simon at arlott.org> ---
(In reply to comment #24)
> Created attachment 101 [details]
> Patch for thread-safety issues during binding
> 
> The patch uses the same test previously attached. The implementation is
> slightly different than the other patch. I don't think the reentrancy
> checking should be necessary, but I don't know if other bindings actually
> invoke this method again.

> // If re-entrant, return the temp factory

You're making an assumption that it will be re-entrant using the same thread.
There is no guarantee that this is the case. The binding may be calling
arbitrary external code that blocks while it does some initialisation. This
initialisation may be performed with multiple threads in parallel, and one of
those threads may try to log something.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.qos.ch/pipermail/slf4j-dev/attachments/20131008/b28c5fe2/attachment.html>


More information about the slf4j-dev mailing list