-
Notifications
You must be signed in to change notification settings - Fork 5.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
8315034 : File.mkdirs() occasionally fails to create folders on Windows shared folder #16502
Conversation
👋 Welcome back weibxiao! A progress list of the required criteria for merging this PR into |
* With different the parameters in command line, the test should run successfully without failure. This test | ||
* needs to run three Java processes simultaneously to verify the fix. | ||
* This test requires to run manually and the parent folder as Windows shared folder should be existing already. | ||
*/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
@@ -138,7 +138,8 @@ lastErrorReportable() | |||
|| (errval == ERROR_BAD_NET_NAME) | |||
|| (errval == ERROR_ACCESS_DENIED) | |||
|| (errval == ERROR_NETWORK_UNREACHABLE) | |||
|| (errval == ERROR_NETWORK_ACCESS_DENIED)) { | |||
|| (errval == ERROR_NETWORK_ACCESS_DENIED) | |||
|| (errval == ERROR_NO_MORE_FILES)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@bplb Is this the same thing as JDK-8234363? Does this also need to be handled in the FindFirstFile usage in WindowsDirectoryStream?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems likely. I don't recall having been able to replicate these problems however.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I used to duplicate it quite easily on my personal laptop with JDK11 (one laptop with Windows 11, the other with Windows 10). After my laptop system got updated, it was almost impossible to recreate it with my two laptops. To verify this bug, we have to configure exactly the same testing environment as the customer was having.
Removed the test file and added the label to JBS |
@weibxiao This change now passes all automated pre-integration checks. ℹ️ This project also has non-automated pre-integration requirements. Please see the file CONTRIBUTING.md for details. After integration, the commit message for the final commit will be:
You can use pull request commands such as /summary, /contributor and /issue to adjust it as needed. At the time when this comment was updated there had been 512 new commits pushed to the
As there are no conflicts, your changes will automatically be rebased on top of these commits when integrating. If you prefer to avoid this automatic rebasing, please check the documentation for the /integrate command for further details. As you do not have Committer status in this project an existing Committer must agree to sponsor your change. Possible candidates are the reviewers of this PR (@bplb) but any other Committer may sponsor as well. ➡️ To flag this PR as ready for integration with the above commit message, type |
/integrate |
/sponsor |
Going to push as commit 7ad7005.
Your commit was automatically rebased without conflicts. |
Hello, Has this been backported to Java 8 ? I can't really find the info. |
Hello Olivier, this has been backported to 11, 17 and 21 update releases but not to JDK 8. I don't closely follow the update releases, so I don't know if there's a reason for that. |
According to the issue JDK-8321863 it looks like it has been so backported. |
It was not backport to jdk8u. https://bugs.openjdk.org/browse/JDK-8321863 is for 8u411-perf, which is not same as jdk8u release.
The bug originally was reported in jdk11, not in jdk8. That’s the reason I did not backport the change to jdk8u.
From: Brian Burkhalter ***@***.***>
Date: Thursday, July 18, 2024 at 2:41 PM
To: openjdk/jdk ***@***.***>
Cc: Weibing Xiao ***@***.***>, Mention ***@***.***>
Subject: [External] : Re: [openjdk/jdk] 8315034 : File.mkdirs() occasionally fails to create folders on Windows shared folder (PR #16502)
Hello, Has this been backported to Java 8 ? I can't really find the info.
According to the issue JDK-8321863<https://bugs.openjdk.org/browse/JDK-8321863> it looks like it has been so backported.
—
Reply to this email directly, view it on GitHub<https://urldefense.com/v3/__https:/github.com/openjdk/jdk/pull/16502*issuecomment-2237262955__;Iw!!ACWV5N9M2RV99hQ!PR2KjEjBmXU6E3-YKNOLy6jy2YB1Jw62HIhlGjb-fQ89qh4isQZVzbCbcjG-E9OSqjtmIyl6v3T9sPnktnn5mN-1l2w$>, or unsubscribe<https://urldefense.com/v3/__https:/github.com/notifications/unsubscribe-auth/AP4PT5FJ7OUTZFDXWI3ZECDZNAD6JAVCNFSM6AAAAABKW6VHHCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDEMZXGI3DEOJVGU__;!!ACWV5N9M2RV99hQ!PR2KjEjBmXU6E3-YKNOLy6jy2YB1Jw62HIhlGjb-fQ89qh4isQZVzbCbcjG-E9OSqjtmIyl6v3T9sPnktnn5NbZaCuI$>.
You are receiving this because you were mentioned.Message ID: ***@***.***>
|
Thanks for the clarification. |
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.
Progress
Issue
Reviewers
Reviewing
Using
git
Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/16502/head:pull/16502
$ git checkout pull/16502
Update a local copy of the PR:
$ git checkout pull/16502
$ git pull https://git.openjdk.org/jdk.git pull/16502/head
Using Skara CLI tools
Checkout this PR locally:
$ git pr checkout 16502
View PR using the GUI difftool:
$ git pr show -t 16502
Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/16502.diff
Webrev
Link to Webrev Comment