Skip to content

Conversation

@kevinjwalls
Copy link
Contributor

@kevinjwalls kevinjwalls commented Dec 19, 2025

In JDK-8370731 I made this test much too thorough. It was good to ensure some testing was always done, but fixing the existing loop within runOne() was wrong. We have an outer loop already in the run() method.

20, 30 or 137 (!) iterations is unnecessary. Eventually or occasionally an iteration does not cause a collection.
Limiting to 5 iterations.

This depends on the change in https://github.com/openjdk/jdk/pull/28876/files to use "-iterations=" consistently like (a few) other tests.

Tests that do some allocation and check for a collection can be unreliable.
This may also benefit from what is proposed in #28891

I'd like to get this change in though, as the test may fail more now than before.


Progress

  • Change must be properly reviewed (1 review required, with at least 1 Reviewer)
  • Change must not contain extraneous whitespace
  • Commit message must refer to an issue

Issue

  • JDK-8373642: Test vmTestbase/nsk/monitoring/GarbageCollectorMXBean/CollectionCounters/CollectionCounters003/TestDescription.java failed (Bug - P4)

Reviewers

Reviewing

Using git

Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/28923/head:pull/28923
$ git checkout pull/28923

Update a local copy of the PR:
$ git checkout pull/28923
$ git pull https://git.openjdk.org/jdk.git pull/28923/head

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 28923

View PR using the GUI difftool:
$ git pr show -t 28923

Using diff file

Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/28923.diff

Using Webrev

Link to Webrev Comment

…llectionCounters/CollectionCounters003/TestDescription.java failed
@kevinjwalls kevinjwalls marked this pull request as ready for review December 19, 2025 11:18
@bridgekeeper
Copy link

bridgekeeper bot commented Dec 19, 2025

👋 Welcome back kevinw! 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.

@openjdk
Copy link

openjdk bot commented Dec 19, 2025

@kevinjwalls 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:

8373642: Test vmTestbase/nsk/monitoring/GarbageCollectorMXBean/CollectionCounters/CollectionCounters003/TestDescription.java failed

Reviewed-by: cjplummer, syan

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 75 new commits pushed to the master branch:

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 master branch, type /integrate in a new comment.

@openjdk
Copy link

openjdk bot commented Dec 19, 2025

@kevinjwalls The following label will be automatically applied to this pull request:

  • serviceability

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 openjdk bot added the rfr Pull request is ready for review label Dec 19, 2025
@mlbridge
Copy link

mlbridge bot commented Dec 19, 2025

Webrevs

updateCounters();
validate(true);
} while (stresser.continueExecution());
Algorithms.eatMemory(stresser);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are you going to file a separate issue to use WB.fullGC()? Are there other monitoring tests that could also benefit from this?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, would like to integrate this one soon as it makes the test more reliable, my earlier change may have made it less reliable (it tests more aggressively, it never skips and likely does more iterations). Want to follow up with a survey of what other tests the Whitebox can be useful for, maybe not just this one.

@openjdk openjdk bot added the ready Pull request is ready to be integrated label Dec 23, 2025
@kevinjwalls
Copy link
Contributor Author

Just checked a new batch of 30 runs and hit one failure where it iterates 39 times and fails in vmTestbase/nsk/monitoring/GarbageCollectorMXBean/CollectionCounters/CollectionCounters002/TestDescription.java with "collectionCount not increased: 2346 -> 2346".

When 8373917 https://github.com/openjdk/jdk/pull/28876/files is integrated, the parsing of "-iterations=5" will work, which cuts down the risk of failure further.

These tests are failing in CI so this change makes it better, and should go ahead.

@kevinjwalls
Copy link
Contributor Author

Thanks Chris and Sendao!

@kevinjwalls
Copy link
Contributor Author

/integrate

@openjdk
Copy link

openjdk bot commented Dec 31, 2025

Going to push as commit a1a75ab.
Since your change was applied there have been 93 commits pushed to the master branch:

Your commit was automatically rebased without conflicts.

@openjdk openjdk bot added the integrated Pull request has been integrated label Dec 31, 2025
@openjdk openjdk bot closed this Dec 31, 2025
@openjdk openjdk bot removed ready Pull request is ready to be integrated rfr Pull request is ready for review labels Dec 31, 2025
@openjdk
Copy link

openjdk bot commented Dec 31, 2025

@kevinjwalls Pushed as commit a1a75ab.

💡 You may see a message that your pull request was closed with unmerged commits. This can be safely ignored.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

integrated Pull request has been integrated serviceability [email protected]

Development

Successfully merging this pull request may close these issues.

3 participants