-
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
8332506: SIGFPE In ObjectSynchronizer::is_async_deflation_needed() #22815
8332506: SIGFPE In ObjectSynchronizer::is_async_deflation_needed() #22815
Conversation
👋 Welcome back fbredberg! A progress list of the required criteria for merging this PR into |
@fbredber 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 87 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 have question about the math. This is a good find and the change looks reasonable to fix the problem. Maybe we can use this change and investigate further improvements later, but I'd like to know what you think about this first.
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 walked through the math and this looks good. This solves both problems of the ceiling being incremented too often and the overflow problem because of the first problem.
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 remain concerned that this both addresses the potential overflow, and also changes related logic about the ceiling/threshold in a way that I do not understand. It would help if there was a clear definition of what the "ceiling" means and how it relates to list->max()
and list->count()
.
Mailing list message from David Holmes on hotspot-runtime-dev: FYI for the mailing list records, this comment was deleted in the PR. David On 7/01/2025 10:56 am, David Holmes wrote: |
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.
Okay, I think I grok the changes now.
Thanks for your patience.
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 like the new comment and the other new comments in this patch.
Thanks for the review. |
Going to push as commit cbabc04.
Your commit was automatically rebased without conflicts. |
/backport :jdk24 |
@fbredber the backport was successfully created on the branch backport-fbredber-cbabc045-jdk24 in my personal fork of openjdk/jdk. To create a pull request with this backport targeting openjdk/jdk:jdk24, just click the following link: The title of the pull request is automatically filled in correctly and below you find a suggestion for the pull request body:
If you need to update the source branch of the pull then run the following commands in a local clone of your personal fork of openjdk/jdk:
|
This PR solves a division by zero problem, that according to the bug report happened in
ObjectSynchronizer::is_async_deflation_needed()
. As it turns out it really happened in the inlinedmonitors_used_above_threshold()
function. The problematic line looked like this:size_t monitor_usage = (monitors_used * 100LL) / ceiling;
Unfortunately the
ceiling
value was increased every time there where too many deflations without any progress. This whould eventually lead to an overflow in theceiling
value, and in unlucky circumstances, it would become zero. Thus causing a division by zero crash.This PR makes sure not to increase the
ceiling
value ifmonitor_usage
is below theMonitorUsedDeflationThreshold
.It also makes sure the ceiling value is never zero, and does not wrap around.
Tested okay in tier1-5 and
test/hotspot/jtreg/runtime/Monitor/MonitorUsedDeflationThresholdTest.java
Progress
Issue
Reviewers
Reviewing
Using
git
Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/22815/head:pull/22815
$ git checkout pull/22815
Update a local copy of the PR:
$ git checkout pull/22815
$ git pull https://git.openjdk.org/jdk.git pull/22815/head
Using Skara CLI tools
Checkout this PR locally:
$ git pr checkout 22815
View PR using the GUI difftool:
$ git pr show -t 22815
Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/22815.diff
Using Webrev
Link to Webrev Comment