RFR: 8315034 : File.mkdirs() occasionally fails to create folders on Windows shared folder
Alan Bateman
alanb at openjdk.org
Thu Nov 30 14:20:31 UTC 2023
On Fri, 3 Nov 2023 18:11:10 GMT, Weibing Xiao <duke at openjdk.org> wrote:
> File.mkdirs() occasionally fails to create folders on Windows shared folders. It turned out that Windows API FindFirstFileW created the error ERROR_NO_MORE_FILES. In some of the cases with a valid file path, this error still returns this error code, which supposedly should not.
>
> Adding this error code into the method of lastErrorReportable in the native code will be handled by JDK.
>
> To test the fix, it needs to run three Java processes to create the folders on a remote file server.
src/java.base/windows/native/libjava/canonicalize_md.c line 142:
> 140: || (errval == ERROR_NETWORK_UNREACHABLE)
> 141: || (errval == ERROR_NETWORK_ACCESS_DENIED)
> 142: || (errval == ERROR_NO_MORE_FILES)) {
@bplb Is this the same thing as JDK-8234363? Does this also need to be handled in the FindFirstFile usage in WindowsDirectoryStream?
test/jdk/java/io/File/WindowsFileCreation.java line 34:
> 32: * needs to run three Java processes simultaneously to verify the fix.
> 33: * This test requires to run manually and the parent folder as Windows shared folder should be existing already.
> 34: */
There's no `@test` tag so this test won't run, not even as a manual test. I would be inclined to just drop this test and add the "noreg-hard" label to the issue.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/16502#discussion_r1382531676
PR Review Comment: https://git.openjdk.org/jdk/pull/16502#discussion_r1382384469
More information about the core-libs-dev
mailing list