RFR: 8283719: java/util/logging/CheckZombieLockTest.java failing intermittently
Daniel Fuchs
dfuchs at openjdk.java.net
Fri Apr 8 16:44:01 UTC 2022
Please find enclosed a patch for
`8283719: java/util/logging/CheckZombieLockTest.java failing intermittently`
My analysis is that the test fails intermittently because the `FileChannel` created by the test is garbage collected too early, which releases the associated lock before the `FileHandler` is created.
I have replaced the `try { } finally { }` with a `try-with-resource( ) { } finally { }` which will prevent the `FileChannel` from being released before the end of the block. Additional bonus: this should also help with the code that tries to cleanup the files at the end.
Though I haven't been able to reproduce the exact failure yet, I haven't observed the new version of the test failing either.
-------------
Commit messages:
- 8283719: java/util/logging/CheckZombieLockTest.java failing intermittently
Changes: https://git.openjdk.java.net/jdk/pull/8168/files
Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=8168&range=00
Issue: https://bugs.openjdk.java.net/browse/JDK-8283719
Stats: 6 lines in 1 file changed: 2 ins; 0 del; 4 mod
Patch: https://git.openjdk.java.net/jdk/pull/8168.diff
Fetch: git fetch https://git.openjdk.java.net/jdk pull/8168/head:pull/8168
PR: https://git.openjdk.java.net/jdk/pull/8168
More information about the core-libs-dev
mailing list