JDK-8033626 : 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: hs25,8u20
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2014-02-05
  • Updated: 2018-08-22
  • Resolved: 2014-06-17
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 8 JDK 9
8u20 b20Fixed 9Fixed
Related Reports
Relates :  
Description
The hs_err head is
#
# A fatal error has been detected by the Java Runtime Environment:
#
#  Internal Error (/opt/jprt/T/P1/163049.jesper/s/src/share/vm/opto/graphKit.cpp:236), pid=63733, tid=30723
#  assert(ex_map->jvms()->same_calls_as(_exceptions->jvms())) failed: all collected exceptions must come from the same place
#
# JRE version: Java(TM) SE Runtime Environment (8.0-b128) (build 1.8.0-fastdebug-b128)
# Java VM: Java HotSpot(TM) 64-Bit Server VM (25.20-b03-internal-201402041630.jesper.hotspot-fastdebug mixed mode bsd-amd64 compressed oops)
# Failed to write core dump. Core dumps have been disabled. To enable core dumping, try "ulimit -c unlimited" before starting Java again
#
# If you would like to submit a bug report, please visit:
#   http://bugreport.sun.com/bugreport/crash.jsp
#

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

Current thread (0x00007fe64d13a800):  JavaThread "C2 CompilerThread0" daemon [_thread_in_native, id=30723, stack(0x00000001e2f06000,0x00000001e3006000)]

Stack: [0x00000001e2f06000,0x00000001e3006000],  sp=0x00000001e30031e0,  free space=1012k
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
V  [libjvm.dylib+0x8a91fc]  VMError::report_and_die()+0x45e
V  [libjvm.dylib+0x3013bd]  report_vm_error(char const*, int, char const*, char const*)+0x63
V  [libjvm.dylib+0x3e7a5c]  GraphKit::add_exception_state(SafePointNode*)+0x8c
V  [libjvm.dylib+0x3ead37]  GraphKit::add_exception_states_from(JVMState*)+0x4f
V  [libjvm.dylib+0x210ff8]  PredictedCallGenerator::generate(JVMState*, Parse*)+0x2ca
V  [libjvm.dylib+0x35ddf9]  Parse::do_call()+0x48d
V  [libjvm.dylib+0x72d10b]  Parse::do_one_bytecode()+0x4547
V  [libjvm.dylib+0x72164e]  Parse::do_one_block()+0x322
V  [libjvm.dylib+0x721a22]  Parse::do_all_blocks()+0x2f6
V  [libjvm.dylib+0x72403d]  Parse::Parse(JVMState*, ciMethod*, float, Parse*)+0x8e5
V  [libjvm.dylib+0x21301c]  ParseGenerator::generate(JVMState*, Parse*)+0x9e
V  [libjvm.dylib+0x35ddf9]  Parse::do_call()+0x48d
V  [libjvm.dylib+0x72d10b]  Parse::do_one_bytecode()+0x4547
V  [libjvm.dylib+0x72164e]  Parse::do_one_block()+0x322
V  [libjvm.dylib+0x721a22]  Parse::do_all_blocks()+0x2f6
V  [libjvm.dylib+0x72403d]  Parse::Parse(JVMState*, ciMethod*, float, Parse*)+0x8e5
V  [libjvm.dylib+0x21301c]  ParseGenerator::generate(JVMState*, Parse*)+0x9e
V  [libjvm.dylib+0x2abac0]  Compile::Compile(ciEnv*, C2Compiler*, ciMethod*, int, bool, bool, bool)+0x982
V  [libjvm.dylib+0x20facc]  C2Compiler::compile_method(ciEnv*, ciMethod*, int)+0x102
V  [libjvm.dylib+0x2b1a6f]  CompileBroker::invoke_compiler_on_method(CompileTask*)+0x651
V  [libjvm.dylib+0x2b4743]  CompileBroker::compiler_thread_loop()+0x32d
V  [libjvm.dylib+0x8388b7]  JavaThread::thread_main_inner()+0x185
V  [libjvm.dylib+0x83b2aa]  JavaThread::run()+0x2a2
V  [libjvm.dylib+0x6feb05]  java_start(Thread*)+0x105
C  [libsystem_c.dylib+0x147a2]  _pthread_start+0x147
C  [libsystem_c.dylib+0x11e1]  thread_start+0xd
Comments
For polymorphic case of Object::clone call site, call generator of the following shape is used: PredictedCallGenerator _if_hit: LibraryIntrinsic (LibraryCallKit::inline_native_clone) _if_missed: VirtualCallGenerator The problem is that Object::clone intrinsic is generated with reexecute=true, while the branch with virtual dispatch has reexecute=false. The assert is hit when we try to merge exception state of these 2 branches.
09-06-2014

The problematic IR shape was introduced by JDK-8014447.
28-05-2014

(gdb) print JVMState::dump(kit._exceptions->_jvms) 825 CreateEx === 822 815 [[ 824 ]] #java/lang/Throwable:NotNull * Oop:java/lang/Throwable:NotNull * !jvms: NodeImpl::cloneNode @ bci:12 10 Parm === 3 [[ 4 19 22 22 83 30 45 35 35 813 776 62 62 70 72 72 73 73 786 86 83 795 824 803 803 810 812 824 813 ]] Parm0: org/apache/xerces/dom/NodeImpl:NotNull * Oop:org/apache/xerces/dom/NodeImpl:NotNull * !jvms: NodeImpl::cloneNode @ bci:-1 9 Parm === 3 [[ 4 13 19 22 24 30 45 59 72 83 86 91 93 95 100 102 122 128 130 133 139 159 263 186 204 218 241 279 294 303 309 327 324 329 343 349 351 673 360 371 385 686 396 398 406 422 439 455 472 487 699 516 534 551 572 588 605 620 639 656 727 747 737 795 812 824 847 858 ]] ReturnAdr !jvms: NodeImpl::cloneNode @ bci:-1 8 Parm === 3 [[ 4 13 19 22 24 30 45 59 72 73 83 86 91 93 95 100 102 122 128 130 133 139 159 263 190 186 208 204 218 245 241 267 283 279 298 294 303 309 327 313 324 329 343 349 351 686 360 371 385 703 396 398 410 406 426 422 443 439 459 455 476 472 491 487 699 520 516 538 534 555 551 576 572 592 588 609 605 624 620 643 639 660 656 677 673 727 747 737 795 812 813 824 847 850 858 875 ]] FramePtr !jvms: NodeImpl::cloneNode @ bci:-1 823 MergeMem === _ 1 816 1 [[ 824 ]] { - } Memory: @BotPTR *+bot, idx=Bot; !jvms: NodeImpl::cloneNode @ bci:12 815 Proj === 813 [[ 812 820 824 825 ]] #1 !jvms: NodeImpl::cloneNode @ bci:12 822 CatchProj === 820 [[ 824 825 ]] #1@bci -1 !jvms: NodeImpl::cloneNode @ bci:12 824 SafePoint === 822 815 823 8 9 10 1 1 1 10 1 1 1 1 825 [[]] SafePoint !orig=812,59,24,22,19 JVMS depth=1 loc=5 stk=9 arg=9 mon=14 scalar=14 end=14 mondepth=0 sp=0 bci=12 reexecute=false method=virtual jobject org.apache.xerces.dom.NodeImpl.cloneNode(jboolean) bc: 12 invokevirtual 401 <java/lang/Object.clone()Ljava/lang/Object;> 64 bci: 12 VirtualCallData count(0) entries(0)
28-05-2014

virtual jobject org.apache.xerces.dom.NodeImpl.cloneNode(jboolean) bc: 12 invokevirtual java/lang/Object.clone()Ljava/lang/Object; PredictedCallGenerator _if_missed: VirtualCallGenerator _if_hit: LibraryIntrinsic (Object::clone) (gdb) print JVMState::dump(new_jvms) 858 SafePoint === 856 853 857 8 9 810 1 1 1 810 1 1 1 1 859 [[ 59 ]] SafePoint !orig=847,59,24,22,19 867 CheckCastPP === 864 862 [[ 869 869 833 59 ]] #org/apache/xerces/dom/DeferredTextImpl:NotNull:exact * Oop:org/apache/xerces/dom/DeferredTextImpl:NotNull:exact * !jvms: NodeImpl::cloneNode @ bci:12 810 CheckCastPP === 808 10 [[ 59 868 826 826 847 847 850 850 858 858 868 ]] #org/apache/xerces/dom/DeferredTextImpl:NotNull:exact * Oop:org/apache/xerces/dom/DeferredTextImpl:NotNull:exact * !jvms: NodeImpl::cloneNode @ bci:12 9 Parm === 3 [[ 4 13 19 22 24 30 45 59 72 83 86 91 93 95 100 102 122 128 130 133 139 159 263 186 204 218 241 279 294 303 309 327 324 329 343 349 351 673 360 371 385 686 396 398 406 422 439 455 472 487 699 516 534 551 572 588 605 620 639 656 727 747 737 795 812 824 847 858 ]] ReturnAdr !jvms: NodeImpl::cloneNode @ bci:-1 8 Parm === 3 [[ 4 13 19 22 24 30 45 59 72 73 83 86 91 93 95 100 102 122 128 130 133 139 159 263 190 186 208 204 218 245 241 267 283 279 298 294 303 309 327 313 324 329 343 349 351 686 360 371 385 703 396 398 410 406 426 422 443 439 459 455 476 472 491 487 699 520 516 538 534 555 551 576 572 592 588 609 605 624 620 643 639 660 656 677 673 727 747 737 795 812 813 824 847 850 858 875 ]] FramePtr !jvms: NodeImpl::cloneNode @ bci:-1 883 MergeMem === _ 1 881 1 [[ 59 ]] { - } Memory: @BotPTR *+bot, idx=Bot; !jvms: NodeImpl::cloneNode @ bci:12 861 Proj === 850 [[ 847 834 59 ]] #1 !jvms: NodeImpl::cloneNode @ bci:12 832 Region === _ _ _ _ 880 [[ 835 833 834 59 ]] !jvms: NodeImpl::cloneNode @ bci:12 59 SafePoint === 832 861 883 8 9 810 1 1 1 867 1 1 1 1 | 858 [[]] SafePoint !orig=24,22,19 JVMS depth=1 loc=5 stk=9 arg=10 mon=14 scalar=14 end=14 mondepth=0 sp=1 bci=12 reexecute=false method=virtual jobject org.apache.xerces.dom.NodeImpl.cloneNode(jboolean) bc: 12 invokevirtual 401 <java/lang/Object.clone()Ljava/lang/Object;> 64 bci: 12 VirtualCallData count(0) entries(0) 1 exception: 858 SafePoint === 856 853 857 8 9 810 1 1 1 810 1 1 1 1 859 [[ 59 ]] SafePoint !orig=847,59,24,22,19 (gdb) print 'SafePointNode::next_exception() const'(new_jvms->_map) $28 = (SafePointNode *) 0x6586089c (gdb) call JVMState::dump($28->_jvms) 859 CreateEx === 856 853 [[ 858 ]] #java/lang/Throwable:NotNull * Oop:java/lang/Throwable:NotNull * !jvms: NodeImpl::cloneNode @ bci:12 810 CheckCastPP === 808 10 [[ 59 868 826 826 847 847 850 850 858 858 868 ]] #org/apache/xerces/dom/DeferredTextImpl:NotNull:exact * Oop:org/apache/xerces/dom/DeferredTextImpl:NotNull:exact * !jvms: NodeImpl::cloneNode @ bci:12 9 Parm === 3 [[ 4 13 19 22 24 30 45 59 72 83 86 91 93 95 100 102 122 128 130 133 139 159 263 186 204 218 241 279 294 303 309 327 324 329 343 349 351 673 360 371 385 686 396 398 406 422 439 455 472 487 699 516 534 551 572 588 605 620 639 656 727 747 737 795 812 824 847 858 ]] ReturnAdr !jvms: NodeImpl::cloneNode @ bci:-1 8 Parm === 3 [[ 4 13 19 22 24 30 45 59 72 73 83 86 91 93 95 100 102 122 128 130 133 139 159 263 190 186 208 204 218 245 241 267 283 279 298 294 303 309 327 313 324 329 343 349 351 686 360 371 385 703 396 398 410 406 426 422 443 439 459 455 476 472 491 487 699 520 516 538 534 555 551 576 572 592 588 609 605 624 620 643 639 660 656 677 673 727 747 737 795 812 813 824 847 850 858 875 ]] FramePtr !jvms: NodeImpl::cloneNode @ bci:-1 857 MergeMem === _ 1 830 852 [[ 858 ]] { N852:rawptr:BotPTR } Memory: @BotPTR *+bot, idx=Bot; !jvms: NodeImpl::cloneNode @ bci:12 853 Proj === 850 [[ 854 858 859 ]] #1 (i_o_use) !jvms: NodeImpl::cloneNode @ bci:12 856 CatchProj === 854 [[ 858 859 ]] #1@bci -1 !jvms: NodeImpl::cloneNode @ bci:12 858 SafePoint === 856 853 857 8 9 810 1 1 1 810 1 1 1 1 859 [[ 59 ]] SafePoint !orig=847,59,24,22,19 JVMS depth=1 loc=5 stk=9 arg=9 mon=14 scalar=14 end=14 mondepth=0 sp=0 bci=12 reexecute=true method=virtual jobject org.apache.xerces.dom.NodeImpl.cloneNode(jboolean) bc: 12 invokevirtual 401 <java/lang/Object.clone()Ljava/lang/Object;> 64 bci: 12 VirtualCallData count(0) entries(0)
28-05-2014

The culprit is reexecute: JVMS ... reexecute=true ... vs JVMS ... reexecute=false ...
27-05-2014

(gdb) frame #6 0x0111ed32 in GraphKit::add_exception_state (this=0x657bec68, ex_map=0x9884c44) at /scratch/vlivanov/jdk8u/src/share/vm/opto/graphKit.cpp:236 (gdb) call JVMState::dump(ex_map->_jvms) 859 CreateEx === 856 853 [[ 858 ]] #java/lang/Throwable:NotNull * Oop:java/lang/Throwable:NotNull * !jvms: NodeImpl::cloneNode @ bci:12 810 CheckCastPP === 808 10 [[ 59 868 826 826 847 847 850 850 858 858 868 ]] #org/apache/xerces/dom/DeferredTextImpl:NotNull:exact * Oop:org/apache/xerces/dom/DeferredTextImpl:NotNull:exact * !jvms: NodeImpl::cloneNode @ bci:12 9 Parm === 3 [[ 4 13 19 22 24 30 45 59 72 83 86 91 93 95 100 102 122 128 130 133 139 159 263 186 204 218 241 279 294 303 309 327 324 329 343 349 351 673 360 371 385 686 396 398 406 422 439 455 472 487 699 516 534 551 572 588 605 620 639 656 727 747 737 795 812 824 847 858 ]] ReturnAdr !jvms: NodeImpl::cloneNode @ bci:-1 8 Parm === 3 [[ 4 13 19 22 24 30 45 59 72 73 83 86 91 93 95 100 102 122 128 130 133 139 159 263 190 186 208 204 218 245 241 267 283 279 298 294 303 309 327 313 324 329 343 349 351 686 360 371 385 703 396 398 410 406 426 422 443 439 459 455 476 472 491 487 699 520 516 538 534 555 551 576 572 592 588 609 605 624 620 643 639 660 656 677 673 727 747 737 795 812 813 824 847 850 858 875 ]] FramePtr !jvms: NodeImpl::cloneNode @ bci:-1 857 MergeMem === _ 1 830 852 [[ 858 ]] { N852:rawptr:BotPTR } Memory: @BotPTR *+bot, idx=Bot; !jvms: NodeImpl::cloneNode @ bci:12 853 Proj === 850 [[ 854 858 859 ]] #1 (i_o_use) !jvms: NodeImpl::cloneNode @ bci:12 856 CatchProj === 854 [[ 858 859 ]] #1@bci -1 !jvms: NodeImpl::cloneNode @ bci:12 858 SafePoint === 856 853 857 8 9 810 1 1 1 810 1 1 1 1 859 [[]] SafePoint !orig=847,59,24,22,19 JVMS depth=1 loc=5 stk=9 arg=9 mon=14 scalar=14 end=14 mondepth=0 sp=0 bci=12 reexecute=true method=virtual jobject org.apache.xerces.dom.NodeImpl.cloneNode(jboolean) bc: 12 invokevirtual 401 <java/lang/Object.clone()Ljava/lang/Object;> 64 bci: 12 VirtualCallData count(0) entries(0) (gdb) call JVMState::dump(this->_exceptions->_jvms) 825 CreateEx === 822 815 [[ 824 ]] #java/lang/Throwable:NotNull * Oop:java/lang/Throwable:NotNull * !jvms: NodeImpl::cloneNode @ bci:12 10 Parm === 3 [[ 4 19 22 22 83 30 45 35 35 813 776 62 62 70 72 72 73 73 786 86 83 795 824 803 803 810 812 824 813 ]] Parm0: org/apache/xerces/dom/NodeImpl:NotNull * Oop:org/apache/xerces/dom/NodeImpl:NotNull * !jvms: NodeImpl::cloneNode @ bci:-1 9 Parm === 3 [[ 4 13 19 22 24 30 45 59 72 83 86 91 93 95 100 102 122 128 130 133 139 159 263 186 204 218 241 279 294 303 309 327 324 329 343 349 351 673 360 371 385 686 396 398 406 422 439 455 472 487 699 516 534 551 572 588 605 620 639 656 727 747 737 795 812 824 847 858 ]] ReturnAdr !jvms: NodeImpl::cloneNode @ bci:-1 8 Parm === 3 [[ 4 13 19 22 24 30 45 59 72 73 83 86 91 93 95 100 102 122 128 130 133 139 159 263 190 186 208 204 218 245 241 267 283 279 298 294 303 309 327 313 324 329 343 349 351 686 360 371 385 703 396 398 410 406 426 422 443 439 459 455 476 472 491 487 699 520 516 538 534 555 551 576 572 592 588 609 605 624 620 643 639 660 656 677 673 727 747 737 795 812 813 824 847 850 858 875 ]] FramePtr !jvms: NodeImpl::cloneNode @ bci:-1 823 MergeMem === _ 1 816 1 [[ 824 ]] { - } Memory: @BotPTR *+bot, idx=Bot; !jvms: NodeImpl::cloneNode @ bci:12 815 Proj === 813 [[ 812 820 824 825 ]] #1 !jvms: NodeImpl::cloneNode @ bci:12 822 CatchProj === 820 [[ 824 825 ]] #1@bci -1 !jvms: NodeImpl::cloneNode @ bci:12 824 SafePoint === 822 815 823 8 9 10 1 1 1 10 1 1 1 1 825 [[]] SafePoint !orig=812,59,24,22,19 JVMS depth=1 loc=5 stk=9 arg=9 mon=14 scalar=14 end=14 mondepth=0 sp=0 bci=12 reexecute=false method=virtual jobject org.apache.xerces.dom.NodeImpl.cloneNode(jboolean) bc: 12 invokevirtual 401 <java/lang/Object.clone()Ljava/lang/Object;> 64 bci: 12 VirtualCallData count(0) entries(0)
27-05-2014

since we don't know if product build is affected, I'd prefer to consider Impact=H/M, so ILW=(H/M)LH=>P2/P4=>P3
22-05-2014

ILW = ML(H?) = P4 I = M = assertion failure; no evidences it fails in product mode L = L = fails very rarely W = H? = since the root cause is unknown and I'm not able to reproduce the problem, workaround is unknown as well
21-05-2014