RFR: 8373837: "assert(thread->is_VM_thread() || thread->is_Java_thread()) failed: Must be VMThread or JavaThread" on macosx-aarch64-26
David Holmes
dholmes at openjdk.org
Thu Dec 18 01:16:14 UTC 2025
If the SR signal is delivered late, there is a small window where the JavaThread destructor has run (and so the referenced assert will fail), but the Thread destructor has not yet reach the point where `is_terminated` returns true, and so we proceed to the assertion, that then fails. The simple fix is to move the assertion into the branch for an active suspension request, which guarantees we can be executing destructors yet. See JBS for gory details.
Testing: tiers 1-3 (sanity)
Thanks
-------------
Commit messages:
- 8373837: "assert(thread->is_VM_thread() || thread->is_Java_thread()) failed: Must be VMThread or JavaThread" on macosx-aarch64-26
Changes: https://git.openjdk.org/jdk/pull/28883/files
Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=28883&range=00
Issue: https://bugs.openjdk.org/browse/JDK-8373837
Stats: 11 lines in 1 file changed: 5 ins; 5 del; 1 mod
Patch: https://git.openjdk.org/jdk/pull/28883.diff
Fetch: git fetch https://git.openjdk.org/jdk.git pull/28883/head:pull/28883
PR: https://git.openjdk.org/jdk/pull/28883
More information about the hotspot-runtime-dev
mailing list