RFR: 8345266: java/util/concurrent/locks/StampedLock/OOMEInStampedLock.java JTREG_TEST_THREAD_FACTORY=Virtual fails with OOME

David Holmes dholmes at openjdk.org
Tue Dec 17 04:28:35 UTC 2024


On Tue, 17 Dec 2024 04:17:34 GMT, Patricio Chilano Mateo <pchilanomate at openjdk.org> wrote:

>> test/jdk/java/lang/Thread/virtual/MonitorOOM.java line 66:
>> 
>>> 64:                         if (testWait) {
>>> 65:                             lock.wait(5);
>>> 66:                         }
>> 
>> If you have filled the heap won't you always get the OOME on the monitor enter?
>
> Yes, both monitor enter and later Object.wait will fail to unmount due to OOM, so we will just pin to the carrier.

Ah - sorry  I was misunderstanding the role of the catch block here and forgetting that the whole point is that the OOM doesn't lead to OOME being thrown by the monitor enter, so we will continue to do the wait().

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

PR Review Comment: https://git.openjdk.org/jdk/pull/22780#discussion_r1887876825


More information about the hotspot-runtime-dev mailing list