JDK-8180622 : gc/stress/gclocker/TestGCLockerWithParallel.java: fails with OOME Java heap space
  • Type: Bug
  • Component: hotspot
  • Sub-Component: gc
  • Affected Version: 10,14,15
  • Priority: P3
  • Status: Closed
  • Resolution: Duplicate
  • Submitted: 2017-05-18
  • Updated: 2024-01-09
  • Resolved: 2024-01-09
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
22Resolved
Related Reports
Blocks :  
Duplicate :  
Duplicate :  
Relates :  
Relates :  
Description
gc/stress/gclocker/TestGCLockerWithParallel.java: fails with OOME Java heap space
Failures seen on Linux hosts only so far. 

[26.760s][info][gc,start       ] GC(145) Pause Full (Ergonomics)
[26.760s][info][gc,phases,start] GC(145) Marking Phase
[26.844s][info][gc,phases      ] GC(145) Marking Phase 83.443ms
[26.844s][info][gc,phases,start] GC(145) Summary Phase
[26.844s][info][gc,phases      ] GC(145) Summary Phase 0.041ms
[26.844s][info][gc,phases,start] GC(145) Adjust Roots
[26.844s][info][gc,phases      ] GC(145) Adjust Roots 0.545ms
[26.844s][info][gc,phases,start] GC(145) Compaction Phase
[26.893s][info][gc,phases      ] GC(145) Compaction Phase 48.097ms
[26.893s][info][gc,phases,start] GC(145) Post Compact
[26.902s][info][gc,phases      ] GC(145) Post Compact 9.361ms
[26.902s][info][gc,heap        ] GC(145) PSYoungGen: 170105K->170105K(341504K)
[26.902s][info][gc,heap        ] GC(145) ParOldGen: 1023941K->1023932K(1024000K)
[26.902s][info][gc,metaspace   ] GC(145) Metaspace: 6972K->6972K(1056768K)
[26.902s][info][gc             ] GC(145) Pause Full (Ergonomics) 1166M->1166M(1333M) 141.718ms
[26.902s][info][gc,cpu         ] GC(145) User=2.30s Sys=0.00s Real=0.14s
[26.913s][info][gc,heap,exit   ] Heap
[26.913s][info][gc,heap,exit   ]  PSYoungGen      total 341504K, used 171008K [0x00000000e0c00000, 0x0000000100000000, 0x0000000100000000)
[26.913s][info][gc,heap,exit   ]   eden space 171008K, 100% used [0x00000000e0c00000,0x00000000eb300000,0x00000000eb300000)
[26.913s][info][gc,heap,exit   ]     lgrp 0 space 75760K, 100% used [0x00000000e0c00000,0x00000000e55fc000,0x00000000e55fc000)
[26.913s][info][gc,heap,exit   ]     lgrp 1 space 95248K, 100% used [0x00000000e55fc000,0x00000000eb300000,0x00000000eb300000)
[26.913s][info][gc,heap,exit   ]   from space 170496K, 0% used [0x00000000f5980000,0x00000000f5980000,0x0000000100000000)
[26.913s][info][gc,heap,exit   ]   to   space 170496K, 0% used [0x00000000eb300000,0x00000000eb300000,0x00000000f5980000)
[26.913s][info][gc,heap,exit   ]  ParOldGen       total 1024000K, used 1023932K [0x00000000a2400000, 0x00000000e0c00000, 0x00000000e0c00000)
[26.913s][info][gc,heap,exit   ]   object space 1024000K, 99% used [0x00000000a2400000,0x00000000e0bef118,0x00000000e0c00000)
[26.913s][info][gc,heap,exit   ]  Metaspace       used 7199K, capacity 7476K, committed 7680K, reserved 1056768K
[26.913s][info][gc,heap,exit   ]   class space    used 658K, capacity 734K, committed 768K, reserved 1048576K
----------System.err:(6/303)----------
java.lang.OutOfMemoryError: Java heap space
	at Filler.<init>(TestGCLocker.java:50)
	at MemoryUser.load(TestGCLocker.java:150)
	at MemoryUser.run(TestGCLocker.java:164)
	at java.base/java.lang.Thread.run(Thread.java:844)
STATUS:Failed.`main' threw exception: java.lang.OutOfMemoryError: Java heap space
Comments
Unquarantine gc/stress/gclocker/TestGCLockerWithParallel/G1 after resolving this issue
10-01-2018

This test can't be made to run even with SoftReferences due to JDK-8192647 I think. I will file a new bug to ProblemList it.
09-01-2018

Still being seen in CI. Shouldn't this be ProblemListed?
20-12-2017

Some additional info. I've looked at improving the test by using SoftReferences to hold the Filler-objects. This should avoid getting OOMEs, because the SoftReferences should be cleared before throwing the OOME. There might be a problem here since I've seen OOMEs even with this solution, it might be that for Parallel the GCLocker triggered full gc will not clear SoftReferences. In G1 this would also be a problem prior to the fix for JDK-8137099.
12-12-2017

This is a test bug: the problem is that the only memory consumer thread waits at least 500ms until it releases memory. This may be too long, i.e. there may be more than the allowed number of gclocker induced garbage collections during this time. This is why the test fails.
29-11-2017