runtime/cds/appcds/DumpingWithNoCoops.jtr fails at least on linux x64 and MacOS intel:
```
Test with heap args: -XX:InitialHeapSize=8g
....
----------System.err:(22/1157)----------
stdout: [[0.001s][trace][gc,heap] Minimum heap size 6815736
[0.038s][debug][cds ] Setting InitialHeapSize to 4G for CDS dumping, original size = 8192M
Error occurred during initialization of VM
Initial heap size set to a larger value than the maximum heap size
];
stderr: []
exitValue = 1
java.lang.RuntimeException: 'Setting MaxHeapSize to 4G for CDS dumping' missing from stdout/stderr
at jdk.test.lib.process.OutputAnalyzer.shouldContain(OutputAnalyzer.java:221)
at DumpingWithNoCoops.main(DumpingWithNoCoops.java:111)
at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104)
at java.base/java.lang.reflect.Method.invoke(Method.java:577)
at com.sun.javatest.regtest.agent.MainWrapper$MainThread.run(MainWrapper.java:127)
at java.base/java.lang.Thread.run(Thread.java:828)
```
Another variant of this error happens when the Dump works fine but the output is missing.
I think the test needs to explicitly set all heap sizes for the test processes, and not leave it up to the VM. Otherwise MaxHeapSize depends on whatever memory the machine has.
```
Test with heap args: -XX:InitialHeapSize=8g
....
----------System.err:(22/1157)----------
stdout: [[0.001s][trace][gc,heap] Minimum heap size 6815736
[0.038s][debug][cds ] Setting InitialHeapSize to 4G for CDS dumping, original size = 8192M
Error occurred during initialization of VM
Initial heap size set to a larger value than the maximum heap size
];
stderr: []
exitValue = 1
java.lang.RuntimeException: 'Setting MaxHeapSize to 4G for CDS dumping' missing from stdout/stderr
at jdk.test.lib.process.OutputAnalyzer.shouldContain(OutputAnalyzer.java:221)
at DumpingWithNoCoops.main(DumpingWithNoCoops.java:111)
at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104)
at java.base/java.lang.reflect.Method.invoke(Method.java:577)
at com.sun.javatest.regtest.agent.MainWrapper$MainThread.run(MainWrapper.java:127)
at java.base/java.lang.Thread.run(Thread.java:828)
```
Another variant of this error happens when the Dump works fine but the output is missing.
I think the test needs to explicitly set all heap sizes for the test processes, and not leave it up to the VM. Otherwise MaxHeapSize depends on whatever memory the machine has.
- relates to
-
JDK-8255495 Support CDS Archived Heap for uncompressed oops
-
- Resolved
-