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

[lworld] C2 compilation fails with assert "inline type should be loaded"

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P3
    • Resolution: Fixed
    • Affects Version/s: repo-valhalla
    • Fix Version/s: repo-valhalla
    • Component/s: hotspot
    • Labels:

      Description

      lworld bits crash with

      # A fatal error has been detected by the Java Runtime Environment:
      #
      # Internal Error (/home/katya/work/JavaSE/Hotspot/ws/git/valhalla.chhagedorn/open/src/hotspot/share/opto/inlinetypenode.cpp:603), pid=20013, tid=20028
      # assert(vt->is_default(&gvn) || init_ctl != kit->control() || !gvn.type(oop)->is_inlinetypeptr() || oop->is_Con() || oop->Opcode() == Op_InlineTypePtr || AllocateNode::Ideal_allocation(oop, &gvn) != __null || vt->is_loaded(&gvn) == oop) failed: inline type should be loaded
      #
      # JRE version: Java(TM) SE Runtime Environment (17.0) (fastdebug build 17-lworld3ea+0-2021-03-16-2108446.katya...)
      # Java VM: Java HotSpot(TM) 64-Bit Server VM (fastdebug 17-lworld3ea+0-2021-03-16-2108446.katya..., mixed mode, sharing, tiered, compressed oops, compressed class ptrs, g1 gc, linux-amd64)
      # Problematic frame:
      # V [libjvm.so+0xe75db2] InlineTypeNode::make_from_oop(GraphKit*, Node*, ciInlineKlass*)+0xb52
      #

      --------------- S U M M A R Y ------------

      Command Line: -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Djavatest.maxOutputSize=1000000 -DVerifyIR=false -XX:+AlwaysIncrementalInline -XX:FlatArrayElementMaxOops=0 -XX:FlatArrayElementMaxSize=0 -XX:InlineFieldMaxFlatSize=0 -XX:+InlineTypePassFieldsAsArgs -XX:+InlineTypeReturnedAsFields -XX:FlatArrayElementMaxSize=0 -XX:-BackgroundCompilation -XX:CompileCommand=quiet -DShouldDoIRVerification=false -DWarmup=251 jdk.test.lib.hotspot.ir_framework.TestFrameworkExecution compiler.valhalla.inlinetypes.TestCallingConventionBug compiler.valhalla.inlinetypes.MyValue1 compiler.valhalla.inlinetypes.MyValue2 compiler.valhalla.inlinetypes.MyValue2Inline compiler.valhalla.inlinetypes.MyValue3 compiler.valhalla.inlinetypes.MyValue3Inline compiler.valhalla.inlinetypes.MyValue4

      Host: olegbox, Intel(R) Xeon(R) CPU E5-2630 0 @ 2.30GHz, 24 cores, 15G, Ubuntu 16.04.6 LTS
      Time: Tue Mar 23 12:39:43 2021 PDT elapsed time: 2.757883 seconds (0d 0h 0m 2s)

      --------------- T H R E A D ---------------

      Current thread (0x00007fc8902a63f0): JavaThread "C2 CompilerThread0" daemon [_thread_in_native, id=20028, stack(0x00007fc8614fd000,0x00007fc8615fe000)]


      Current CompileTask:
      C2: 2758 643 b 4 compiler.valhalla.inlinetypes.TestCallingConventionBug::test44 (25 bytes)

      Stack: [0x00007fc8614fd000,0x00007fc8615fe000], sp=0x00007fc8615fa510, free space=1013k
      Native frames: (J=compiled Java code, A=aot compiled Java code, j=interpreted, Vv=VM code, C=native code)
      V [libjvm.so+0xe75db2] InlineTypeNode::make_from_oop(GraphKit*, Node*, ciInlineKlass*)+0xb52
      V [libjvm.so+0xd8ec29] GraphKit::cast_not_null(Node*, bool) [clone .part.0]+0x159
      V [libjvm.so+0xdaa38a] GraphKit::null_check_common(Node*, BasicType, bool, Node**, bool) [clone .part.0]+0x57a
      V [libjvm.so+0xdaaa0a] GraphKit::null_check_oop(Node*, Node**, bool, bool, bool)+0x14a
      V [libjvm.so+0xe75b11] InlineTypeNode::make_from_oop(GraphKit*, Node*, ciInlineKlass*)+0x8b1
      V [libjvm.so+0xe7d21c] InlineTypeNode::initialize_fields(GraphKit*, MultiNode*, unsigned int&, bool)+0x23c
      V [libjvm.so+0xe7db0a] InlineTypeNode::make_from_multi(GraphKit*, MultiNode*, ciInlineKlass*, unsigned int&, bool)+0x4a
      V [libjvm.so+0xd9ea36] GraphKit::set_results_for_java_call(CallJavaNode*, bool, bool)+0xe6
      V [libjvm.so+0x870889] DirectCallGenerator::generate(JVMState*)+0x2d9
      V [libjvm.so+0xba0f21] Parse::do_call()+0x391
      V [libjvm.so+0x164d768] Parse::do_one_bytecode()+0x438
      V [libjvm.so+0x1634ea8] Parse::do_one_block()+0x848
      V [libjvm.so+0x1635dd0] Parse::do_all_blocks()+0x130
      V [libjvm.so+0x163adf3] Parse::Parse(JVMState*, ciMethod*, float)+0xe33
      V [libjvm.so+0x8681e5] ParseGenerator::generate(JVMState*)+0x115
      V [libjvm.so+0xa4fb1c] Compile::Compile(ciEnv*, ciMethod*, int, bool, bool, bool, bool, DirectiveSet*)+0x113c
      V [libjvm.so+0x8650e8] C2Compiler::compile_method(ciEnv*, ciMethod*, int, bool, DirectiveSet*)+0x1f8
      V [libjvm.so+0xa60331] CompileBroker::invoke_compiler_on_method(CompileTask*)+0xf21
      V [libjvm.so+0xa60fd8] CompileBroker::compiler_thread_loop()+0x5a8
      V [libjvm.so+0x1924a61] JavaThread::thread_main_inner()+0x271
      V [libjvm.so+0x192c920] Thread::call_run()+0x100
      V [libjvm.so+0x15eed66] thread_native_entry(Thread*)+0x116




      To reproduce the crash you need to run compiler/valhalla/inlinetypes/TestCallingConvention.java
      from Cristian's branch: https://github.com/openjdk/valhalla/compare/lworld...chhagedorn:TestingFramework
      TestCallingConvention.java is converted version of the same test from valhalla ws to new IR framework.

      The unit test which crash jvm is actually test44, so I am attaching TestCallingConventionBug.java
      which runs only test44 in one scenario.


      Note, original version of TestCallingConvention.java doesn't fail.
      So it could be nice to look why the test based on new IR framework crashes while the test based on old framework passes.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              thartmann Tobias Hartmann
              Reporter:
              epavlova Ekaterina Pavlova
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: