RFR: 8316401: sun/tools/jhsdb/JStackStressTest.java failed with "InternalError: We should have found a thread that owns the anonymous lock"
David Holmes
dholmes at openjdk.org
Tue Sep 26 04:55:11 UTC 2023
On Tue, 26 Sep 2023 04:25:40 GMT, Roman Kennke <rkennke at 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
More information about the serviceability-dev
mailing list