RFR: 8378845: Add NoSafepointVerifier to CriticalSection classes

David Holmes dholmes at openjdk.org
Mon Mar 2 02:42:21 UTC 2026


On Fri, 27 Feb 2026 14:40:47 GMT, Thomas Schatzl <tschatzl at openjdk.org> wrote:

> 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

Seems reasonable. Thanks

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

Marked as reviewed by dholmes (Reviewer).

PR Review: https://git.openjdk.org/jdk/pull/29958#pullrequestreview-3873817826


More information about the hotspot-dev mailing list