RFR: 8324174: assert(m->is_entered(current)) failed: invariant
Vladimir Kozlov
kvn at openjdk.org
Mon Jan 29 17:58:41 UTC 2024
On Mon, 29 Jan 2024 04:25:36 GMT, David Holmes <dholmes at openjdk.org> wrote:
> > The unlocking was done in incorrect order starting from outermost monitor which cause this assert when we unlock following nested monitor (the same object) - it sees that it was already unlocked.
>
> Just to clarify my understanding here, when we iterate the list of monitors, the `BasicObjectLock` is different depending on whether the object is initially locked or recursively locked - is that the case?
Correct. Recursive lock has different `BasicObjectLock`:
Recursive:
frame #0: 0x0000000104241e6c libjvm.dylib`BasicObjectLock::obj(this=0x000060000218ded0) const at basicLock.hpp:72:64
Initial:
frame #0: 0x0000000104241e6c libjvm.dylib`BasicObjectLock::obj(this=0x000060000218deb0) const at basicLock.hpp:72:64
-------------
PR Comment: https://git.openjdk.org/jdk/pull/17600#issuecomment-1915269219
More information about the hotspot-dev
mailing list