JDK-8336674 : [lworld] ciReplay tests sometime fail when running with --enable-preview
  • Type: Bug
  • Component: hotspot
  • Sub-Component: compiler
  • Affected Version: repo-valhalla
  • Priority: P4
  • Status: Closed
  • Resolution: Duplicate
  • Submitted: 2024-07-17
  • Updated: 2024-08-15
  • Resolved: 2024-08-15
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
repo-valhallaResolved
Related Reports
Duplicate :  
Description
When running tests in test/hotspot/jtreg/compiler/ciReplay with --enable-preview, some tests fail. Failures are not 100% reproducible, but those tests reliably pass when -enable-preview is not used.

Example of failed run:

==============================
Test summary
==============================
   TEST                                              TOTAL  PASS  FAIL ERROR
>> jtreg:open/test/hotspot/jtreg/compiler/ciReplay      10     7     3     0 <<
==============================

Failed tests:

# newfailures.txt
compiler/ciReplay/TestInlining.java
compiler/ciReplay/TestLambdas.java
compiler/ciReplay/TestServerVM.java

Stack trace from TestServerVM.java:

java.lang.RuntimeException: Unexpected exit code for positive case: [-XX:TieredStopAtLevel=1]: expected 1 to equal 0
	at jdk.test.lib.Asserts.fail(Asserts.java:634)
	at jdk.test.lib.Asserts.assertEquals(Asserts.java:205)
	at jdk.test.lib.Asserts.assertEQ(Asserts.java:178)
	at compiler.ciReplay.CiReplayBase.positiveTest(CiReplayBase.java:271)
	at compiler.ciReplay.VMBase.testAction(VMBase.java:52)
	at compiler.ciReplay.CiReplayBase.runTest(CiReplayBase.java:131)
	at compiler.ciReplay.VMBase.main(VMBase.java:33)
	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.MainWrapper$MainTask.run(MainWrapper.java:138)
	at java.base/java.lang.Thread.run(Thread.java:1575)


Comments
This is a duplicate of mainline bug JDK-8316526 because '--enable-preview' used to disable CDS: Java(TM) SE Runtime Environment (fastdebug build 23-lworld5ea-2024-07-15-1824107.frederic.parain.valhalla) Java HotSpot(TM) 64-Bit Server VM (fastdebug build 23-lworld5ea-2024-07-15-1824107.frederic.parain.valhalla, mixed mode) With more recent builds of Valhalla, CDS is enabled even with '--enable-preview'.
15-08-2024