JDK-8335577 : runtime/cds/appcds/TestParallelGCWithCDS.java still fails with JNI error
  • Type: Bug
  • Component: hotspot
  • Sub-Component: runtime
  • Affected Version: 24
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2024-07-02
  • Updated: 2024-09-02
  • Resolved: 2024-08-26
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 24
24 b13Fixed
Related Reports
Relates :  
Description
 stderr: [java version "24-ea" 2025-03-18
Java(TM) SE Runtime Environment (fastdebug build 24-ea+5-446)
Java HotSpot(TM) 64-Bit Server VM (fastdebug build 24-ea+5-446, compiled mode, sharing)
Error: A JNI error has occurred, please check your installation and try again
Exception in thread "main" ]
 exitValue = 1

java.lang.RuntimeException: '((Too small maximum heap)|(GC triggered before VM initialization completed)|(java.lang.OutOfMemoryError: Java heap space)|(Initial heap size set to a larger value than the maximum heap size))' missing from stdout/stderr
	at jdk.test.lib.process.OutputAnalyzer.shouldMatch(OutputAnalyzer.java:371)
	at TestParallelGCWithCDS.test(TestParallelGCWithCDS.java:121)
	at TestParallelGCWithCDS.main(TestParallelGCWithCDS.java:57)
	at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103)
	at java.base/java.lang.reflect.Method.invoke(Method.java:580)
	at com.sun.javatest.regtest.agent.MainActionHelper$AgentVMRunnable.run(MainActionHelper.java:333)
	at java.base/java.lang.Thread.run(Thread.java:1575)
Comments
Changeset: a827ff05 Branch: master Author: Calvin Cheung <ccheung@openjdk.org> Date: 2024-08-26 21:26:12 +0000 URL: https://git.openjdk.org/jdk/commit/a827ff05dba0c9b7c74d83053a35c8041c1ac5cc
26-08-2024

A pull request was submitted for review. Branch: master URL: https://git.openjdk.org/jdk/pull/20700 Date: 2024-08-24 04:59:39 +0000
24-08-2024

The test expects to see some OOM conditions when extremely small heaps are used. The purpose to to make sure no crash or fatal error happen, and the VM exits in an orderly fashion. I think the test should check for two additional patterns to make it more robust Error: A JNI error has occurred, please check your installation and try again java.lang.OutOfMemoryError
20-08-2024

This one got a little further: Error: A JNI error has occurred, please check your installation and try again Exception in thread "main" java.lang.OutOfMemoryError: GC overhead limit exceeded ] Basically, as is typical with OOM tests, we are either getting secondary OOM's that prevent the expected reporting of the initial one; or getting the initial OOM sooner than expected.
14-07-2024