RFR: 8371990: Remove two second delayed OOME after GC shutdown [v3]
Albert Mingkun Yang
ayang at openjdk.org
Tue Nov 18 13:00:12 UTC 2025
On Tue, 18 Nov 2025 12:43:25 GMT, Stefan Karlsson <stefank at openjdk.org> wrote:
>> It also has the side-effect that it releases the Heap_lock and moves the thread into the blocked state. If we don't release the lock then we will not be able to complete the shutdown sequence, which acquires the Heap_lock before the exit VM operation (or shutting down the VM thread).
>
> I've pushed a comment stating the above. Maybe that helps explaining why Heap_lock->wait() is called.
> It also has the side-effect that it releases the Heap_lock ...
Yes. My msg was probably unclear; I meant to suggest using sth like:
Heap_lock->unlock();
{
Semaphore always_blocked_sema{0};
always_blocked_sema.wait(); // never return
}
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/28349#discussion_r2538103942
More information about the hotspot-gc-dev
mailing list