RFR: 8369622: GlobalChunkPoolMutex is recursively locked during error handling

Paul Hübner phubner at openjdk.org
Tue Oct 21 11:23:20 UTC 2025


On Fri, 17 Oct 2025 17:04:58 GMT, Coleen Phillimore <coleenp at openjdk.org> wrote:

> This change disables recursive locking for the ChunkPoolLocker during error handling for NMT callers.  The patch is written by Johan as an alternative to supporting another recursive locker for this lock.
> Tested with tier1-4, tier5 on aarch64 (product and debug).

src/hotspot/share/memory/arena.cpp line 52:

> 50:     GlobalChunkPoolMutex->lock();
> 51:     _locked = true;
> 52:   } else {

Possible enhancement: explicitly check for `Try` and then `ShouldNotReachHere` in the else case. I'm not sure if this is necessary for a bandaid fix like this, though.

src/hotspot/share/memory/arena.hpp line 41:

> 39: 
> 40: class ChunkPoolLocker : public StackObj {
> 41: public:

Nitpick FYI: I think the new `public` has a different indentation than the old one. Just wanted to point it out, is this something that should be addressed? I do not have an opinion on the topic.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/27869#discussion_r2447748968
PR Review Comment: https://git.openjdk.org/jdk/pull/27869#discussion_r2447764293


More information about the hotspot-runtime-dev mailing list