-
Notifications
You must be signed in to change notification settings - Fork 6.3k
8368367: Test jdk/jfr/event/gc/detailed/TestGCHeapMemoryUsageEvent.java fails jdk.GCHeapMemoryUsage "expected 0 > 0" #27451
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
Hi all, please review this change to the TestGCHeapMemoryUsageEvent test that checks whether these kind of events are posted and contain some sensibles values. In this failure, the `used` metric for the first of two events that is checked was zero. This is because G1, the default collector, updates the `used` value only at certain synchronization points to avoid inconsistencies in other cases. One of these synchronization points is region refill. With the 30gb heap in the test environment, region size is larger than what is allocated during startup, so no region refill/synchronization point has been reached yet, and `used` turns out to be `0`. This change fixes this by checking the last event instead of the first, it must have happened after that `system.gc()` call in the test, and `used` ought to be larger than zero because of allocations during VM startup. An alternative could be limiting the test's heap size to something small, that would also help, but I thought this might need additional explanations. Testing: local runs with G1 heap region size >= 16M or so do not fail any more. Thanks, Thomas
👋 Welcome back tschatzl! A progress list of the required criteria for merging this PR into |
@tschatzl 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 14 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 |
Webrevs
|
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 fix works for me
Thanks @albertnetymk @sendaoYan @walulyai for your reviews |
Going to push as commit ed31023.
Your commit was automatically rebased without conflicts. |
Hi all,
please review this change to the TestGCHeapMemoryUsageEvent test that checks whether these kind of events are posted and contain some sensibles values.
In this failure, the
used
metric for the first of two events that is checked was zero. This is because G1, the default collector, updates theused
value only at certain synchronization points to avoid inconsistencies in other cases. One of these synchronization points is region refill. With the 30gb heap in the test environment, region size is larger than what is allocated during startup, so no region refill/synchronization point has been reached yet, andused
turns out to be0
.This change fixes this by checking the last event instead of the first, it must have happened after that
system.gc()
call in the test, andused
ought to be larger than zero because of allocations during VM startup.An alternative could be limiting the test's heap size to something small, that would also help, but I thought this might need additional explanations.
Testing: local runs with G1 heap region size >= 16M or so do not fail any more.
Thanks,
Thomas
Progress
Issue
Reviewers
Reviewing
Using
git
Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/27451/head:pull/27451
$ git checkout pull/27451
Update a local copy of the PR:
$ git checkout pull/27451
$ git pull https://git.openjdk.org/jdk.git pull/27451/head
Using Skara CLI tools
Checkout this PR locally:
$ git pr checkout 27451
View PR using the GUI difftool:
$ git pr show -t 27451
Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/27451.diff
Using Webrev
Link to Webrev Comment