JDK-8286339 : compiler/c2/irTests/TestEnumFinalFold.java fails if Enum/String methods are not inlined
  • Type: Bug
  • Component: hotspot
  • Sub-Component: compiler
  • Affected Version: 19
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • OS: linux
  • CPU: x86_64
  • Submitted: 2022-05-06
  • Updated: 2022-05-11
  • Resolved: 2022-05-11
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 19
19 masterFixed
Related Reports
Relates :  
Sub Tasks
JDK-8286342 :  
Description
The following test failed in the JDK19 CI:

compiler/c2/irTests/TestEnumFinalFold.java

Here's a snippet from the log file:

----------System.err:(46/5586)*----------

Command Line:
/opt/mach5/mesos/work_dir/jib-master/install/jdk-19+22-1518/linux-x64-debug.jdk/jdk-19/fastdebug/bin/java -DReproduce=true -cp /opt/mach5/mesos/work_dir/slaves/779adf21-f3e5-4e6a-a889-8cc0f9bc6fbb-S14506/frameworks/1735e8a2-a1db-478c-8104-60c8b0af87dd-0196/executors/4981ce79-0dd4-470c-98bb-6ce346eb9c6d/runs/e283214c-0259-411d-8786-ca843e7b5225/testoutput/test-support/jtreg_open_test_hotspot_jtreg_tier1_compiler_1/classes/5/compiler/c2/irTests/TestEnumFinalFold.d:/opt/mach5/mesos/work_dir/jib-master/install/jdk-19+22-1518/src.full/open/test/hotspot/jtreg/compiler/c2/irTests:/opt/mach5/mesos/work_dir/slaves/779adf21-f3e5-4e6a-a889-8cc0f9bc6fbb-S14506/frameworks/1735e8a2-a1db-478c-8104-60c8b0af87dd-0196/executors/4981ce79-0dd4-470c-98bb-6ce346eb9c6d/runs/e283214c-0259-411d-8786-ca843e7b5225/testoutput/test-support/jtreg_open_test_hotspot_jtreg_tier1_compiler_1/classes/5/test/lib:/opt/mach5/mesos/work_dir/slaves/779adf21-f3e5-4e6a-a889-8cc0f9bc6fbb-S14506/frameworks/1735e8a2-a1db-478c-8104-60c8b0af87dd-0196/executors/4981ce79-0dd4-470c-98bb-6ce346eb9c6d/runs/e283214c-0259-411d-8786-ca843e7b5225/testoutput/test-support/jtreg_open_test_hotspot_jtreg_tier1_compiler_1/classes/5:/opt/mach5/mesos/work_dir/jib-master/install/jtreg/6.1/1/bundles/jtreg-6.1+1.zip/jtreg/lib/javatest.jar:/opt/mach5/mesos/work_dir/jib-master/install/jtreg/6.1/1/bundles/jtreg-6.1+1.zip/jtreg/lib/jtreg.jar:/opt/mach5/mesos/work_dir/jib-master/install/jtreg/6.1/1/bundles/jtreg-6.1+1.zip/jtreg/lib/junit.jar:/opt/mach5/mesos/work_dir/jib-master/install/jtreg/6.1/1/bundles/jtreg-6.1+1.zip/jtreg/lib/hamcrest.jar:/opt/mach5/mesos/work_dir/jib-master/install/jtreg/6.1/1/bundles/jtreg-6.1+1.zip/jtreg/lib/testng.jar:/opt/mach5/mesos/work_dir/jib-master/install/jtreg/6.1/1/bundles/jtreg-6.1+1.zip/jtreg/lib/jcommander.jar:/opt/mach5/mesos/work_dir/jib-master/install/jtreg/6.1/1/bundles/jtreg-6.1+1.zip/jtreg/lib/guice.jar -Djava.library.path=/opt/mach5/mesos/work_dir/jib-master/install/jdk-19+22-1518/linux-x64-debug.test/hotspot/jtreg/native -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -XX:MaxRAMPercentage=4.16667 -Djava.io.tmpdir=/opt/mach5/mesos/work_dir/slaves/779adf21-f3e5-4e6a-a889-8cc0f9bc6fbb-S14506/frameworks/1735e8a2-a1db-478c-8104-60c8b0af87dd-0196/executors/4981ce79-0dd4-470c-98bb-6ce346eb9c6d/runs/e283214c-0259-411d-8786-ca843e7b5225/testoutput/test-support/jtreg_open_test_hotspot_jtreg_tier1_compiler_1/tmp -XX:+CreateCoredumpOnCrash -ea -esa -XX:+UnlockExperimentalVMOptions -server -XX:-TieredCompilation -Dir.framework.server.port=35791 -XX:+PrintCompilation -XX:+UnlockDiagnosticVMOptions -XX:+LogCompilation -XX:CompileCommand=log,compiler.c2.irTests.TestEnumFinalFold::* -XX:CompileCommand=option,compiler.c2.irTests.TestEnumFinalFold::*,bool,PrintIdeal,true -XX:CompileCommand=option,compiler.c2.irTests.TestEnumFinalFold::*,bool,PrintOptoAssembly,true -XX:-OmitStackTraceInFastThrow -DShouldDoIRVerification=true -XX:-BackgroundCompilation -XX:CompileCommand=quiet compiler.lib.ir_framework.test.TestVM compiler.c2.irTests.TestEnumFinalFold

One or more @IR rules failed:

Failed IR Rules (1) of Methods (1)
----------------------------------
1) Method "public int compiler.c2.irTests.TestEnumFinalFold.testNameLengthSum()" - [Failed IR rules: 1]:
   * @IR rule 1: "@compiler.lib.ir_framework.IR(applyIf={}, applyIfAnd={}, failOn={"(\\\\d+(\\\\s){2}(AddI.*)+(\\\\s){2}===.*)"}, applyIfOr={}, counts={}, applyIfNot={})"
     - failOn: Graph contains forbidden nodes:
       * Regex 1: (\\d+(\\s){2}(AddI.*)+(\\s){2}===.*)
         - Matched forbidden node:
           * 129  AddI  === _  115  68  [[ 130 ]]  !jvms: TestEnumFinalFold::testNameLengthSum @ bci:18 (line 62)

>>> 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.
  #############################################################


compiler.lib.ir_framework.driver.irmatching.IRViolationException: There were one or multiple IR rule failures. Please check stderr for more information.
	at compiler.lib.ir_framework.driver.irmatching.IRMatcher.throwIfNoSafepointWhilePrinting(IRMatcher.java:91)
	at compiler.lib.ir_framework.driver.irmatching.IRMatcher.reportFailures(IRMatcher.java:82)
	at compiler.lib.ir_framework.driver.irmatching.IRMatcher.applyIRRules(IRMatcher.java:54)
	at compiler.lib.ir_framework.driver.irmatching.IRMatcher.<init>(IRMatcher.java:43)
	at compiler.lib.ir_framework.TestFramework.runTestVM(TestFramework.java:702)
	at compiler.lib.ir_framework.TestFramework.start(TestFramework.java:671)
	at compiler.lib.ir_framework.TestFramework.start(TestFramework.java:324)
	at compiler.lib.ir_framework.TestFramework.run(TestFramework.java:210)
	at compiler.lib.ir_framework.TestFramework.run(TestFramework.java:199)
	at compiler.c2.irTests.TestEnumFinalFold.main(TestEnumFinalFold.java:40)
	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: compiler.lib.ir_framework.driver.irmatching.IRViolationException
JavaTest Message: shutting down test

result: Failed. Execution failed: `main' threw exception: compiler.lib.ir_framework.driver.irmatching.IRViolationException: There were one or multiple IR rule failures. Please check stderr for more information.
Comments
Changeset: 9c254841 Author: Aleksey Shipilev <shade@openjdk.org> Date: 2022-05-11 05:29:11 +0000 URL: https://git.openjdk.java.net/jdk/commit/9c2548414c71b4caaad6ad9e1b122f474e705300
11-05-2022

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

The test failed in Tier3 on windows-x64-debug with the following JVM args: -XX:+CreateCoredumpOnCrash -ea -esa -XX:CompileThreshold=100 -XX:+UnlockExperimentalVMOptions -server -XX:-TieredCompilation The test also failed in Tier3 on macosx-x64-debug with the following JVM args: -XX:+CreateCoredumpOnCrash -ea -esa -XX:CompileThreshold=100 -XX:+UnlockExperimentalVMOptions -server -XX:-TieredCompilation
06-05-2022

ILW = new test failing; intermittent; no workaround = MMH = P3
06-05-2022

Here's the test tasks' JVM args for the three failures that I've seen so far: linux-aarch64-debug: -XX:+CreateCoredumpOnCrash -ea -esa -XX:CompileThreshold=100 -XX:+UnlockExperimentalVMOptions -server -XX:-TieredCompilation macosx-aarch64-debug: -XX:+CreateCoredumpOnCrash -ea -esa -XX:CompileThreshold=100 -XX:+UnlockExperimentalVMOptions -server -XX:-TieredCompilation linux-x64-debug: -XX:+CreateCoredumpOnCrash -ea -esa -XX:CompileThreshold=100 -XX:+UnlockExperimentalVMOptions -server -XX:-TieredCompilation
06-05-2022

[~shade] - Can you take a look at this bug? It looks like the new test from: JDK-8286190 Add test to verify constant folding for Enum fields is failing in Tier2.
06-05-2022

This is a new test added by: JDK-8286190 Add test to verify constant folding for Enum fields and so far the test has failed on: linux-aarch64-debug macosx-aarch64-debug linux-x64-debug
06-05-2022