Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8350576

C2: assert(false) failed: reduction has ctrl or bad vector_input

XMLWordPrintable

      The attached Java Fuzzer test fails with the following assertion after JDK-8319372 which removed some type optimization for CastII nodes (probably unrelated but triggering the issue):

      $ java -XX:CompileCommand=compileonly,*Test*::* -Xbatch -XX:-TieredCompilation Test.java
      $ java -XX:CompileCommand=compileonly,*Reduced*::* -Xbatch -XX:-TieredCompilation Reduced.java

      Output:
       520 Replicate === _ 81 [[ 523 538 626 693 694 775 776 777 778 ]] #vectory<J,4> !orig=[522],[463],[413],[131] !jvms: Reduced::test @ bci:19 (line 10)
       626 AddReductionVL === _ 693 520 [[ 523 ]] no_strict_order !orig=523,[462],[412],[132] !jvms: Reduced::test @ bci:20 (line 10)
       523 AddReductionVL === _ 626 520 [[ 806 134 559 551 ]] no_strict_order !orig=[462],[412],[132] !jvms: Reduced::test @ bci:20 (line 10)

      #
      # A fatal error has been detected by the Java Runtime Environment:
      #
      # Internal Error (c:\sb\prod\1739659512\workspace\open\src\hotspot\share\opto\loopopts.cpp:4584), pid=13500, tid=13964
      # assert(false) failed: reduction has ctrl or bad vector_input
      #
      # JRE version: Java(TM) SE Runtime Environment (25.0+11) (fastdebug build 25-ea+11-LTS-1137)
      # Java VM: Java HotSpot(TM) 64-Bit Server VM (fastdebug 25-ea+11-LTS-1137, mixed mode, sharing, compressed oops, compressed class ptrs, g1 gc, windows-amd64)
      # Problematic frame:
      # V [jvm.dll+0xbf948a] PhaseIdealLoop::move_unordered_reduction_out_of_loop+0x9fa
      .............
      Command Line: -Xmx1G -XX:+IgnoreUnrecognizedVMOptions -XX:CompileCommand=quiet -XX:CompileCommand=compileonly,*Test*::* -XX:-TieredCompilation -XX:+UnlockDiagnosticVMOptions -XX:StressSeed=1648090214 -Xbatch -XX:+UnlockDiagnosticVMOptions -XX:+StressLCM -XX:+StressGCM -XX:+StressIGVN -XX:+StressCCP -XX:+StressMacroExpansion -XX:+VerifyLoopOptimizations -XX:VerifyIterativeGVN=10 -XX:MaxRAMPercentage=4.16667 -Dtest.boot.jdk=c:\ade\mesos\work_dir\jib-master\install\jdk\23\37\bundles\windows-x64\jdk-23_windows-x64_bin.zip\jdk-23 -Djava.io.tmpdir=c:\sb\prod\1739777846\testoutput\test-support\jtreg_closed_test_hotspot_jtreg_applications_javafuzzer_BigTest_java\tmp -XX:+CreateCoredumpOnCrash Test
      .............
      C2:1224 3 % b Test::lMeth @ 51 (187 bytes)

      Stack: [0x000000cfd6700000,0x000000cfd6800000], sp=0x000000cfd67fb700, free space=1005k
      Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
      V [jvm.dll+0xbf948a] PhaseIdealLoop::move_unordered_reduction_out_of_loop+0x9fa (loopopts.cpp:4584)
      V [jvm.dll+0xbcb07b] PhaseIdealLoop::build_and_optimize+0x11bb (loopnode.cpp:4988)
      V [jvm.dll+0x55c3cc] Compile::Optimize+0xb4c (compile.cpp:2418)
      V [jvm.dll+0x559396] Compile::Compile+0x1096 (compile.cpp:849)
      V [jvm.dll+0x460c69] C2Compiler::compile_method+0x179 (c2compiler.cpp:144)
      V [jvm.dll+0x5772ba] CompileBroker::invoke_compiler_on_method+0x7aa (compileBroker.cpp:2331)
      V [jvm.dll+0x57480b] CompileBroker::compiler_thread_loop+0x33b (compileBroker.cpp:1976)
      V [jvm.dll+0x8c22b2] JavaThread::thread_main_inner+0x282 (javaThread.cpp:777)
      V [jvm.dll+0xfb1114] Thread::call_run+0x1b4 (thread.cpp:236)
      V [jvm.dll+0xd72791] thread_native_entry+0xe1 (os_windows.cpp:566)
      C [ucrtbase.dll+0x26b4c] (no source info available)
      C [KERNEL32.DLL+0x14cb0] (no source info available)
      C [ntdll.dll+0x7ecdb] (no source info available)

        1. hs_err_pid13500.log
          90 kB
        2. Reduced.java
          0.4 kB
        3. Test.java
          8 kB

            epeter Emanuel Peter
            chagedorn Christian Hagedorn
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: