JDK-8274033 : Some tier-4 CDS EpsilonGC tests throw OOM
  • Type: Bug
  • Component: hotspot
  • Sub-Component: runtime
  • Affected Version: 18
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • OS: os_x
  • CPU: x86_64
  • Submitted: 2021-09-21
  • Updated: 2021-09-30
  • Resolved: 2021-09-23
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 18
18 b17Fixed
Related Reports
Relates :  
Relates :  
Description
The following two tests failed in the JDK18 CI:

runtime/cds/appcds/methodHandles/MethodHandlesSpreadArgumentsTest.java
runtime/cds/appcds/methodHandles/MethodHandlesAsCollectorTest.java

Here's a snippet from the MethodHandlesSpreadArgumentsTest.java
log file:

----------System.err:(76/5001)----------
 stdout: [[0.016s][warning][gc,init] Consider setting -Xms equal to -Xmx to avoid resizing hiccups
[0.016s][warning][gc,init] Consider enabling -XX:+AlwaysPreTouch to avoid memory commit hiccups
class test.java.lang.invoke.MethodHandlesSpreadArgumentsTest
     annotation: @org.junit.Test(timeout=0L, expected=org.junit.Test$None.class)
    invoking method: testSpreadArguments
Terminating due to java.lang.OutOfMemoryError: Java heap space
];
 stderr: []
 exitValue = 3


Here's a snippet from the MethodHandlesAsCollectorTest.java
log file:

----------System.err:(76/4973)----------
 stdout: [[0.019s][warning][gc,init] Consider setting -Xms equal to -Xmx to avoid resizing hiccups
[0.019s][warning][gc,init] Consider enabling -XX:+AlwaysPreTouch to avoid memory commit hiccups
class test.java.lang.invoke.MethodHandlesAsCollectorTest
     annotation: @org.junit.Test(timeout=0L, expected=org.junit.Test$None.class)
    invoking method: testAsCollector
Terminating due to java.lang.OutOfMemoryError: Java heap space
];
 stderr: []
 exitValue = 3
Comments
Changeset: 0fbbe4c9 Author: Ioi Lam <iklam@openjdk.org> Date: 2021-09-23 03:49:06 +0000 URL: https://git.openjdk.java.net/jdk/commit/0fbbe4c9a779c24d5502648c866b7f1e1e50acc0
23-09-2021

Both the failing tests have -XX:+UseEpsilonGC
21-09-2021

These tests were executed in Oracle tier-4 with EpsilonGC to test for JDK-8270489 (Support archived heap objects in EpsilonGC). The problem is EpsilonGC doesn't support garbage collection, so the test would run out on memory when running on a host with limited RAM. To address this, we should limit the testing of CDS+EpsilonGC to a small set of tests that are known to use very small amount of memory.
21-09-2021

The tests were run with the following VM options: -Dtest.java.opts=-Dtest.cds.runtime.options=-XX:+UnlockExperimentalVMOptions,-XX:+UseEpsilonGC Running CDS tests with EpsilonGC was added via JDK-8270489: Support archived heap objects in EpsilonGC
21-09-2021