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

C2: assert(false) failed: Bad graph detected in build_loop_late

XMLWordPrintable

      The attached Java Fuzzer test starts to fail after JDK-8273612 (seems unrelated as it only changes the compilation policy) with the following assertion:

      To reproduce:
      $ java -Xcomp -XX:CompileOnly=Test::* Test.java
      $ java -Xcomp -XX:CompileOnly=Reduced::* Reduced.java

      #
      # A fatal error has been detected by the Java Runtime Environment:
      #
      # Internal Error (/opt/mach5/mesos/work_dir/slaves/cd627e65-f015-4fb1-a1d2-b6c9b8127f98-S128573/frameworks/1735e8a2-a1db-478c-8104-60c8b0af87dd-0196/executors/39ec21cc-2219-4e60-838b-826d7b391609/runs/e080e9a8-b51d-41f6-a3a6-932d818fa3d9/workspace/open/src/hotspot/share/opto/loopnode.cpp:6102), pid=662934, tid=662957
      # assert(false) failed: Bad graph detected in build_loop_late
      #
      # JRE version: Java(TM) SE Runtime Environment (22.0) (fastdebug build 22-internal-2023-08-09-1649487.mikael.vidstedt.jdk)
      # Java VM: Java HotSpot(TM) 64-Bit Server VM (fastdebug 22-internal-2023-08-09-1649487.mikael.vidstedt.jdk, compiled mode, sharing, tiered, compressed oops, compressed class ptrs, g1 gc, linux-amd64)
      # Problematic frame:
      # V [libjvm.so+0x129bc38] PhaseIdealLoop::build_loop_late_post_work(Node*, bool)+0x9a8
      ............
      Command Line: -Xmx1G -Xcomp -Xbatch -XX:CompileOnly=*Test*::* -XX:CompileCommand=quiet -XX:MaxRAMPercentage=4.16667 -Dtest.boot.jdk=/opt/mach5/mesos/work_dir/jib-master/install/jdk/20/36/bundles/linux-x64/jdk-20_linux-x64_bin.tar.gz/jdk-20 -Djava.io.tmpdir=/opt/mach5/mesos/work_dir/slaves/cd627e65-f015-4fb1-a1d2-b6c9b8127f98-S125885/frameworks/1735e8a2-a1db-478c-8104-60c8b0af87dd-0196/executors/6206c973-ae79-435f-afcd-0162f76c707c/runs/e3c116bc-1999-4f17-9f3f-42c928e8142b/testoutput/test-support/jtreg_closed_test_hotspot_jtreg_applications_javafuzzer_BigTest_java/tmp Test
      ...........
      Current CompileTask:
      C2: 429 6 !b 4 Test::mainTest (1771 bytes)

      Stack: [0x00007f52a3117000,0x00007f52a3217000], sp=0x00007f52a3211d60, free space=1003k
      Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
      V [libjvm.so+0x129bc38] PhaseIdealLoop::build_loop_late_post_work(Node*, bool)+0x9a8 (loopnode.cpp:6102)
      V [libjvm.so+0x129bd6d] PhaseIdealLoop::build_loop_late(VectorSet&, Node_List&, Node_Stack&)+0xbd (loopnode.cpp:6005)
      V [libjvm.so+0x129c69d] PhaseIdealLoop::build_and_optimize()+0x61d (loopnode.cpp:4467)
      V [libjvm.so+0x9ef5ee] PhaseIdealLoop::optimize(PhaseIterGVN&, LoopOptsMode)+0x3ce (loopnode.hpp:1114)
      V [libjvm.so+0x9ec07f] Compile::Optimize()+0xdaf (compile.cpp:2166)
      V [libjvm.so+0x9ee3a0] Compile::Compile(ciEnv*, ciMethod*, int, Options, DirectiveSet*)+0x1b60 (compile.cpp:850)
      V [libjvm.so+0x849c6b] C2Compiler::compile_method(ciEnv*, ciMethod*, int, bool, DirectiveSet*)+0x13b (c2compiler.cpp:119)
      V [libjvm.so+0x9fa2c7] CompileBroker::invoke_compiler_on_method(CompileTask*)+0x977 (compileBroker.cpp:2276)
      V [libjvm.so+0x9fb008] CompileBroker::compiler_thread_loop()+0x5f8 (compileBroker.cpp:1944)
      V [libjvm.so+0xeb7ecc] JavaThread::thread_main_inner()+0xcc (javaThread.cpp:720)
      V [libjvm.so+0x17998ca] Thread::call_run()+0xba (thread.cpp:217)
      V [libjvm.so+0x14991b1] thread_native_entry(Thread*)+0x121 (os_linux.cpp:783)

        1. FuzzerUtils.java
          13 kB
          Christian Hagedorn
        2. hs_err_pid662934.log
          100 kB
          Christian Hagedorn
        3. Reduced.java
          0.9 kB
          Christian Hagedorn
        4. Reduced2.java
          0.5 kB
          Emanuel Peter
        5. Test.java
          25 kB
          Christian Hagedorn

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

              Created:
              Updated:
              Resolved: