On Mon, 9 Feb 2026 10:35:04 GMT, Daniel Fuchs <[email protected]> wrote:

> `java/util/logging/ParentLoggersTest.java` has been observed failing 
> intermittently - nut rarely - in the loom repo.
> After inspection of the code Logger::doSetParent was found to do multiple 
> read of the volatile `parent` field. After changing the method to do a single 
> read the test has no longer been observed failing.

Hello Daniel, the `volatile` `parent` is only set in the `doSetParent()` method 
- the one which is being updated in this PR. That update to `parent` happens 
within a `synchronized` block. Even the read of that `parent` happens after 
acquiring that monitor. Given this, I don't see why reading that value multiple 
times (after the monitor lock is acquired) would cause the issue. The existing 
test that is failing is a bit involved and this is the first time I'm looking 
at it, so I haven't yet understood what the failure is.

-------------

PR Comment: https://git.openjdk.org/jdk/pull/29634#issuecomment-3875663421

Reply via email to