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

Fredrik Bredberg fbredberg at openjdk.org
Thu Dec 18 15:36:26 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

Looks good to me.

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

Marked as reviewed by fbredberg (Reviewer).

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


More information about the hotspot-runtime-dev mailing list