C2: assert(false) failed: bad AD file

XMLWordPrintable

    • b30
    • 19

      Found by Olivier Mattmann <olivier.mattmann@bluewin.ch> during work on this Master thesis where he is working on a fuzzer for C2 (see JDK-8370562).

      Running java-fastdebug -Xbatch -XX:-TieredCompilation -XX:CompileCommand=printcompilation,Test.test Test.java asserts with the following error on x64 and aarch64:
      CompileCommand: PrintCompilation Test.test bool PrintCompilation = true
      1812 103 % !b Test::test @ 53 (407 bytes)
      1821 104 !b Test::test (407 bytes)
      1824 105 % !b Test::test @ 336 (407 bytes)
      o4378 If === o1875 o4377 o2561 [[ o4379 o4380 468 ]] P=0.000001, C=-1.000000

      --N: o4378 If === o1875 o4377 o2561 [[ o4379 o4380 468 ]] P=0.000001, C=-1.000000

         --N: o4377 Bool === _ o2561 [[ o4378 ]] [ne]
         CMPOP 0 CMPOP
         CMPOPU 0 CMPOPU
         CMPOPUCF2 0 CMPOPUCF2

         --N: o2561 Phi === o2533 o2400 o716 [[ o4377 o4378 ]] #int:-1..1, 0u..maxuint
         RREGI 0 RREGI
         RAX_REGI 0 RAX_REGI
         RBX_REGI 0 RBX_REGI
         RCX_REGI 0 RCX_REGI
         RDX_REGI 0 RDX_REGI
         RDI_REGI 0 RDI_REGI
         NO_RAX_RDX_REGI 0 NO_RAX_RDX_REGI
         NO_RBP_R13_REGI 0 NO_RBP_R13_REGI
         STACKSLOTI 100 storeSSI

      #
      # A fatal error has been detected by the Java Runtime Environment:
      #
      # Internal Error (src/jdk/open/src/hotspot/share/opto/matcher.cpp:1640), pid=274085, tid=274100
      # assert(false) failed: bad AD file
      #
      # JRE version: Java(TM) SE Runtime Environment (27.0) (fastdebug build 27-internal-mhassig.open)
      # Java VM: Java HotSpot(TM) 64-Bit Server VM (fastdebug 27-internal-mhassig.open, mixed mode, compressed oops, compressed class ptrs, g1 gc, linux-amd64)
      # Problematic frame:
      # V [libjvm.so+0x1688d13] Matcher::Label_Root(Node const*, State*, Node*, Node*&)+0x9c3

      Current CompileTask:
      C2:6138 688 % !b Test::test @ 356 (427 bytes)

      Stack: [0x00007f198e5e7000,0x00007f198e6e7000], sp=0x00007f198e6e2830, free space=1006k
      Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
      V [libjvm.so+0x1688d13] Matcher::Label_Root(Node const*, State*, Node*, Node*&)+0x9c3 (matcher.cpp:1640)
      V [libjvm.so+0x1688eb8] Matcher::match_tree(Node const*)+0x158 (matcher.cpp:1424)
      V [libjvm.so+0x168f73c] Matcher::xform(Node*, int)+0xd9c (matcher.cpp:1040)
      V [libjvm.so+0x1693311] Matcher::match()+0x901 (matcher.cpp:337)
      V [libjvm.so+0xbad606] Compile::Code_Gen()+0x236 (compile.cpp:3038)
      V [libjvm.so+0xbb3373] Compile::Compile(ciEnv*, ciMethod*, int, Options, DirectiveSet*)+0x2123 (compile.cpp:895)
      V [libjvm.so+0x9ca1e8] C2Compiler::compile_method(ciEnv*, ciMethod*, int, bool, DirectiveSet*)+0x498 (c2compiler.cpp:147)
      V [libjvm.so+0xbc2760] CompileBroker::invoke_compiler_on_method(CompileTask*)+0x780 (compileBroker.cpp:2345)
      V [libjvm.so+0xbc3fc0] CompileBroker::compiler_thread_loop()+0x530 (compileBroker.cpp:1989)
      V [libjvm.so+0x112d25b] JavaThread::thread_main_inner()+0x13b (javaThread.cpp:776)
      V [libjvm.so+0x1bbbe06] Thread::call_run()+0xb6 (thread.cpp:243)
      V [libjvm.so+0x1810bf8] thread_native_entry(Thread*)+0x118 (os_linux.cpp:929)

      Build search suggests that this is caused by JDK-8280320.

        1. hs_err_aarch64.log
          77 kB
        2. hs_err_x86.log
          71 kB
        3. Test.java
          3 kB

            Assignee:
            Unassigned
            Reporter:
            Manuel Hässig
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: