RFR: 8369622: GlobalChunkPoolMutex is recursively locked during error handling [v2]

David Holmes dholmes at openjdk.org
Wed Oct 22 07:56:06 UTC 2025


On Mon, 20 Oct 2025 12:23:07 GMT, Coleen Phillimore <coleenp at openjdk.org> wrote:

>> src/hotspot/share/nmt/mallocTracker.cpp line 71:
>> 
>>> 69:   if (VMError::is_error_reported() && VMError::is_error_reported_in_current_thread()) {
>>> 70:     ls = ChunkPoolLocker::LockStrategy::Try;
>>> 71:   }
>> 
>> Thinking more, we could simply always do this check in the constructor and do away with the "strategy" flag altogether. Arguably this would be reasonable behaviour for every Mutexlocker (though it may slow things down a little).
>
> I had a version that did this but Johan was worried about global behavior so wanted to limit it to just NMT reporting on error to be safe.

Okay. Worth having a discussion whether all "lockers" should adopt this error reporting behaviour.

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

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


More information about the hotspot-runtime-dev mailing list