JDK-8311214 : [REDO] JDK-8047998 Abort the vm if MaxNewSize is not the same as NewSize when MaxHeapSize is the same as InitialHeapSize
  • Type: Enhancement
  • Component: hotspot
  • Sub-Component: gc
  • Affected Version: 22
  • Priority: P4
  • Status: Open
  • Resolution: Unresolved
  • Submitted: 2023-07-01
  • Updated: 2024-03-29
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.
Other
tbdUnresolved
Related Reports
Relates :  
Relates :  
Relates :  
Sub Tasks
JDK-8311215 :  
Description
Two tests are failing many times in Tier2 after JDK-8047998:

  10 gc/arguments/TestNewSizeFlags.java
  10 gc/arguments/TestVerifyBeforeAndAfterGCFlags.java

so 20 failures per Tier2.

Three tests are failing many times in Tier3 after JDK-8047998:

   4 compiler/runtime/Test8010927.java
   6 jdk/jfr/event/gc/detailed/TestPromotionFailedEventWithDefNew.java
   6 jdk/jfr/event/gc/detailed/TestPromotionFailedEventWithParallelScavenge.java

so 16 failures per Tier3.

The failures look like:

----------System.err:(18/994)----------
 stdout: [Error occurred during initialization of VM
The MaxNewSize must be the same as NewSize because the MaxHeapSize and InitialHeapSize are the same.
];
 stderr: []
 exitValue = 1

java.lang.RuntimeException: Expected to get exit value of [0], exit value is: [1]
	at jdk.test.lib.process.OutputAnalyzer.shouldHaveExitValue(OutputAnalyzer.java:490)
	at gc.arguments.TestVerifyBeforeAndAfterGCFlags.testVerifyFlags(TestVerifyBeforeAndAfterGCFlags.java:105)
	at gc.arguments.TestVerifyBeforeAndAfterGCFlags.main(TestVerifyBeforeAndAfterGCFlags.java:69)
	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:1570)

JavaTest Message: Test threw exception: java.lang.RuntimeException
JavaTest Message: shutting down test

result: Failed. Execution failed: `main' threw exception: java.lang.RuntimeException: Expected to get exit value of [0], exit value is: [1]
Comments
There are a total of 133 sightings in the Mach5 CI in Tier[235678]. Here's the distribution of tests: $ sort /tmp/8311214.fail.list | uniq -c 14 compiler/runtime/Test8010927.java 33 gc/arguments/TestNewSizeFlags.java 32 gc/arguments/TestVerifyBeforeAndAfterGCFlags.java 27 jdk/jfr/event/gc/detailed/TestPromotionFailedEventWithDefNew.java 27 jdk/jfr/event/gc/detailed/TestPromotionFailedEventWithParallelScavenge.java The different test tasks in the various tiers likely use different options. Please contact folks on Oracle's GC team to have them investigate the tier task definitions for executing these tests. [~ayang] was one of the reviewers of the original PR and should be able to help investigate the options that are used when running these tests.
17-07-2023

Now that: JDK-8311215 [BACKOUT] JDK-8047998 Abort the vm if MaxNewSize is not the same as NewSize when MaxHeapSize is the same as InitialHeapSize has been integrated, this bug morphs into: JDK-8311214 [REDO] JDK-8047998 Abort the vm if MaxNewSize is not the same as NewSize when MaxHeapSize is the same as InitialHeapSize and its priority changes from P2 -> P4 to match the original. Please make sure that this fix is run thru Mach5 Tier2 and Tier3 testing before integrating this work again. Update: At this point failures have also been spotted in Tier[5678].
17-07-2023

> I can't open the links you provided. It looks like an oracle's inner website. Sorry about that. It was supposed to be a confidential comment due to the Oracle internal links.
17-07-2023

Among the five tests, only two tests can be reproduced locally. Shown below. ``` jdk/jfr/event/gc/detailed/TestPromotionFailedEventWithDefNew.java jdk/jfr/event/gc/detailed/TestPromotionFailedEventWithParallelScavenge.java ``` And other three tests don't seem to have the related problem, because the default GC is G1 which is not related to this issue. The original JDK-8047998 only influence the Serial and Parallel GC. Did you add the GC arguments `-XX:+UseSerialGC` or `-XX:+UseParallelGC` when running the tests?
09-07-2023

[~dcubed] I can't open the links you provided. It looks like an oracle's inner website. Could you provide the related logs about it. And, did other tests fail excepting the following five tests? ``` compiler/runtime/Test8010927.java jdk/jfr/event/gc/detailed/TestPromotionFailedEventWithDefNew.java jdk/jfr/event/gc/detailed/TestPromotionFailedEventWithParallelScavenge.java gc/arguments/TestNewSizeFlags.java gc/arguments/TestVerifyBeforeAndAfterGCFlags.java ```
09-07-2023

Thanks for reminding me. I will do more investigation on it.
04-07-2023

[~gli] - Looks like your fix for: JDK-8047998 Abort the vm if MaxNewSize is not the same as NewSize when MaxHeapSize is the same as InitialHeapSize is causing a lot of test failures in Mach5 Tier[23], so far...
01-07-2023