RFR: 8345266: java/util/concurrent/locks/StampedLock/OOMEInStampedLock.java JTREG_TEST_THREAD_FACTORY=Virtual fails with OOME [v3]
Patricio Chilano Mateo
pchilanomate at openjdk.org
Wed Dec 18 00:16:58 UTC 2024
On Tue, 17 Dec 2024 21:31:03 GMT, Coleen Phillimore <coleenp at openjdk.org> wrote:
>> Patricio Chilano Mateo has updated the pull request incrementally with one additional commit since the last revision:
>>
>> Improve comments
>
> src/hotspot/share/runtime/continuation.cpp line 165:
>
>> 163:
>> 164: if (target->has_pending_exception()) {
>> 165: assert(res == freeze_exception, "");
>
> Can you add an assert string as additional documentation, something like "expecting an exception result from freeze";
Added.
> src/hotspot/share/runtime/continuation.cpp line 167:
>
>> 165: assert(res == freeze_exception, "");
>> 166: // We don't want to throw exceptions, especially when returning
>> 167: // from monitorenter since the compiler does not expect one.
>
> And add that ignoring the exception will propagate the failure and pin the virtual thread. Thanks for adding the comment for why this is okay.
Added.
> test/jdk/java/lang/Thread/virtual/MonitorOOM.java line 85:
>
>> 83: }
>> 84:
>> 85: private static Object[] fillHeap() {
>
> I'm surprised we don't have a helper class for eating memory, but I don't see one except in vmTestbase eatMemory which is more complicated for what you want here.
I copied it from OOMEInStampedLock.java, the original failing test.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/22780#discussion_r1889405090
PR Review Comment: https://git.openjdk.org/jdk/pull/22780#discussion_r1889405353
PR Review Comment: https://git.openjdk.org/jdk/pull/22780#discussion_r1889405825
More information about the hotspot-runtime-dev
mailing list