JDK-8322987 : Remove gc/stress/gclocker/TestGCLocker* since they always fail with OOME
  • Type: Bug
  • Component: hotspot
  • Sub-Component: gc
  • Affected Version: 22
  • Priority: P1
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2024-01-04
  • Updated: 2024-01-23
  • Resolved: 2024-01-10
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 22 JDK 23
22Fixed 23 b05Fixed
Related Reports
Duplicate :  
Relates :  
Description
Test
gc/stress/gclocker/TestGCLockerWithG1.java: fails with OOME Java heap space
Test failed on macosx-aarch64 so far.
Lof finishes with:
[19.694s][info][gc,phases      ] GC(420)   Other: 0.03ms
[19.694s][info][gc,heap        ] GC(420) Eden regions: 1->0(0)
[19.694s][info][gc,heap        ] GC(420) Survivor regions: 0->0(0)
[19.694s][info][gc,heap        ] GC(420) Old regions: 677->678
[19.694s][info][gc,heap        ] GC(420) Humongous regions: 826->826
[19.694s][info][gc,metaspace   ] GC(420) Metaspace: 2922K(3136K)->2922K(3136K) NonClass: 2832K(2944K)->2832K(2944K) Class: 90K(192K)->90K(192K)
[19.694s][info][gc             ] GC(420) Pause Young (Normal) (G1 Evacuation Pause) (Evacuation Failure: Allocation) 1495M->1495M(1504M) 0.675ms
[19.694s][info][gc,cpu         ] GC(420) User=0.01s Sys=0.00s Real=0.00s
[19.694s][info][gc,ergo        ] Attempting full compaction
[19.694s][info][gc,start       ] GC(421) Pause Full (G1 Compaction Pause)
[19.694s][info][gc,task        ] GC(421) Using 8 workers of 8 for full compaction
[19.694s][info][gc,phases,start] GC(421) Phase 1: Mark live objects
[19.748s][info][gc,phases      ] GC(421) Phase 1: Mark live objects 54.063ms
[19.748s][info][gc,phases,start] GC(421) Phase 2: Prepare compaction
[19.749s][info][gc,phases      ] GC(421) Phase 2: Prepare compaction 0.935ms
[19.749s][info][gc,phases,start] GC(421) Phase 3: Adjust pointers
[19.775s][info][gc,phases      ] GC(421) Phase 3: Adjust pointers 25.924ms
[19.775s][info][gc,phases,start] GC(421) Phase 4: Compact heap
[19.776s][info][gc,phases      ] GC(421) Phase 4: Compact heap 0.894ms
[19.776s][info][gc,phases,start] GC(421) Phase 5: Reset Metadata
[19.786s][info][gc,phases      ] GC(421) Phase 5: Reset Metadata 10.064ms
[19.797s][info][gc,heap        ] GC(421) Eden regions: 0->0(0)
[19.797s][info][gc,heap        ] GC(421) Survivor regions: 0->0(0)
[19.797s][info][gc,heap        ] GC(421) Old regions: 678->678
[19.797s][info][gc,heap        ] GC(421) Humongous regions: 826->826
[19.797s][info][gc,metaspace   ] GC(421) Metaspace: 2922K(3136K)->2922K(3136K) NonClass: 2832K(2944K)->2832K(2944K) Class: 90K(192K)->90K(192K)
[19.797s][info][gc             ] GC(421) Pause Full (G1 Compaction Pause) 1495M->1495M(1504M) 102.645ms
[19.797s][info][gc,cpu         ] GC(421) User=0.54s Sys=0.00s Real=0.10s
[19.797s][info][gc,ergo        ] Attempting maximal full compaction clearing soft references
[19.797s][info][gc,start       ] GC(422) Pause Full (G1 Compaction Pause)
[19.797s][info][gc,task        ] GC(422) Using 8 workers of 8 for full compaction
[19.797s][info][gc,phases,start] GC(422) Phase 1: Mark live objects
[19.862s][info][gc,phases      ] GC(422) Phase 1: Mark live objects 64.986ms
[19.862s][info][gc,phases,start] GC(422) Phase 2: Prepare compaction
[19.879s][info][gc,phases      ] GC(422) Phase 2: Prepare compaction 16.833ms
[19.879s][info][gc,phases,start] GC(422) Phase 3: Adjust pointers
[19.911s][info][gc,phases      ] GC(422) Phase 3: Adjust pointers 31.854ms
[19.911s][info][gc,phases,start] GC(422) Phase 4: Compact heap
[19.925s][info][gc,phases      ] GC(422) Phase 4: Compact heap 14.576ms
[19.925s][info][gc,phases,start] GC(422) Phase 5: Reset Metadata
[19.925s][info][gc,phases      ] GC(422) Phase 5: Reset Metadata 0.251ms
[19.936s][info][gc,heap        ] GC(422) Eden regions: 0->0(0)
[19.936s][info][gc,heap        ] GC(422) Survivor regions: 0->0(0)
[19.936s][info][gc,heap        ] GC(422) Old regions: 678->678
[19.936s][info][gc,heap        ] GC(422) Humongous regions: 826->826
[19.936s][info][gc,metaspace   ] GC(422) Metaspace: 2922K(3136K)->2922K(3136K) NonClass: 2832K(2944K)->2832K(2944K) Class: 90K(192K)->90K(192K)
[19.936s][info][gc             ] GC(422) Pause Full (G1 Compaction Pause) 1495M->1495M(1504M) 139.448ms
[19.936s][info][gc,cpu         ] GC(422) User=0.74s Sys=0.01s Real=0.14s
[19.936s][info][gc,start       ] GC(423) Pause Young (Concurrent Start) (G1 Evacuation Pause)
[19.936s][info][gc,task        ] GC(423) Using 8 workers of 8 for evacuation
[19.937s][info][gc,phases      ] GC(423)   Pre Evacuate Collection Set: 0.24ms
[19.937s][info][gc,phases      ] GC(423)   Merge Heap Roots: 0.06ms
[19.937s][info][gc,phases      ] GC(423)   Evacuate Collection Set: 0.13ms
[19.937s][info][gc,phases      ] GC(423)   Post Evacuate Collection Set: 0.12ms
[19.937s][info][gc,phases      ] GC(423)   Other: 0.07ms
[19.937s][info][gc,heap        ] GC(423) Eden regions: 0->0(0)
[19.937s][info][gc,heap        ] GC(423) Survivor regions: 0->0(0)
[19.937s][info][gc,heap        ] GC(423) Old regions: 678->678
[19.937s][info][gc,heap        ] GC(423) Humongous regions: 826->826
[19.937s][info][gc,metaspace   ] GC(423) Metaspace: 2922K(3136K)->2922K(3136K) NonClass: 2832K(2944K)->2832K(2944K) Class: 90K(192K)->90K(192K)
[19.937s][info][gc             ] GC(423) Pause Young (Concurrent Start) (G1 Evacuation Pause) 1495M->1495M(1504M) 0.712ms
[19.937s][info][gc,cpu         ] GC(423) User=0.00s Sys=0.00s Real=0.00s
[19.937s][info][gc,ergo        ] Attempting full compaction
[19.937s][info][gc             ] GC(424) Concurrent Mark Cycle
[19.937s][info][gc,marking     ] GC(424) Concurrent Scan Root Regions
[19.937s][info][gc,marking     ] GC(424) Concurrent Scan Root Regions 0.030ms
[19.937s][info][gc,marking     ] GC(424) Concurrent Mark
[19.937s][info][gc,marking     ] GC(424) Concurrent Mark From Roots
[19.937s][info][gc,task        ] GC(424) Using 2 workers of 2 for marking
[19.937s][info][gc,start       ] GC(425) Pause Full (G1 Compaction Pause)
[19.937s][info][gc,task        ] GC(425) Using 8 workers of 8 for full compaction
[19.938s][info][gc,phases,start] GC(425) Phase 1: Mark live objects
[19.985s][info][gc,phases      ] GC(425) Phase 1: Mark live objects 47.220ms
[19.985s][info][gc,phases,start] GC(425) Phase 2: Prepare compaction
[19.986s][info][gc,phases      ] GC(425) Phase 2: Prepare compaction 0.901ms
[19.986s][info][gc,phases,start] GC(425) Phase 3: Adjust pointers
[20.009s][info][gc,phases      ] GC(425) Phase 3: Adjust pointers 23.251ms
[20.009s][info][gc,phases,start] GC(425) Phase 4: Compact heap
[20.010s][info][gc,phases      ] GC(425) Phase 4: Compact heap 0.819ms
[20.010s][info][gc,phases,start] GC(425) Phase 5: Reset Metadata
[20.020s][info][gc,phases      ] GC(425) Phase 5: Reset Metadata 9.745ms
[20.031s][info][gc,heap        ] GC(425) Eden regions: 0->0(0)
[20.031s][info][gc,heap        ] GC(425) Survivor regions: 0->0(0)
[20.031s][info][gc,heap        ] GC(425) Old regions: 678->678
[20.031s][info][gc,heap        ] GC(425) Humongous regions: 826->826
[20.031s][info][gc,metaspace   ] GC(425) Metaspace: 2922K(3136K)->2922K(3136K) NonClass: 2832K(2944K)->2832K(2944K) Class: 90K(192K)->90K(192K)
[20.031s][info][gc             ] GC(425) Pause Full (G1 Compaction Pause) 1495M->1495M(1504M) 93.533ms
[20.031s][info][gc,cpu         ] GC(425) User=0.59s Sys=0.01s Real=0.09s
[20.031s][info][gc,ergo        ] Attempting maximal full compaction clearing soft references
[20.031s][info][gc,start       ] GC(426) Pause Full (G1 Compaction Pause)
[20.031s][info][gc,task        ] GC(426) Using 8 workers of 8 for full compaction
[20.031s][info][gc,phases,start] GC(426) Phase 1: Mark live objects
[20.088s][info][gc,phases      ] GC(426) Phase 1: Mark live objects 56.759ms
[20.088s][info][gc,phases,start] GC(426) Phase 2: Prepare compaction
[20.106s][info][gc,phases      ] GC(426) Phase 2: Prepare compaction 17.660ms
[20.106s][info][gc,phases,start] GC(426) Phase 3: Adjust pointers
[20.140s][info][gc,phases      ] GC(426) Phase 3: Adjust pointers 34.526ms
[20.140s][info][gc,phases,start] GC(426) Phase 4: Compact heap
[20.156s][info][gc,phases      ] GC(426) Phase 4: Compact heap 15.970ms
[20.156s][info][gc,phases,start] GC(426) Phase 5: Reset Metadata
[20.157s][info][gc,phases      ] GC(426) Phase 5: Reset Metadata 0.358ms
[20.168s][info][gc,heap        ] GC(426) Eden regions: 0->0(0)
[20.168s][info][gc,heap        ] GC(426) Survivor regions: 0->0(0)
[20.168s][info][gc,heap        ] GC(426) Old regions: 678->678
[20.168s][info][gc,heap        ] GC(426) Humongous regions: 826->826
[20.168s][info][gc,metaspace   ] GC(426) Metaspace: 2922K(3136K)->2922K(3136K) NonClass: 2832K(2944K)->2832K(2944K) Class: 90K(192K)->90K(192K)
[20.168s][info][gc             ] GC(426) Pause Full (G1 Compaction Pause) 1495M->1495M(1504M) 137.066ms
[20.168s][info][gc,cpu         ] GC(426) User=0.70s Sys=0.00s Real=0.14s
[20.168s][info][gc,marking     ] GC(424) Concurrent Mark From Roots 230.655ms
[20.168s][info][gc,marking     ] GC(424) Concurrent Mark Abort
[20.168s][info][gc             ] GC(424) Concurrent Mark Cycle 230.721ms
[20.170s][info][gc,start       ] GC(427) Pause Young (Normal) (G1 Evacuation Pause)
[20.170s][info][gc,task        ] GC(427) Using 8 workers of 8 for evacuation
[20.171s][info][gc,phases      ] GC(427)   Pre Evacuate Collection Set: 0.15ms
[20.171s][info][gc,phases      ] GC(427)   Merge Heap Roots: 0.04ms
[20.171s][info][gc,phases      ] GC(427)   Evacuate Collection Set: 0.12ms
[20.171s][info][gc,phases      ] GC(427)   Post Evacuate Collection Set: 0.12ms
[20.171s][info][gc,phases      ] GC(427)   Other: 0.03ms
[20.171s][info][gc,heap        ] GC(427) Eden regions: 0->0(0)
[20.171s][info][gc,heap        ] GC(427) Survivor regions: 0->0(0)
[20.171s][info][gc,heap        ] GC(427) Old regions: 678->678
[20.171s][info][gc,heap        ] GC(427) Humongous regions: 826->826
[20.171s][info][gc,metaspace   ] GC(427) Metaspace: 2924K(3136K)->2924K(3136K) NonClass: 2833K(2944K)->2833K(2944K) Class: 90K(192K)->90K(192K)
[20.171s][info][gc             ] GC(427) Pause Young (Normal) (G1 Evacuation Pause) 1495M->1495M(1504M) 0.516ms
[20.171s][info][gc,cpu         ] GC(427) User=0.01s Sys=0.00s Real=0.00s
[20.171s][info][gc,ergo        ] Attempting full compaction
[20.171s][info][gc,start       ] GC(428) Pause Full (G1 Compaction Pause)
[20.171s][info][gc,task        ] GC(428) Using 8 workers of 8 for full compaction
[20.171s][info][gc,phases,start] GC(428) Phase 1: Mark live objects
[20.225s][info][gc,phases      ] GC(428) Phase 1: Mark live objects 54.276ms
[20.225s][info][gc,phases,start] GC(428) Phase 2: Prepare compaction
[20.226s][info][gc,phases      ] GC(428) Phase 2: Prepare compaction 0.518ms
[20.226s][info][gc,phases,start] GC(428) Phase 3: Adjust pointers
[20.253s][info][gc,phases      ] GC(428) Phase 3: Adjust pointers 26.902ms
[20.253s][info][gc,phases,start] GC(428) Phase 4: Compact heap
[20.253s][info][gc,phases      ] GC(428) Phase 4: Compact heap 0.401ms
[20.253s][info][gc,phases,start] GC(428) Phase 5: Reset Metadata
[20.264s][info][gc,phases      ] GC(428) Phase 5: Reset Metadata 11.196ms
[20.275s][info][gc,heap        ] GC(428) Eden regions: 0->0(3)
[20.275s][info][gc,heap        ] GC(428) Survivor regions: 0->0(0)
[20.275s][info][gc,heap        ] GC(428) Old regions: 678->677
[20.275s][info][gc,heap        ] GC(428) Humongous regions: 826->824
[20.275s][info][gc,metaspace   ] GC(428) Metaspace: 2924K(3136K)->2924K(3136K) NonClass: 2833K(2944K)->2833K(2944K) Class: 90K(192K)->90K(192K)
[20.275s][info][gc             ] GC(428) Pause Full (G1 Compaction Pause) 1495M->1492M(1504M) 104.302ms
[20.275s][info][gc,cpu         ] GC(428) User=0.55s Sys=0.01s Real=0.11s
[20.737s][info][gc,heap,exit   ] Heap
[20.737s][info][gc,heap,exit   ]  garbage-first heap   total reserved 1540096K, committed 1540096K, used 1528430K [0x00000007a2000000, 0x0000000800000000)
[20.737s][info][gc,heap,exit   ]   region size 1024K, 1 young (1024K), 0 survivors (0K)
[20.737s][info][gc,heap,exit   ]  Metaspace       used 3233K, committed 3392K, reserved 1114112K
[20.737s][info][gc,heap,exit   ]   class space    used 104K, committed 192K, reserved 1048576K
----------System.err:(7/418)----------
java.lang.OutOfMemoryError: Java heap space
	at gc.stress.gclocker.Filler.<init>(TestGCLocker.java:60)
	at gc.stress.gclocker.MemoryUser.load(TestGCLocker.java:152)
	at gc.stress.gclocker.MemoryUser.run(TestGCLocker.java:166)
	at java.base/java.lang.Thread.runWith(Thread.java:1583)
	at java.base/java.lang.Thread.run(Thread.java:1570)
STATUS:Failed.`main' threw exception: java.lang.OutOfMemoryError: Java heap space
Comments
I closed the original backport PR and created a new one with the fix included to avoid inconsistencies.
10-01-2024

A pull request was submitted for review. URL: https://git.openjdk.org/jdk22/pull/54 Date: 2024-01-10 14:55:00 +0000
10-01-2024

A pull request was submitted for review. URL: https://git.openjdk.org/jdk22/pull/50 Date: 2024-01-10 10:39:34 +0000
10-01-2024

Changeset: 40861761 Author: Thomas Schatzl <tschatzl@openjdk.org> Date: 2024-01-10 09:57:16 +0000 URL: https://git.openjdk.org/jdk/commit/40861761c2b0bb5ae548afc4752dc7cee3bf506a
10-01-2024

Do not backport this yet as it has caused an issue with TEST.groups due to the Shenandoah file.
10-01-2024

Going to remove the obsolete and ever-problemlisted gc/stress/TestGCLocker* tests. The test tries to verify JNI by filling the heap, causing GCs, but always OOME'ing because the parameters to tune this behavior are too hard to get right for every case and every collector. GCLocker functionality is already being tested with other tests like gc/TestJNICriticalStressTest, gc/cslocker/TestCSLocker, vmTestbase/gc/lock/*, other tests that incidentally use JNI and collector specific JNI tests (e.g. gc/g1/pinnedObjs/*). Fwiw, the test also fails when replacing the JNI code by equivalent Java code i.e. not causing gclocker gcs. Given all this I think removing these tests is just fine.
09-01-2024

A pull request was submitted for review. URL: https://git.openjdk.org/jdk/pull/17322 Date: 2024-01-09 09:56:03 +0000
09-01-2024

The test also fails with an OOME (in release builds) without using the gclocker.
08-01-2024

Fwiw, the TestGCLockerWithG1.java test has been unproblemlisted with JDK-8318706 (for G1 only - these TestGCLocker* tests are still problemlisted for all other GCs) because I thought that the problem has actually been the gclocker (and with it gone...), and not some other problem with the test.
08-01-2024

Possibly a regression caused by JEP 423. JEP 423 implementation (JDK-8318706) is in 22b26, these failures are in 22b27.
04-01-2024

4 failures on 4 different machines (all macosx-aarch64) during ATR for 22. Not sure what difference (if any) there is among them. Two in tier7, one tier8, one tier10.
04-01-2024