RFR: 8332506: SIGFPE In ObjectSynchronizer::is_async_deflation_needed() [v3]

David Holmes dholmes at openjdk.org
Tue Jan 7 06:14:47 UTC 2025


On Tue, 7 Jan 2025 05:52:02 GMT, David Holmes <dholmes at openjdk.org> wrote:

>> Rather than thinking that _"...the monitor usage has fallen below the threshold again"_ you should be thinking _"the ceiling value wasn't increased enough"_. So, to answer your question - yes that is what should be returned.
>> 
>> This has to do with the actual math behind calculating `new_ceiling` which I describe [here](https://github.com/openjdk/jdk/pull/22815#discussion_r1890907858). Even though it's definitely non-intuitive and maybe a bit disturbing, it does work in the end. So fixing that can be postponed to a later PR.
>
> Yeah well, sorry but I don't get the new math or the old math and we now seem to have a change in behaviour, the affect of which I can't gauge.

That said, after further analysis I think you are right in this change. The whole point of the NoAsyncDeflationProgressMax logic is to throttle useless deflation cycles when we exceed the ceiling but they are all in-use so there's nothing getting deflated. So to address that we increase the ceiling (by a calculation that makes no sense to me and doesn't seem to be described). As the new ceiling is normally > than the old (and at worst clamped to the same value) then the `monitor_usage` fraction will have decreased, and if that is now below the threshold then we should return false, not true, as a deflation cycle is not wanted now.

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/22815#discussion_r1904949646


More information about the hotspot-runtime-dev mailing list