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

C2: assert(false) failed: type flow analysis failed for OSR compilation

XMLWordPrintable

      When trying to run a replay file of a Java Fuzzer test, I've hit the following assertion:

      Steps to reproduce:
      $ mkdir test
      $ cp r.log test

      # Important: Only move Test.class to folder
      $ cp Test.class test
      $ cd test

      # For versions before JDK 21 (i.e. before JDK-8303951 which added the failing assert), additionally add -XX:+AbortVMOnCompilationFailure
      $ java -XX:+ReplayCompiles -XX:+ReplayIgnoreInitErrors -XX:ReplayDataFile=r.log

      With javac compilation:
      $ mkdir test
      $ cp r.log test
      $ cp Test.java test
      $ cp FuzzerUtils.java test
      $ cd test
      $ javac FuzzerUtils.java
      $ javac Test.java

      # Important: Remove FuzzerUtils.class again!
      $ rm FuzzerUtils.class

      # For versions before JDK 21 (i.e. before JDK-8303951 which added the failing assert), additionally add -XX:+AbortVMOnCompilationFailure
      $ java -XX:+ReplayCompiles -XX:+ReplayIgnoreInitErrors -XX:ReplayDataFile=r.log

      #
      # A fatal error has been detected by the Java Runtime Environment:
      #
      # Internal Error (/opt/mach5/mesos/work_dir/slaves/cd627e65-f015-4fb1-a1d2-b6c9b8127f98-S74285/frameworks/1735e8a2-a1db-478c-8104-60c8b0af87dd-0196/executors/d8f65403-2977-4b76-b632-b832f0f37873/runs/b69e6687-3d5f-4b09-9d2c-cf04294ff062/workspace/open/src/hotspot/share/opto/parse1.cpp:513), pid=846083, tid=846096
      # assert(false) failed: type flow analysis failed for OSR compilation
      #
      # JRE version: Java(TM) SE Runtime Environment (22.0+6) (fastdebug build 22-ea+6-377)
      # Java VM: Java HotSpot(TM) 64-Bit Server VM (fastdebug 22-ea+6-377, mixed mode, sharing, tiered, compressed oops, compressed class ptrs, g1 gc, linux-amd64)
      # Problematic frame:
      # V [libjvm.so+0x14e3850] Parse::Parse(JVMState*, ciMethod*, float)+0xd80
      ..........
      Command Line: -XX:+ReplayCompiles -XX:+ReplayIgnoreInitErrors -XX:ReplayDataFile=r.log
      ..........
      C2: 80 60 % !b 4 Test::vMeth @ 57 (332 bytes)

      Stack: [0x00007fce5c0f5000,0x00007fce5c1f5000], sp=0x00007fce5c1f19f0, free space=1010k
      Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
      V [libjvm.so+0x14e3850] Parse::Parse(JVMState*, ciMethod*, float)+0xd80 (parse1.cpp:513)
      V [libjvm.so+0x850a28] ParseGenerator::generate(JVMState*)+0x168
      V [libjvm.so+0x9f4106] Compile::Compile(ciEnv*, ciMethod*, int, Options, DirectiveSet*)+0x16e6
      V [libjvm.so+0x84e63e] C2Compiler::compile_method(ciEnv*, ciMethod*, int, bool, DirectiveSet*)+0x10e
      V [libjvm.so+0xa004e0] CompileBroker::invoke_compiler_on_method(CompileTask*)+0xa00
      V [libjvm.so+0xa01368] CompileBroker::compiler_thread_loop()+0x618
      V [libjvm.so+0xeb4c8c] JavaThread::thread_main_inner()+0xcc
      V [libjvm.so+0x179114a] Thread::call_run()+0xba
      V [libjvm.so+0x14918bc] thread_native_entry(Thread*)+0x11c

        1. FuzzerUtils.java
          13 kB
        2. r.log
          140 kB
        3. Test.class
          8 kB
        4. Test.java
          13 kB

            thartmann Tobias Hartmann
            chagedorn Christian Hagedorn
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: