RFR: 8369622: GlobalChunkPoolMutex needs to be recursive [v3]
Johan Sjölen
jsjolen at openjdk.org
Fri Oct 17 08:35:03 UTC 2025
On Thu, 16 Oct 2025 13:21:41 GMT, Johan Sjölen <jsjolen at openjdk.org> wrote:
>> 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.
>
> Johan Sjölen has updated the pull request incrementally with one additional commit since the last revision:
>
> Revert access modifier style
Here's a sketch of Stefan's suggestion, maybe we should go for that instead? I'm vacationing for 2 weeks, so if someone can take over the PR then that'd be highly appreciated.
https://github.com/jdksjolen/jdk/commit/80f58d3979b8d9e99a4caeb21935edbcbff4c7ac
-------------
PR Comment: https://git.openjdk.org/jdk/pull/27759#issuecomment-3414425419
More information about the hotspot-runtime-dev
mailing list