JDK-8241009 : CommandLineFlagComboNegative.java fails after JDK-8240563
  • Type: Bug
  • Component: hotspot
  • Sub-Component: runtime
  • Affected Version: 15
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • OS: windows
  • CPU: x86_64
  • Submitted: 2020-03-13
  • Updated: 2020-04-07
  • Resolved: 2020-03-20
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 15
15 b16Fixed
Related Reports
Relates :  
Description
The following test failed in the JDK15 CI:

runtime/cds/appcds/CommandLineFlagComboNegative.java

Here's a snippet from the log file:

----------System.err:(29/1873)----------
 stdout: [[0.050s][info][cds] Archive was created with UseCompressedOops = 0, UseCompressedClassPointers = 0
[0.050s][info][cds] Mapped static  region #0 at base 0x0000000800000000 top 0x0000000800010000 (MiscCode)
[0.050s][info][cds] Mapped static  region #1 at base 0x0000000800010000 top 0x0000000800450000 (ReadWrite)
[0.050s][info][cds] Mapped static  region #2 at base 0x0000000800450000 top 0x0000000800b70000 (ReadOnly)
Hello World
];
 stderr: [java version "15-ea" 2020-09-15
Java(TM) SE Runtime Environment (fastdebug build 15-ea+15-573)
Java HotSpot(TM) 64-Bit Server VM (fastdebug build 15-ea+15-573, compiled mode, sharing)
]
 exitValue = 0

java.lang.RuntimeException: 'The saved state of UseCompressedOops and UseCompressedClassPointers is different from runtime, CDS will be disabled.' missing from stdout/stderr 

	at jdk.test.lib.process.OutputAnalyzer.shouldContain(OutputAnalyzer.java:187)
	at CommandLineFlagComboNegative.lambda$runTests$0(CommandLineFlagComboNegative.java:95)
	at jdk.test.lib.cds.CDSTestUtils$Result.assertAbnormalExit(CDSTestUtils.java:151)
	at CommandLineFlagComboNegative.runTests(CommandLineFlagComboNegative.java:94)
	at CommandLineFlagComboNegative.main(CommandLineFlagComboNegative.java:104)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:564)
	at com.sun.javatest.regtest.agent.MainActionHelper$AgentVMRunnable.run(MainActionHelper.java:298)
	at java.base/java.lang.Thread.run(Thread.java:832)

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

result: Failed. Execution failed: `main' threw exception: java.lang.RuntimeException: 'The saved state of UseCompressedOops and UseCompressedClassPointers is different from runtime, CDS will be disabled.' missing from stdout/stderr

This failure happens after the following is pushed

    JDK-8240563 [TESTBUG] WB_IsCDSIncludedInVmBuild should support uncompressed oops/klasses

The fix for JDK-8240563 was pushed in the jdk-15+15-571 CI job set.
This failure happened in the jdk-15+15-573-tier7 CI job set.

======

This test fails in tier-7 where open/test/hotspot/jtreg:hotspot_runtime is executed with the following jtreg option:

-J-Dtest.java.opts='-Xcomp -XX:+CreateCoredumpOnCrash -ea -esa -XX:CompileThreshold=100 -XX:+UnlockExperimentalVMOptions -server -XX:+TieredCompilation -XX:-UseCompressedOops'

Before JDK-8240563, this test was not executed because of @require vm.cds, and  vm.cds was false when -XX:-UseCompressedOops is specified in test.java.opts.

After JDK-8240563, we no longer set vm.cds to false when XX:-UseCompressedOops is specified in test.java.opts (in order to increase test coverage for CDS).




Comments
URL: https://hg.openjdk.java.net/jdk/jdk/rev/5bfe8544c794 User: minqi Date: 2020-03-20 16:40:44 +0000
20-03-2020

ILW = MLM = P4
17-03-2020

Apparently the -XX:-UseCompressedOops flag confuses the logic in the test. Suggested fix is: if (Platform.is64bit()) { WhiteBox wb = WhiteBox.getWhiteBox(); if (wb.getBooleanVMFlag("UseCompressedOops") == false || wb.getBooleanVMFlag("UseCompressedClassPointers") { throw new jtreg.SkippedException(); } }
16-03-2020

[~minqi] - Can you take a look at this bug? It's showing up in the JDK15 CI a bit...
13-03-2020