-
Notifications
You must be signed in to change notification settings - Fork 5.8k
8298619: java/io/File/GetXSpace.java is failing #12397
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
Conversation
👋 Welcome back bpb! A progress list of the required criteria for merging this PR into |
With reference to the Windows With this change the test passes on all platforms, include 110 repeats on Windows. |
Webrevs
|
test/jdk/java/io/File/GetXSpace.java
Outdated
@@ -149,6 +149,37 @@ private static void diskFree() throws IOException { | |||
out.println(sb); | |||
} | |||
|
|||
private static String getCallerTotalSpace(String name) throws IOException { |
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 a bit fragile to be parsing the output of fsutil volume diskFree
as the output seems to vary by Windows releases and maybe configuration. So minimally, I think it should be changed to use ProcessTools so that the command and the output show up in the .jtr file.
In passing, you might want to choose a different method name to make it clearer what it does, maybe volumeDiskFree?
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 a bit fragile to be parsing the output of
fsutil volume diskFree
as the output seems to vary by Windows releases and maybe configuration. So minimally, I think it should be changed to use ProcessTools so that the command and the output show up in the .jtr file.In passing, you might want to choose a different method name to make it clearer what it does, maybe volumeDiskFree?
Another possibility would be to add a native method to the test itself to invoke GetDiskSpaceInformationW to obtain the value of CallerTotalAllocationUnits
(in bytes) from the DISK_SPACE_INFORMATION structure.
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.
Another possibility would be to add a native method to the test itself to invoke GetDiskSpaceInformationW to obtain the value of
CallerTotalAllocationUnits
(in bytes) from the DISK_SPACE_INFORMATION structure.
That would be more reliable than parsing the output of fsutil volume
so worth trying. You might have to dig into which of these win32 works with quotas as that seems to be part of the issue. The JDK uses GetDiskFreeSpaceExW. Also this test might have to do a few iterations so that it captures free space info while the system is in quiescence - I suspect some of the reliability issues has been concurrent activity that changes the volume space usage significantly while this test is running.
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 has definitely been a problem with quotas on Windows. I set up quotas on actual Windows 11 hardware and replicated the same failure. I am not sure how much lack of system quiescence is to blame, but there would be no harm in building in some robustness for lack of quiescence while we're at it.
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.
Spawning df
and diskFree
processes have been replaced with native calls. For a reason as yet undetermined, the Windows function GetDiskSpaceInformationW
fails to load on Windows Server 2016 so it is loaded dynamically and, if not found, a workaround is used.
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.
Testing in the CI against the latest commit 114857c has passed more than 500 iterations on Windows with no failures.
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.
This test has been run successfully hundreds of times on CI system nodes where it previously failed.
@bplb This pull request has been inactive for more than 4 weeks and will be automatically closed if another 4 weeks passes without any activity. To avoid this, simply add a new comment to the pull request. Feel free to ask for assistance if you need help with progressing this pull request towards integration! |
Ping. |
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.
LGTM
@bplb 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 459 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. ➡️ To integrate this PR with the above commit message to the |
/integrate |
Going to push as commit 3ef834f.
Your commit was automatically rebased without conflicts. |
It seems after refactoring test started to fail on my Win11 VM.
Fails on disk
If I eject disk, I got fail too:
|
Mailing list message from Brian Burkhalter on core-libs-dev: The changes to this test were developed on a native Windows 11 machine. I have never seen this problem. A web search suggests that this is a Windows error message possibly due to drive error. On Sep 4, 2023, at 5:16 AM, Andrey Turbanov <aturbanov at openjdk.org<mailto:aturbanov at openjdk.org>> wrote: It seems after refactoring test started to fail on my Win11 VM. [?] -------------- next part -------------- |
Modify the
Space
instances used for size comparison to be created with total number of bytes derived from the WindowsdiskFree
utility instead of Cygwin’sdf
.Progress
Issue
Reviewers
Reviewing
Using
git
Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/12397/head:pull/12397
$ git checkout pull/12397
Update a local copy of the PR:
$ git checkout pull/12397
$ git pull https://git.openjdk.org/jdk.git pull/12397/head
Using Skara CLI tools
Checkout this PR locally:
$ git pr checkout 12397
View PR using the GUI difftool:
$ git pr show -t 12397
Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/12397.diff
Webrev
Link to Webrev Comment