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

GraphKit::combine_exception_states fails with "matching stack sizes" assert

XMLWordPrintable

    • b29
    • Verified

        Even with the fix for JDK-8273165, I can still reproduce this:

        java -XX:+UnlockExperimentalVMOptions -XX:PerMethodSpecTrapLimit=0 -XX:PerMethodTrapLimit=0 -XX:+AlwaysIncrementalInline -XX:-TieredCompilation -Xbatch -XX:CompileThreshold=10 -XX:CompileCommand=dontinline,*DirectMethodHandle::allocateInstance

        # A fatal error has been detected by the Java Runtime Environment:
        #
        # Internal Error (/oracle/jdk/open/src/hotspot/share/opto/graphKit.cpp:348), pid=492513, tid=492526
        # assert(ex_jvms->sp() == phi_map->_jvms->sp()) failed: matching stack sizes

        Current CompileTask:
        C2: 12785 1313 b jdk.internal.module.SystemModuleFinders$1::find (19 bytes)

        Stack: [0x00007f9d5783a000,0x00007f9d5793b000], sp=0x00007f9d57935b60, free space=1006k
        Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
        V [libjvm.so+0xd46d56] GraphKit::combine_exception_states(SafePointNode*, SafePointNode*) [clone .part.0]+0xc6
        V [libjvm.so+0xd5204c] GraphKit::replace_call(CallNode*, Node*, bool)+0x63c
        V [libjvm.so+0x8263db] CallGenerator::do_late_inline_helper()+0xbbb
        V [libjvm.so+0x9fea4d] Compile::inline_incrementally_one()+0x33d
        V [libjvm.so+0x9fedaf] Compile::inline_incrementally(PhaseIterGVN&)+0x18f
        V [libjvm.so+0x9ffa09] Compile::Optimize()+0x5e9
        V [libjvm.so+0xa026ae] Compile::Compile(ciEnv*, ciMethod*, int, bool, bool, bool, bool, bool, DirectiveSet*)+0x159e
        V [libjvm.so+0x81d2b6] C2Compiler::compile_method(ciEnv*, ciMethod*, int, bool, DirectiveSet*)+0x646
        V [libjvm.so+0xa12ae9] CompileBroker::invoke_compiler_on_method(CompileTask*)+0xd09
        V [libjvm.so+0xa13788] CompileBroker::compiler_thread_loop()+0x518
        V [libjvm.so+0x1887f5c] JavaThread::thread_main_inner()+0x27c
        V [libjvm.so+0x188e510] Thread::call_run()+0x100
        V [libjvm.so+0x156de34] thread_native_entry(Thread*)+0x104

        We might need the same check added by JDK-8273165 in LateInlineMHCallGenerator::do_late_inline_check as well.

              roland Roland Westrelin
              thartmann Tobias Hartmann
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Created:
                Updated:
                Resolved: