When running test/hotspot/jtreg/runtime/cds/appcds/SharedArchiveConsistency.java on Windows, sometimes I get this error:
java.io.FileNotFoundException: T:\\testoutput\\test-support\\jtreg_open_test_hotspot_jtreg_hotspot_tier2_runtime\\scratch\\5\\appcds-08h46m47s719.jsa (The requested operation cannot be performed on a file with a user-mapped section open)
at java.base/java.io.FileOutputStream.open0(Native Method)
at java.base/java.io.FileOutputStream.open(FileOutputStream.java:291)
at java.base/java.io.FileOutputStream.<init>(FileOutputStream.java:234)
at java.base/java.io.FileOutputStream.<init>(FileOutputStream.java:184)
at SharedArchiveConsistency.copyFile(SharedArchiveConsistency.java:294)
at SharedArchiveConsistency.main(SharedArchiveConsistency.java:462)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:78)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at com.sun.javatest.regtest.agent.MainWrapper$MainThread.run(MainWrapper.java:127)
at java.base/java.lang.Thread.run(Thread.java:831)