RFR: 8320515: assert(monitor->object_peek() != nullptr) failed: Owned monitors should not have a dead object
David Holmes
dholmes at openjdk.org
Thu Nov 23 00:51:04 UTC 2023
On Wed, 22 Nov 2023 15:00:29 GMT, Stefan Karlsson <stefank at openjdk.org> wrote:
> Previously, the locked monitors never got unlocked because the ObjectMonitor iterator never exposed these monitors to the JNI detach code
I had not realized that. It explains some confusion in a separate issue I had been looking into! It is important that these monitors are exposed and unlocked at detach time, otherwise it also messes up the `held_monitor_count`.
> The thread dumping case doesn't tolerate ObjectMonitor with dead objects, so I'm filtering those in the closure
I think we may need to make that code tolerate the absence of an object.
> For GetOwnedMonitorInfo it is unclear if we should expose these weird ObjectMonitor.
I think we probably should expose this to be accurate, but I think this needs investigation on the JVMTI side to ensure that the null entry is tolerated okay. So a separate RFE to handle this would be fine.
Thanks
-------------
PR Comment: https://git.openjdk.org/jdk/pull/16783#issuecomment-1823702358
More information about the serviceability-dev
mailing list