jdk icon indicating copy to clipboard operation
jdk copied to clipboard

8334513: New test gc/TestAlwaysPreTouchBehavior.java is failing

Open tstuefe opened this issue 1 year ago • 8 comments

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:

  1. obviously, it is not bullet-proof either, since it is vulnerable to fast changes in machine memory load.
  2. 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)
  3. SkippedException leads 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

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

Link to Webrev Comment

tstuefe avatar Jun 20 '24 11:06 tstuefe

: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.

bridgekeeper[bot] avatar Jun 20 '24 11:06 bridgekeeper[bot]

@tstuefe This change is no longer ready for integration - check the PR body for details.

openjdk[bot] avatar Jun 20 '24 11:06 openjdk[bot]

@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.

openjdk[bot] avatar Jun 20 '24 11:06 openjdk[bot]

Hi Thomas,

I'm not a Reviewer but this looks good to me. Just a small nit.

Thank you, @SoniaZaldana ! Good catch.

tstuefe avatar Jun 28 '24 19:06 tstuefe

/cc hotspot-gc

albertnetymk avatar Jul 01 '24 09:07 albertnetymk

@albertnetymk The hotspot-gc label was successfully added.

openjdk[bot] avatar Jul 01 '24 09:07 openjdk[bot]

Could you please confirm whether it is related to JDK-8335167?

limingliu-ampere avatar Jul 03 '24 06:07 limingliu-ampere

Hi @albertnetymk, thanks a lot for your review. I added a comment explaining the test ratio and -setup.

tstuefe avatar Jul 04 '24 07:07 tstuefe

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.

tstuefe avatar Jul 04 '24 08:07 tstuefe

Friendly ping

tstuefe avatar Jul 09 '24 19:07 tstuefe

@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!

bridgekeeper[bot] avatar Aug 07 '24 07:08 bridgekeeper[bot]

@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.

bridgekeeper[bot] avatar Sep 04 '24 08:09 bridgekeeper[bot]

/open

tstuefe avatar May 22 '25 05:05 tstuefe

@tstuefe This pull request is now open

openjdk[bot] avatar May 22 '25 05:05 openjdk[bot]

@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

openjdk[bot] avatar May 22 '25 05:05 openjdk[bot]

I am closing this in favor of a new, simpler approach

tstuefe avatar May 22 '25 06:05 tstuefe

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

tstuefe avatar May 22 '25 11:05 tstuefe