On Wed, 22 Nov 2023 15:00:29 GMT, Stefan Karlsson <stef...@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

Reply via email to