RFR: 8336846: assert(state->get_thread() == jt) failed: handshake unsafe conditions

Serguei Spitsyn sspitsyn at openjdk.org
Thu Aug 1 04:14:57 UTC 2024


The JVMTI Watch Field functions do not disable VTMS transitions with the `JvmtiVTMSTransitionDisabler`:
- `SetFieldAccessWatch()`
- `ClearFieldAccessWatch()`
- `SetFieldModificationWatch()`
- `ClearFieldModificationWatch()`
 so in the `recompute_enabled()` we could see that a vthread is mounted, but in the `EnterInterpOnlyModeClosure` handshake the thread could have been unmounted already. This is a root cause of failures with this assert.
 
The fix is to disable transitions in the `JvmtiEventControllerPrivate::change_field_watch()` function.

Testing:
- TBD: submit mach5 tiers 1-6

-------------

Commit messages:
 - 8336846: assert(state->get_thread() == jt) failed: handshake unsafe conditions

Changes: https://git.openjdk.org/jdk/pull/20413/files
  Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=20413&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8336846
  Stats: 3 lines in 1 file changed: 2 ins; 0 del; 1 mod
  Patch: https://git.openjdk.org/jdk/pull/20413.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/20413/head:pull/20413

PR: https://git.openjdk.org/jdk/pull/20413


More information about the serviceability-dev mailing list