JDK-8028254 : gc/arguments/TestMinInitialErgonomics.java failed with unexpected initial heap size
  • Type: Bug
  • Component: hotspot
  • Sub-Component: gc
  • Affected Version: hs25,8,9
  • Priority: P3
  • Status: Closed
  • Resolution: Duplicate
  • Submitted: 2013-11-13
  • Updated: 2020-02-21
  • Resolved: 2014-03-19
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 9 Other
9Resolved openjdk8u212Fixed
Related Reports
Duplicate :  
Relates :  
Relates :  
Relates :  
Description
Command line: [/export/local/aurora/sandbox/sca/vmsqe/jdk/nightly/fastdebug/gc_baseline/solaris-sparcv9/bin/java -d64 -XX:+UseParallelGC -Xmx262144000 -XX:InitialHeapSize=65011712 -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -cp /export/local/aurora/sandbox/sca/vmsqe/tool/jtreg/execution/lib/javatest.jar:/export/local/aurora/sandbox/sca/vmsqe/tool/jtreg/execution/lib/jtreg.jar:/export/local/aurora/sandbox/results/workDir/classes/gc/arguments:/export/local/aurora/sandbox/sca/vmsqe/testbase/jtreg/nightly/gc_baseline/JT_HS/test/gc/arguments:/export/local/aurora/sandbox/results/workDir/classes/testlibrary:/export/local/aurora/sandbox/sca/vmsqe/jdk/nightly/fastdebug/gc_baseline/solaris-sparcv9/lib/tools.jar ErgoArgsPrinter ]

----------System.err:(15/1097)----------
java.lang.RuntimeException: Actual initial heap size of 67108864 differs from expected initial heap size of 65011712
	at TestMaxHeapSizeTools.checkErgonomics(TestMaxHeapSizeTools.java:227)
	at TestMaxHeapSizeTools.checkMinInitialErgonomics(TestMaxHeapSizeTools.java:71)
	at TestMinInitialErgonomics.main(TestMinInitialErgonomics.java:42)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:483)
	at com.sun.javatest.regtest.MainWrapper$MainThread.run(MainWrapper.java:94)
	at java.lang.Thread.run(Thread.java:744)
Comments
Fix Request Backporting this fix avoids false positive failure in 8u. Patch does not apply cleanly, minor conflicts need to be resolved. See 8u RFR here: https://mail.openjdk.java.net/pipermail/jdk8u-dev/2019-February/008708.html
26-02-2019

Release team: Approved for deferral.
06-12-2013

SQE approves deferral.
03-12-2013

8-defer-justification: This is a bug in the test, not in the VM code. The VM code has been updated, and is working as expected, but the test has not been updated. This has no impact on the released product.
03-12-2013

ILW => MMH =>P3 Impact: Medium, test fails and might hide other problems. Likelihood: Medium, happens for certain machines with the "wrong" amount of memory. Workaround: High, no workaround we want to run the test.
13-11-2013

I think the bug is in 215 public static void checkErgonomics(...): 221 if ((expectedMin != -1) && (align_up(expectedMin, v.minAlignment) != v.minHeapSize)) { 222 throw new RuntimeException("Actual minimum heap size of " + v.minHeapSize + 223 " differs from expected minimum heap size of " + expectedMin); 224 } 225 226 if ((expectedInitial != -1) && (align_up(expectedInitial, v.minAlignment) != v.initialHeapSize)) { 227 throw new RuntimeException("Actual initial heap size of " + v.initialHeapSize + 228 " differs from expected initial heap size of " + expectedInitial); 229 } The code in line 221 and 226 do some alignment, but against v.minAlignment. It should be v.maxAlignment. Also I think the "minAlignment" and "maxAlignment" variable names should be synched up with the names used in the collector policy, e.g. spaceAlignment and heapAlignment.
13-11-2013

I looked at the test and it needs some hardening. The values tested for min,initial and max heap size are calculated using NewSize and OldSize which are retrieved by parsing the output from: java -XX:+PrintFlagsFinal -version The value for OldSize will differ depending on how much memory the system has and there is no guarantee that the calculated values will be aligned with regards to the heap alignment. If they are not the test will fail since the values will be aligned up to meet the alignment requirement. We should be able to fix the test by aligning the values correctly before using them.
13-11-2013

http://surl.us.oracle.com/TestMinInitialErgonomics-131106 RULE gc/arguments/TestMinInitialErgonomics.java Exception java.lang.RuntimeException: Actual initial heap size of ... differs from expected initial heap size of ...
13-11-2013