RFR: 8318757: VM_ThreadDump asserts in interleaved ObjectMonitor::deflate_monitor calls [v2]
Stefan Karlsson
stefank at openjdk.org
Fri Nov 10 08:19:33 UTC 2023
On Thu, 9 Nov 2023 08:25:58 GMT, Aleksey Shipilev <shade at openjdk.org> wrote:
>> There are a few options how to move forward with this:
>>
>> 1. Stop triggering deflation from the thread dumping code
>> 2. Only trigger if we pass a given limit, say 100000.
>> 3. Always trigger monitor deflation
>>
>> I believe that long-term it would be best for the JVM if we went with (1). I added (2) just to counter some potential arguments that having too many monitors in the system will make the thread dumping take a long time. It is not clear to me at all that people will notice this, and if they do then maybe we need to tweak the monitor deflation heuristics instead. (3) seems excessive to me.
>>
>> I've added the flag AsyncMonitorDeflationForThreadDumpLimit. The long name hints that this flag is in support of something overly specific. I set the default to SIZE_MAX in my support for (1), and hope that we can release-note that we have stopped performing monitor deflation from thread dumping and that this flag is going to be good enough safeguard if there are applications that rely on the monitor deflation for thread dumping. But if reviewers disagree with this, I'm OK with changing the default value to support either (2) or (3).
>>
>> Could I get a all the reviewer's here to (re)state the preference on this, included their suggested limit
>>
>> I'm also OK with changing the name of the flag if you have a better name, and changing it to an experimental flag if that makes more sense.
>
> I would prefer (3), and then consider changing to (1) in a separate PR. This would match current behavior well, and thus would not make more things beyond fixing the interleaving trouble; would eliminate the need to have another flag that would be only temporary until (1) is here; would trigger (pun intended) more discussion about deflation policy once we do (1) -> (3).
I didn't get much more feedback on this, so I went with Aleksey's suggestion and ripped out the flag and the ability to set a limit. The code now always requests monitor deflation.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/16519#discussion_r1389056205
More information about the hotspot-dev
mailing list