RFR (S) 8231249: Shenandoah: GC retries are too aggressive for tests that expect OOME

Aleksey Shipilev shade at redhat.com
Mon Sep 23 12:14:56 UTC 2019


This readily reproduces with vmTestbase_nsk_jvmti. Some tests (notably
vmTestbase/nsk/jvmti/GarbageCollectionStart/gcstart001) are filling up the memory until OOME
happens, and even count the OOMEs happened. Unfortunately, that clashes with Shenandoah's quite
aggressive retry policy. At some point, test is able to sneak past allocation failure and make
progress, and less aggressive policy helps that.


Since Degenerated GC would dive into Full GC on low progress, we can just trust the flag for
retries. We also need to poll the flag after at least one attempt at handling the alloc failure
(thus entering degen-full sequence). This makes retry logic less aggressive, which saves us from
test timeouts.

Testing: vmTestbase_nsk_jvmti; hotspot_gc_shenandoah


More information about the hotspot-gc-dev mailing list