RFR: 8283719: java/util/logging/CheckZombieLockTest.java failing intermittently [v2]

Daniel Fuchs dfuchs at openjdk.java.net
Fri Apr 8 17:08:25 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.

Daniel Fuchs has updated the pull request incrementally with one additional commit since the last revision:

  Incorporated review comments

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

Changes:
  - all: https://git.openjdk.java.net/jdk/pull/8168/files
  - new: https://git.openjdk.java.net/jdk/pull/8168/files/752d4ba0..46527e37

Webrevs:
 - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=8168&range=01
 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=8168&range=00-01

  Stats: 12 lines in 1 file changed: 2 ins; 6 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