-
Notifications
You must be signed in to change notification settings - Fork 5.7k
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
8336911: ZGC: Division by zero in heuristics after JDK-8332717 #21304
Conversation
👋 Welcome back mbaesken! A progress list of the required criteria for merging this PR into |
@MBaesken 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 208 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.
I do not think infinity
is the solution here. There are more problems with the heuristics when no young collection has reclaimed any memory.
I added a comment about this in an earlier PR (JDK-8339648 / #20888) #20888 (comment).
I proposed a solution to this specific issue that makes more sense to me, and avoid the NaN issues here. But will have to talk it over.
Regardless I think we need to do an overhaul of this code to handle the extreme case of no GC having reclaimed any memory.
Also this must have been an issue before JDK-8332717 as well?
Co-authored-by: Axel Boldt-Christmas <[email protected]>
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.
I think in the end I'd like to sanitize the input data to all these calculations to have less zeros and hence divisions by zero. But we can do that as a separate cleanup. This change looks good to me.
Thanks for the reviews ! /integrate |
Going to push as commit 1cc3223.
Your commit was automatically rebased without conflicts. |
When running with ubsan enabled binaries, the following issue is reported,
e.g. in test
compiler/uncommontrap/TestDeoptOOM_ZGenerational.jtr
also in gc/z/TestSmallHeap.jtr
The division by 0 leads to 'infinity' on most of our platforms. So instead of relying on this behavior, we can add a small check and set 'infinity' for divisor == 0.
Progress
Issue
Reviewers
Reviewing
Using
git
Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/21304/head:pull/21304
$ git checkout pull/21304
Update a local copy of the PR:
$ git checkout pull/21304
$ git pull https://git.openjdk.org/jdk.git pull/21304/head
Using Skara CLI tools
Checkout this PR locally:
$ git pr checkout 21304
View PR using the GUI difftool:
$ git pr show -t 21304
Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/21304.diff
Webrev
Link to Webrev Comment