RFR: 8369622: GlobalChunkPoolMutex needs to be recursive

Johan Sjölen jsjolen at openjdk.org
Mon Oct 13 06:21:35 UTC 2025


The GlobalChunkPoolMutex replaced ThreadCritical in [JDK-8356173](https://bugs.openjdk.org/browse/JDK-8356173). In NMT, we can unfortunately reach a recursive locking situation in situations when the VM is crashing and NMT attempts to perform a error report. I suggest that we make this particular mutex recursive, until we can resolve the design issues that causes this.

This PR also replaces the static initialization with `DeferredStatic`, and fixes the indentation of access modifiers to be consistently 0-indented.

Please note that we do not take the lock in NMT in order to allocate memory, but in order to have a "static picture" of the arena counters.

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

Commit messages:
 - Recur lock

Changes: https://git.openjdk.org/jdk/pull/27759/files
  Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=27759&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8369622
  Stats: 27 lines in 2 files changed: 22 ins; 1 del; 4 mod
  Patch: https://git.openjdk.org/jdk/pull/27759.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/27759/head:pull/27759

PR: https://git.openjdk.org/jdk/pull/27759


More information about the hotspot-runtime-dev mailing list