RFR: 8282651: ZGC: vmTestbase/gc/ArrayJuggle/ tests fails intermittently with exit code 97
Leonid Mesnik
lmesnik at openjdk.org
Tue Jul 26 18:25:50 UTC 2022
On Tue, 26 Jul 2022 16:18:30 GMT, Ramkumar Sunderbabu <rsunderbabu at openjdk.org> wrote:
> Fixing JuggleTests for OOME.
> The JuggleTests continuously allocate memory and juggle them in various array positions. Over the course of allocation, heap might be fully filled, esp in high memory strategy. The test doesn't take into account OOME and run under the assumption that any freed memory would be immediately GCed. Immediate GC under memory stress is not guaranteed. Hence it is better to explicitly call WhiteBox API to do the job.
Changes requested by lmesnik (Reviewer).
test/hotspot/jtreg/vmTestbase/gc/ArrayJuggle/Juggle01/Juggle01.java line 62:
> 60: try {
> 61: array[index] = garbageProducer.create(objectSize);
> 62: } catch (OutOfMemoryError e) {
OOME is thrown only when GC is unable to free enough memory. The test doesn't fill the whole heap and doesn't expect OOME.
I think it is better to add -Xlog:gc=debug:gc.log, -XX:+HeapDumpOnOutOfMemoryError and might be -XX:+CrashOnOutOfMemoryError. to get more information about heap state when OOME happens
Also, you could just reduce memory load by huge arrays
-------------
PR: https://git.openjdk.org/jdk/pull/9645
More information about the hotspot-gc-dev
mailing list