JDK-8209833 : C2 compilation fails with "assert(ex_map->jvms()->same_calls_as(_exceptions->jvms())) failed: all collected exceptions must come from the same place"
  • Type: Bug
  • Component: hotspot
  • Sub-Component: compiler
  • Affected Version: 9,10,11,12
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2018-08-22
  • Updated: 2019-09-03
  • Resolved: 2018-08-24
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 11 JDK 12
11.0.6-oracleFixed 12 b09Fixed
Related Reports
Relates :  
Description
#  Internal Error (/oracle/jdk11/open/src/hotspot/share/opto/graphKit.cpp:242), pid=14199, tid=14210
#  assert(ex_map->jvms()->same_calls_as(_exceptions->jvms())) failed: all collected exceptions must come from the same place

Current CompileTask:
C2:   9166   30   !b  4       Test::test2 (15 bytes)

Stack: [0x00007fe69afa6000,0x00007fe69b0a7000],  sp=0x00007fe69b0a2380,  free space=1008k
Native frames: (J=compiled Java code, A=aot compiled Java code, j=interpreted, Vv=VM code, C=native code)
V  [libjvm.so+0x1a07297]  VMError::report_and_die(int, char const*, char const*, __va_list_tag*, Thread*, unsigned char*, void*, void*, char const*, int, unsigned long)+0x187
V  [libjvm.so+0x1a082ff]  VMError::report_and_die(Thread*, void*, char const*, int, char const*, char const*, __va_list_tag*)+0x2f
V  [libjvm.so+0xc296ba]  report_vm_error(char const*, int, char const*, char const*, ...)+0x12a
V  [libjvm.so+0xee0973]  GraphKit::add_exception_state(SafePointNode*)+0x303
V  [libjvm.so+0xee0ac3]  GraphKit::add_exception_states_from(JVMState*)+0x53
V  [libjvm.so+0x93911b]  PredictedCallGenerator::generate(JVMState*)+0x1bb
V  [libjvm.so+0xd3100a]  Parse::do_call()+0x50a
V  [libjvm.so+0x169fddb]  Parse::do_one_bytecode()+0x58b
V  [libjvm.so+0x169085a]  Parse::do_one_block()+0x39a
V  [libjvm.so+0x16913d5]  Parse::do_all_blocks()+0x1a5
V  [libjvm.so+0x1694afa]  Parse::Parse(JVMState*, ciMethod*, float)+0xd0a
V  [libjvm.so+0x933fbc]  ParseGenerator::generate(JVMState*)+0x1fc
V  [libjvm.so+0x9390fd]  PredictedCallGenerator::generate(JVMState*)+0x19d
V  [libjvm.so+0xd3100a]  Parse::do_call()+0x50a
V  [libjvm.so+0x169fddb]  Parse::do_one_bytecode()+0x58b
V  [libjvm.so+0x169085a]  Parse::do_one_block()+0x39a
V  [libjvm.so+0x16913d5]  Parse::do_all_blocks()+0x1a5
V  [libjvm.so+0x1694afa]  Parse::Parse(JVMState*, ciMethod*, float)+0xd0a
V  [libjvm.so+0x933fbc]  ParseGenerator::generate(JVMState*)+0x1fc
V  [libjvm.so+0x9390fd]  PredictedCallGenerator::generate(JVMState*)+0x19d
V  [libjvm.so+0xd3100a]  Parse::do_call()+0x50a
V  [libjvm.so+0x169fddb]  Parse::do_one_bytecode()+0x58b
V  [libjvm.so+0x169085a]  Parse::do_one_block()+0x39a
V  [libjvm.so+0x16913d5]  Parse::do_all_blocks()+0x1a5
V  [libjvm.so+0x1694afa]  Parse::Parse(JVMState*, ciMethod*, float)+0xd0a
V  [libjvm.so+0x933fbc]  ParseGenerator::generate(JVMState*)+0x1fc
V  [libjvm.so+0xd3100a]  Parse::do_call()+0x50a
V  [libjvm.so+0x169fddb]  Parse::do_one_bytecode()+0x58b
V  [libjvm.so+0x169085a]  Parse::do_one_block()+0x39a
V  [libjvm.so+0x16913d5]  Parse::do_all_blocks()+0x1a5
V  [libjvm.so+0x1694afa]  Parse::Parse(JVMState*, ciMethod*, float)+0xd0a
V  [libjvm.so+0x933fbc]  ParseGenerator::generate(JVMState*)+0x1fc
V  [libjvm.so+0xb420df]  Compile::Compile(ciEnv*, C2Compiler*, ciMethod*, int, bool, bool, bool, DirectiveSet*)+0x100f
V  [libjvm.so+0x932342]  C2Compiler::compile_method(ciEnv*, ciMethod*, int, DirectiveSet*)+0x302
V  [libjvm.so+0xb4f8e0]  CompileBroker::invoke_compiler_on_method(CompileTask*)+0x3c0
V  [libjvm.so+0xb505c9]  CompileBroker::compiler_thread_loop()+0x269
V  [libjvm.so+0x1948867]  JavaThread::thread_main_inner()+0x287
V  [libjvm.so+0x1948ac1]  JavaThread::run()+0x191
Comments
Fix Request (11u) This fixes C2 bug and keeps codebases in sync (I see 11.0.6-oracle). Patch applies cleanly to 11u, passes tier1, tier2 tests. New test cases fail without the fix, pass with it.
02-09-2019

The problem is that the _clone intrinsic sets the reexecute bit and with bimorphic inlining, it can happen that the fast path has reexecute == true and the slow path has reexecute = false. The same issue was fixed by JDK-8033626 but the fix is not complete. http://cr.openjdk.java.net/~thartmann/8209833/webrev.00/
22-08-2018

ILW = Assert during C2 compilation because of inconsistent reexecution bit in JVM State, easy to reproduce but edge case, disable clone intrinsic or bimorphic inlining = HLM = P3
22-08-2018