jdk
jdk copied to clipboard
8334513: New test gc/TestAlwaysPreTouchBehavior.java is failing
See JBS issue.
It is not completely obvious what the problem is in Oracle's CI, but the current assumption is that RSS of the testee VM gets reduced after it started and before we measured due to memory pressure.
The patch:
- exposes os::available_memory via Whitebox
- For the test to count as failed, we require a certain minimum size of available memory both before and during the start of the testee JVM. Otherwise, we throw a
SkippedException
I have some misgivings about this solution, though:
- obviously, it is not bullet-proof either, since it is vulnerable to fast changes in machine memory load.
- On MacOS, we have the problem that 'os::available_memory()' totally underreports how much memory is available. Therefore, as an estimate of whether the test is valid, it is too conservative. I opened https://bugs.openjdk.org/browse/JDK-8334767 to track that issue. As long as it is not fixed, the tests will likely fall below the threshold on MacOS and, therefore, be skipped. Still, this is somewhat better than outright excluding the test for MacOS (or is it? Open to opinions)
SkippedExceptionleads to the test counting as "passed", not "skipped". I think that is a usability issue with jtreg. I cannot easily see which tests had been skipped due to SkippedException.
Despite my doubts, I think this is the best we can come up with if we want to have such a test.
Note: One way to go about (3) would be to make "minimum available memory" a @requires tag, similar to os.maxMemory. However, I fear that this may be easily misused and cause many tests to be excluded without notice.
Progress
- [x] Change must be properly reviewed (1 review required, with at least 1 Reviewer)
- [x] Change must not contain extraneous whitespace
- [x] Commit message must refer to an issue
Issue
- JDK-8334513: New test gc/TestAlwaysPreTouchBehavior.java is failing (Bug - P2)
Reviewers
- Albert Mingkun Yang (@albertnetymk - Reviewer)
Reviewing
Using git
Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/19803/head:pull/19803
$ git checkout pull/19803
Update a local copy of the PR:
$ git checkout pull/19803
$ git pull https://git.openjdk.org/jdk.git pull/19803/head
Using Skara CLI tools
Checkout this PR locally:
$ git pr checkout 19803
View PR using the GUI difftool:
$ git pr show -t 19803
Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/19803.diff
Webrev
:wave: Welcome back stuefe! A progress list of the required criteria for merging this PR into master will be added to the body of your pull request. There are additional pull request commands available for use with this pull request.
@tstuefe This change is no longer ready for integration - check the PR body for details.
@tstuefe The following label will be automatically applied to this pull request:
hotspot
When this pull request is ready to be reviewed, an "RFR" email will be sent to the corresponding mailing list. If you would like to change these labels, use the /label pull request command.
Webrevs
- 04: Full - Incremental (109e9172)
- 03: Full - Incremental (eba72ed9)
- 02: Full - Incremental (a25bfca4)
- 01: Full - Incremental (19ed5833)
- 00: Full (30bc66df)
Hi Thomas,
I'm not a Reviewer but this looks good to me. Just a small nit.
Thank you, @SoniaZaldana ! Good catch.
/cc hotspot-gc
@albertnetymk
The hotspot-gc label was successfully added.
Could you please confirm whether it is related to JDK-8335167?
Hi @albertnetymk, thanks a lot for your review. I added a comment explaining the test ratio and -setup.
Could you please confirm whether it is related to JDK-8335167?
Both failures may be symptom of the same issue. See my comment in JBS.
Friendly ping
@tstuefe 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!
@tstuefe This pull request has been inactive for more than 8 weeks and will now be automatically closed. If you would like to continue working on this pull request in the future, feel free to reopen it! This can be done using the /open pull request command.
/open
@tstuefe This pull request is now open
@tstuefe this pull request can not be integrated into master due to one or more merge conflicts. To resolve these merge conflicts and update this pull request you can run the following commands in the local repository for your personal fork:
git checkout JDK-8334513-New-test-gc-TestAlwaysPreTouchBehavior-java-is-failing
git fetch https://git.openjdk.org/jdk.git master
git merge FETCH_HEAD
# resolve conflicts and follow the instructions given by git merge
git commit -m "Merge master"
git push
I am closing this in favor of a new, simpler approach
Closing this since Skara is wonky; I have no idea how to fix these strange jcheck errors that refer to files I did not even touch.
New PR: https://github.com/openjdk/jdk/pull/25384