RFR: 8378845: Add NoSafepointVerifier to CriticalSection classes
Thomas Schatzl
tschatzl at openjdk.org
Fri Feb 27 14:48:56 UTC 2026
Hi all,
please review this change that adds `NoSafepointVerifier`s into `GlobalCounter::CriticalSection` and `SingleWriterSynchronizer::CriticalSection` - any safepoint in a critical section of these kinds will deadlock the VM.
This relates to [JDK-8378820](https://bugs.openjdk.org/browse/JDK-8378820) that apparently shows the problem, and originally this change has been written to debug the other. However so far it did not help reproducing it, and it is worth having anyway.
Testing: gha, tier1-5 run with that change did not show an issue, around 3k runs of the failing test in JDK-8378820 without failures
Thanks,
Thomas
-------------
Commit messages:
- * preparations for review
- * nsv in critical section objects
Changes: https://git.openjdk.org/jdk/pull/29958/files
Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=29958&range=00
Issue: https://bugs.openjdk.org/browse/JDK-8378845
Stats: 9 lines in 2 files changed: 6 ins; 0 del; 3 mod
Patch: https://git.openjdk.org/jdk/pull/29958.diff
Fetch: git fetch https://git.openjdk.org/jdk.git pull/29958/head:pull/29958
PR: https://git.openjdk.org/jdk/pull/29958
More information about the hotspot-dev
mailing list