RFR: 8353683: [REDO] j.u.l.Handler classes create deadlock risk via synchronized publish() method
David Beaumont
duke at openjdk.org
Wed Apr 9 14:22:38 UTC 2025
On Tue, 8 Apr 2025 16:15:13 GMT, Chen Liang <liach at openjdk.org> wrote:
>> 8353683: j.u.l.Handler classes create deadlock risk via synchronized publish() method.
>>
>> 1. Remove synchronization of calls to publish() in Handlers in java.util.logging package.
>> 2. Add explanatory comments to various affected methods.
>> 3. Add a test to ensure deadlocks no longer occur.
>>
>> Note that this change does not address issue in MemoryHandler (see JDK-8349208).
>
> src/java.logging/share/classes/java/util/logging/Handler.java line 46:
>
>> 44: * {@code Handler} class.
>> 45: *
>> 46: * <h2><a id=threadSafety>Thread Safety and Deadlock Risk in Handlers</a></h2>
>
> FYI you can add the id attribute to the h2 tag without declaring a separate a tag.
I'm copying exactly what Joe suggested, so I'll leave it like this for consistency. But thanks for pointing that out.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/24504#discussion_r2035486048
More information about the core-libs-dev
mailing list