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

C2: assert(opaq->outcnt() == 1 && opaq->in(1) == limit) failed

XMLWordPrintable

      The attached Java Fuzzer test fails with the following assertion by using the new StressLoopPeeling flag (probably just revealed an existing issue that is not a recent regression, please add the affected versions accordingly once the root cause is known):

      To reproduce (needs RepeatCompilation since it fails intermittently):
      $ java -XX:CompileCommand=compileonly,Test::test -XX:-TieredCompilation -Xbatch -XX:+StressLoopPeeling -XX:PerMethodTrapLimit=0 -XX:CompileCommand=RepeatCompilation,*Test*::test,100 Test.java
      $ java -XX:CompileCommand=compileonly,Reduced::test -XX:-TieredCompilation -Xbatch -XX:+StressLoopPeeling -XX:PerMethodTrapLimit=0 -XX:CompileCommand=RepeatCompilation,*Reduced*::test,100 Reduced.java

      #
      # A fatal error has been detected by the Java Runtime Environment:
      #
      # Internal Error (c:\sb\prod\1751821445\workspace\open\src\hotspot\share\opto\loopTransform.cpp:1889), pid=19420, tid=35996
      # Error: assert(opaq->outcnt() == 1 && opaq->in(1) == limit) failed
      #
      # JRE version: Java(TM) SE Runtime Environment (26.0+6) (fastdebug build 26-ea+6-494)
      # Java VM: Java HotSpot(TM) 64-Bit Server VM (fastdebug 26-ea+6-494, mixed mode, sharing, compressed oops, compressed class ptrs, g1 gc, windows-amd64)
      # Problematic frame:
      # V [jvm.dll+0xc3e72d] PhaseIdealLoop::do_unroll+0x115d
      ..........
      Command Line: -XX:+UnlockDiagnosticVMOptions -XX:RepeatCompilation=99 -Xmx1G -XX:+IgnoreUnrecognizedVMOptions -XX:CompileCommand=quiet -XX:CompileCommand=compileonly,*Test*::* -XX:-TieredCompilation -Xbatch -XX:+UnlockDiagnosticVMOptions -XX:+StressLCM -XX:+StressGCM -XX:+StressIGVN -XX:+StressCCP -XX:+StressMacroExpansion -XX:+StressLoopPeeling -XX:+UnlockExperimentalVMOptions -XX:PerMethodSpecTrapLimit=0 -XX:PerMethodTrapLimit=0 -XX:MaxRAMPercentage=4.16667 -Dtest.boot.jdk=c:\ade\mesos\work_dir\jib-master\install\jdk\24\36\bundles\windows-x64\jdk-24_windows-x64_bin.zip\jdk-24 -Djava.io.tmpdir=c:\sb\prod\1751956893\testoutput\test-support\jtreg_closed_test_hotspot_jtreg_applications_javafuzzer_LongRunningTests_java\tmp -XX:+CreateCoredumpOnCrash Test
      ............
      C2:5058 3 % b Test::bMeth @ 50 (277 bytes)

      Stack: [0x000000b581e00000,0x000000b581f00000], sp=0x000000b581efb300, free space=1004k
      Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
      V [jvm.dll+0xc3e72d] PhaseIdealLoop::do_unroll+0x115d (loopTransform.cpp:1889)
      V [jvm.dll+0xc44a65] IdealLoopTree::iteration_split_impl+0x685 (loopTransform.cpp:3516)
      V [jvm.dll+0xc44318] IdealLoopTree::iteration_split+0x118 (loopTransform.cpp:3540)
      V [jvm.dll+0xc44234] IdealLoopTree::iteration_split+0x34 (loopTransform.cpp:3524)
      V [jvm.dll+0xc44390] IdealLoopTree::iteration_split+0x190 (loopTransform.cpp:3552)
      V [jvm.dll+0xc44390] IdealLoopTree::iteration_split+0x190 (loopTransform.cpp:3552)
      V [jvm.dll+0xc44390] IdealLoopTree::iteration_split+0x190 (loopTransform.cpp:3552)
      V [jvm.dll+0xc44390] IdealLoopTree::iteration_split+0x190 (loopTransform.cpp:3552)
      V [jvm.dll+0xc44390] IdealLoopTree::iteration_split+0x190 (loopTransform.cpp:3552)
      V [jvm.dll+0xc44390] IdealLoopTree::iteration_split+0x190 (loopTransform.cpp:3552)
      V [jvm.dll+0xc44390] IdealLoopTree::iteration_split+0x190 (loopTransform.cpp:3552)
      V [jvm.dll+0xc51b3e] PhaseIdealLoop::build_and_optimize+0x103e (loopnode.cpp:5019)
      V [jvm.dll+0x5c841b] Compile::Optimize+0xbbb (compile.cpp:2503)
      V [jvm.dll+0x5c5181] Compile::Compile+0x10e1 (compile.cpp:860)
      V [jvm.dll+0x4c8e59] C2Compiler::compile_method+0x179 (c2compiler.cpp:144)
      V [jvm.dll+0x5e36f4] CompileBroker::invoke_compiler_on_method+0x804 (compileBroker.cpp:2336)
      V [jvm.dll+0x5e09ef] CompileBroker::compiler_thread_loop+0x32f (compileBroker.cpp:1972)
      V [jvm.dll+0x936df8] JavaThread::thread_main_inner+0x288 (javaThread.cpp:774)
      V [jvm.dll+0x1044a02] Thread::call_run+0x1b2 (thread.cpp:248)
      V [jvm.dll+0xdf6e21] thread_native_entry+0xe1 (os_windows.cpp:562)
      C [ucrtbase.dll+0x2268a] (no source info available)
      C [KERNEL32.DLL+0x17ac4] (no source info available)
      C [ntdll.dll+0x5a8c1] (no source info available)

        1. FuzzerUtils.java
          13 kB
        2. hs_err_pid19420.log
          98 kB
        3. Reduced.java
          0.9 kB
        4. Test.java
          8 kB

            Unassigned Unassigned
            chagedorn Christian Hagedorn
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: