On Tue, 26 Sep 2023 04:25:40 GMT, Roman Kennke <rken...@openjdk.org> wrote:
>> ...although that is a pretty small window and we are seeing this bug quite a >> lot. Seems if the code in question was the issue, it would take 1000s of >> iterations to reproduce. > > Ok, so we are not (usually) at a safepoint, but no threads are moving. But > the snapshot can not be taken atomically. Which means that the > anonymous-state in the ObjectMonitor and the state of the lock-stack are not > necessarily consistent, not even if we swap the popping and owner-update, > right? This is what you mean by inconsistent state, right? Or is there a way > to get an atomic snapshot of threads *and* monitors? > > So yeah, we could print a warning when that happens. > > However, even that problem would be pre-existing (monitors not agreeing with > each other or with threads), and do we currently print a warning about it? @rkennke the "snapshot" is atomic - the target VM is suspended. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/15907#discussion_r1336621849