Integrated: 8369250: Assess and remedy any unsafe usage of the Semaphore used by NonJavaThread::List
David Holmes
dholmes at openjdk.org
Wed Oct 8 20:31:40 UTC 2025
On Tue, 7 Oct 2025 06:13:51 GMT, David Holmes <dholmes at openjdk.org> wrote:
> The `NonJavaThread::List` has a statically allocated instance which contains a `SingleWriterSynchronizer`, which contains a `Semaphore`. The `VMThread` can try to remove itself from the list after the static destructors have executed, leading to an assertion failure for the `Semaphore` but potentially it could crash as the `List` itself gets deallocated.. Simplest fix is to change the `List` instance to a `DeferredStatic` such that it is never destroyed.
>
> Testing:
> - tiers 1-3 (sanity)
>
> Thanks.
This pull request has now been integrated.
Changeset: 4d0da18a
Author: David Holmes <dholmes at openjdk.org>
URL: https://git.openjdk.org/jdk/commit/4d0da18ab6e83549e81074e15011cf8a4fbd4ea9
Stats: 25 lines in 3 files changed: 13 ins; 1 del; 11 mod
8369250: Assess and remedy any unsafe usage of the Semaphore used by NonJavaThread::List
Reviewed-by: kbarrett, stefank
-------------
PR: https://git.openjdk.org/jdk/pull/27664
More information about the hotspot-runtime-dev
mailing list