JDK-8285965 : TestScenarios.java does not check for "" correctly
  • Type: Bug
  • Component: hotspot
  • Sub-Component: compiler
  • Affected Version: 17,19
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2022-04-30
  • Updated: 2022-11-11
  • Resolved: 2022-06-08
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 17 JDK 19
17.0.7-oracleFixed 19 b26Fixed
Related Reports
Relates :  
Description
The following test failed in the JDK19 CI:

testlibrary_tests/ir_framework/tests/TestScenarios.java

Here's a snippet from the log file:

The following scenarios have failed: #1

Scenario #1
===========
Scenario flags: [-XX:TLABRefillWasteFraction=51]

Command Line:
c:\\ade\\mesos\\work_dir\\jib-master\\install\\jdk-19+21-1420\\windows-x64-debug.jdk\\jdk-19\\fastdebug\\bin\\java.exe -DReproduce=true -cp T:\\testoutput\\test-support\\jtreg_open_test_hotspot_jtreg_hotspot_misc\\classes\\3\\testlibrary_tests\\ir_framework\\tests\\TestScenarios.d;C:\\ade\\mesos\\work_dir\\jib-master\\install\\jdk-19+21-1420\\src.full\\open\\test\\hotspot\\jtreg\\testlibrary_tests\\ir_framework\\tests;T:\\testoutput\\test-support\\jtreg_open_test_hotspot_jtreg_hotspot_misc\\classes\\3\\test\\lib;T:\\testoutput\\test-support\\jtreg_open_test_hotspot_jtreg_hotspot_misc\\classes\\3\\testlibrary_tests;T:\\testoutput\\test-support\\jtreg_open_test_hotspot_jtreg_hotspot_misc\\classes\\3;C:\\ade\\mesos\\work_dir\\jib-master\\install\\jtreg\\6.1\\1\\bundles\\jtreg-6.1+1.zip\\jtreg\\lib\\javatest.jar;C:\\ade\\mesos\\work_dir\\jib-master\\install\\jtreg\\6.1\\1\\bundles\\jtreg-6.1+1.zip\\jtreg\\lib\\jtreg.jar;C:\\ade\\mesos\\work_dir\\jib-master\\install\\jtreg\\6.1\\1\\bundles\\jtreg-6.1+1.zip\\jtreg\\lib\\junit.jar;C:\\ade\\mesos\\work_dir\\jib-master\\install\\jtreg\\6.1\\1\\bundles\\jtreg-6.1+1.zip\\jtreg\\lib\\hamcrest.jar;C:\\ade\\mesos\\work_dir\\jib-master\\install\\jtreg\\6.1\\1\\bundles\\jtreg-6.1+1.zip\\jtreg\\lib\\testng.jar;C:\\ade\\mesos\\work_dir\\jib-master\\install\\jtreg\\6.1\\1\\bundles\\jtreg-6.1+1.zip\\jtreg\\lib\\jcommander.jar;C:\\ade\\mesos\\work_dir\\jib-master\\install\\jtreg\\6.1\\1\\bundles\\jtreg-6.1+1.zip\\jtreg\\lib\\guice.jar -Djava.library.path=c:\\ade\\mesos\\work_dir\\jib-master\\install\\jdk-19+21-1420\\windows-x64-debug.test\\hotspot\\jtreg\\native -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -XX:MaxRAMPercentage=4.16667 -Djava.io.tmpdir=t:\\testoutput\\test-support\\jtreg_open_test_hotspot_jtreg_hotspot_misc\\tmp -Dir.framework.server.port=53528 -XX:TLABRefillWasteFraction=51 -XX:+PrintCompilation -XX:+UnlockDiagnosticVMOptions -XX:+LogCompilation -XX:CompileCommand=log,ir_framework.tests.TestScenarios::* -XX:CompileCommand=option,ir_framework.tests.TestScenarios::*,bool,PrintIdeal,true -XX:CompileCommand=option,ir_framework.tests.TestScenarios::*,bool,PrintOptoAssembly,true -XX:-OmitStackTraceInFastThrow -DShouldDoIRVerification=true -XX:-BackgroundCompilation -XX:CompileCommand=quiet compiler.lib.ir_framework.test.TestVM ir_framework.tests.TestScenarios

One or more @IR rules failed:

Failed IR Rules (1) of Methods (1)
----------------------------------
1) Method "public void ir_framework.tests.TestScenarios.failS3()" - [Failed IR rules: 1]:
   * @IR rule 1: "@compiler.lib.ir_framework.IR(applyIfAnd={}, applyIf={"TLABRefillWasteFraction", "51"}, failOn={}, applyIfOr={}, counts={"(\\\\d+(\\\\s){2}(Call.*Java.*)+(\\\\s){2}===.*)", "1"}, applyIfNot={})"
     - counts: Graph contains wrong number of nodes:
       * Regex 1: (\\d+(\\s){2}(Call.*Java.*)+(\\s){2}===.*)
         - Failed comparison: [found] 0 = 1 [given]
         - No nodes matched!

>>> Check stdout for compilation output of the failed methods



  #############################################################
   - To only run the failed tests use -DTest, -DExclude,
     and/or -DScenarios.
   - To also get the standard output of the test VM run with
     -DReportStdout=true or for even more fine-grained logging
     use -DVerbose=true.
  #############################################################


java.lang.RuntimeException: The following scenarios have failed: #1. Please check stderr for more information.: expected true, was false
	at jdk.test.lib.Asserts.fail(Asserts.java:594)
	at jdk.test.lib.Asserts.assertTrue(Asserts.java:486)
	at ir_framework.tests.TestScenarios.main(TestScenarios.java:66)
	at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104)
	at java.base/java.lang.reflect.Method.invoke(Method.java:578)
	at com.sun.javatest.regtest.agent.MainActionHelper$AgentVMRunnable.run(MainActionHelper.java:312)
	at java.base/java.lang.Thread.run(Thread.java:828)

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

result: Failed. Execution failed: `main' threw exception: java.lang.RuntimeException: The following scenarios have failed: #1. Please check stderr for more information.: expected true, was false
Comments
Changeset: 6e3e470d Author: Christian Hagedorn <chagedorn@openjdk.org> Date: 2022-06-08 10:41:52 +0000 URL: https://git.openjdk.java.net/jdk/commit/6e3e470dac80d3b6c3a0f4845ce4115858178dd3
08-06-2022

A pull request was submitted for review. URL: https://git.openjdk.java.net/jdk/pull/8647 Date: 2022-05-11 06:13:12 +0000
11-05-2022

[~thartmann] Sure. I think it's another issue of not handling "<!-- safepoint while printing -->" correctly in the test itself.
10-05-2022

Maybe we should always execute these tests with -DVerbose=true to be able to inspect the dumped graph if the test fails.
02-05-2022

The test expects scenarios 1 and 3 to fail ("The following scenarios have failed: #1, #3"), however, only scenario 1 failed: "The following scenarios have failed: #1"
02-05-2022

Christian, could you please have a look?
02-05-2022

ILW = IR verification framework test fails because match rule does not fail as expected, happened only once with single test, no workaround = MLH = P4
02-05-2022

I'm not able to reproduce this. Marking as test bug because it's most likely either an issue with the IR verification framework or an issue with the test.
02-05-2022