RFR: 8373837: "assert(thread->is_VM_thread() || thread->is_Java_thread()) failed: Must be VMThread or JavaThread" on macosx-aarch64-26

Coleen Phillimore coleenp at openjdk.org
Thu Dec 18 23:39:32 UTC 2025


On Thu, 18 Dec 2025 01:09:24 GMT, David Holmes <dholmes at openjdk.org> wrote:

> 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 reached 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't** be executing destructors yet. See JBS for gory details.
> 
> EDIT: s/can/can't/
> 
> Testing: tiers 1-3 (sanity)
> 
> Thanks

This is a small window for a race.  The fix looks reasonable.

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

Marked as reviewed by coleenp (Reviewer).

PR Review: https://git.openjdk.org/jdk/pull/28883#pullrequestreview-3595688984


More information about the hotspot-runtime-dev mailing list