RFR: 8377457: java/util/logging/ParentLoggersTest.java failed intermittently
Jaikiran Pai
jpai at openjdk.org
Tue Feb 10 06:45:10 UTC 2026
On Mon, 9 Feb 2026 10:35:04 GMT, Daniel Fuchs <dfuchs at openjdk.org> 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
More information about the core-libs-dev
mailing list