RFR: JDK-6823527: java.util.logging.Handler has thread safety issues
david.holmes at oracle.com
Sat Aug 31 12:05:16 UTC 2013
On 31/08/2013 3:04 AM, Jason Mehrens wrote:
> The coarse grain locking in FileHandler, MemoryHandler, SocketHandler, and StreamHandler publish could/should be relaxed so we are not calling isLoggable while holding the lock.
I'm not sure I'd agree with that. If you moved isLoggable outside the
sync region you could get inconsistent logging results if the log level
is changed after the check - eg thread A is logging while the level is
'high' and has checked isLoggable and it returned true and it gets
preempted. Thread B changes the log level and adds a record to the log
indicating that. Thread A then continues and you appear to get a "wrong"
Anyway definitely a future RFE not something to be modified for this issue.
>> Date: Fri, 30 Aug 2013 13:50:56 +0200
>> From: daniel.fuchs at oracle.com
>> To: david.holmes at oracle.com
>> Subject: Re: RFR: JDK-6823527: java.util.logging.Handler has thread safety issues
>> CC: core-libs-dev at openjdk.java.net
>> Please find below an updated patch for solution (c)
>> best regards,
>> -- daniel
More information about the core-libs-dev