Skip to content

Conversation

@kevinjwalls
Copy link
Contributor

@kevinjwalls kevinjwalls commented Dec 10, 2025

This test has a number of issues, described in the note below.


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-8370731: Tests in vmTestbase/nsk/monitoring/GarbageCollectorMXBean/CollectionCounters/ failed: OutOfMemoryError (Bug - P4)

Reviewers

Reviewing

Using git

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

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

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 28747

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

Using diff file

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

Using Webrev

Link to Webrev Comment

@bridgekeeper
Copy link

bridgekeeper bot commented Dec 10, 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 10, 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:

8370731: Tests in vmTestbase/nsk/monitoring/GarbageCollectorMXBean/CollectionCounters/ failed: OutOfMemoryError

Reviewed-by: sspitsyn

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 6 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 openjdk bot changed the title 8370731: Tests in vmTestbase/nsk/monitoring/GarbageCollectorMXBean/CollectionCounters/ failed: OutOfMemoryError 8370731: Tests in vmTestbase/nsk/monitoring/GarbageCollectorMXBean/CollectionCounters/ failed: OutOfMemoryError Dec 10, 2025
@openjdk
Copy link

openjdk bot commented Dec 10, 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.

@kevinjwalls
Copy link
Contributor Author

kevinjwalls commented Dec 10, 2025

(1)
OOM has been showing up in testing occasionally, possibly forever.
Eventually got a failure due to OOM, took many runs.
It's G1 hitting "GC Overhead Limit exceeded too often (5)".

Should set UseGCOverheadLimit false as this is something of a stress test.

Verbose log shows:
[10.495s][info][gc] GC Overhead Limit exceeded too often (5).
----------System.err:(6/249)----------
java.lang.OutOfMemoryError: Java heap space

(2)
-XX:+DisableExplicitGC would break this test, as noted in its comment, so do not permit running with that option.

(3)
It can be too mysterious when tests print nothing about their work, unless they fail. Are they even doing the work?
This test often (sometimes?) is not:
It eats memory, then does its validation only if stresser.continueExecution() is true. This can be false and skip any testing.

So fix that with a do/while loop to ensure we validate at least once.

(4)
Then it failed immediately: nsk.share.TestFailure: collectionCount not increased: 62 -> 62
It does not cope with iterations of the loop around the validation.

The only thing in validateNonTrivial() compared to the other validate() method, is ensuring collection count does increase, and this fails.
It needs to do the eat memory or invoke gc before checking that, so put eatMemory() inside the loop.

@kevinjwalls kevinjwalls marked this pull request as ready for review December 10, 2025 14:42
@openjdk openjdk bot added the rfr Pull request is ready for review label Dec 10, 2025
@mlbridge
Copy link

mlbridge bot commented Dec 10, 2025

Webrevs

@kevinjwalls kevinjwalls changed the title 8370731: Tests in vmTestbase/nsk/monitoring/GarbageCollectorMXBean/CollectionCounters/ failed: OutOfMemoryError 8370731: Tests in vmTestbase/nsk/monitoring/GarbageCollectorMXBean/CollectionCounters/ failed: OutOfMemoryError Dec 10, 2025
Copy link
Contributor

@sspitsyn sspitsyn left a comment

Choose a reason for hiding this comment

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

Looks okay.

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

Thanks Serguei!

@kevinjwalls
Copy link
Contributor Author

/integrate

@openjdk
Copy link

openjdk bot commented Dec 11, 2025

Going to push as commit 920a99f.
Since your change was applied there have been 8 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 11, 2025
@openjdk openjdk bot closed this Dec 11, 2025
@openjdk openjdk bot removed ready Pull request is ready to be integrated rfr Pull request is ready for review labels Dec 11, 2025
@openjdk
Copy link

openjdk bot commented Dec 11, 2025

@kevinjwalls Pushed as commit 920a99f.

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

2 participants