JDK-8246453 : TestClone crashes with "all collected exceptions must come from the same place"
  • Type: Bug
  • Component: hotspot
  • Sub-Component: compiler
  • Affected Version: 11,15
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2020-06-03
  • Updated: 2020-06-24
  • Resolved: 2020-06-08
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 15
11.0.9-oracleFixed 15 b27Fixed
Related Reports
Relates :  
Description
compiler.intrinsics.object.TestClone::test2 fails with -XX:+StressReflectiveCode:

#
# A fatal error has been detected by the Java Runtime Environment:
#
#  Internal Error (/oracle/jdk_jdk/open/src/hotspot/share/opto/graphKit.cpp:245), pid=2649, tid=2656
#  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 (15.0) (fastdebug build 15-internal+0-2020-05-26-1033362.tobias...)
# Java VM: Java HotSpot(TM) 64-Bit Server VM (fastdebug 15-internal+0-2020-05-26-1033362.tobias..., mixed mode, tiered, compressed oops, serial gc, linux-amd64)
# Problematic frame:
# V  [libjvm.so+0xbe07b4]  GraphKit::add_exception_state(SafePointNode*) [clone .part.0]+0x454
#
# Core dump will be written. Default location: Core dumps may be processed with "/usr/share/apport/apport %p %s %c %d %P" (or dumping to /oracle/jdk_jdk/open/JTwork/scratch/core.2649)
#
# If you would like to submit a bug report, please visit:
#   https://bugreport.java.com/bugreport/crash.jsp
#

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

Command Line: -XX:+ReplayCompiles -XX:+ReplayIgnoreInitErrors -XX:ReplayDataFile=replay_pid2551.log -XX:+StressReflectiveCode 

Host: prometheus, Intel(R) Core(TM) i7-6820HQ CPU @ 2.70GHz, 1 cores, 15G, Ubuntu 18.04.4 LTS
Time: Wed Jun  3 11:14:22 2020 CEST elapsed time: 0.995438 seconds (0d 0h 0m 0s)

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

Current thread (0x00007fd6902279c0):  JavaThread "C2 CompilerThread0" daemon [_thread_in_native, id=2656, stack(0x00007fd673dff000,0x00007fd673f00000)]


Current CompileTask:
C2:    995   30   !b  4       compiler.intrinsics.object.TestClone::test2 (17 bytes)

Stack: [0x00007fd673dff000,0x00007fd673f00000],  sp=0x00007fd673efc590,  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+0xbe07b4]  GraphKit::add_exception_state(SafePointNode*) [clone .part.0]+0x454
V  [libjvm.so+0xbe0f60]  GraphKit::add_exception_states_from(JVMState*)+0x60
V  [libjvm.so+0x754a0e]  PredictedCallGenerator::generate(JVMState*)+0x33e
V  [libjvm.so+0xa2f171]  Parse::do_call()+0x551
V  [libjvm.so+0x13f33c6]  Parse::do_one_bytecode()+0x2f06
V  [libjvm.so+0x13de0d1]  Parse::do_one_block()+0x601
V  [libjvm.so+0x13defbf]  Parse::do_all_blocks()+0x11f
V  [libjvm.so+0x13e3524]  Parse::Parse(JVMState*, ciMethod*, float)+0xbd4
V  [libjvm.so+0x74d825]  ParseGenerator::generate(JVMState*)+0x115
V  [libjvm.so+0xa2f171]  Parse::do_call()+0x551
V  [libjvm.so+0x13f33c6]  Parse::do_one_bytecode()+0x2f06
V  [libjvm.so+0x13de0d1]  Parse::do_one_block()+0x601
V  [libjvm.so+0x13defbf]  Parse::do_all_blocks()+0x11f
V  [libjvm.so+0x13e3524]  Parse::Parse(JVMState*, ciMethod*, float)+0xbd4
V  [libjvm.so+0x74d825]  ParseGenerator::generate(JVMState*)+0x115
V  [libjvm.so+0x8fe620]  Compile::Compile(ciEnv*, ciMethod*, int, bool, bool, bool, DirectiveSet*)+0xd10
V  [libjvm.so+0x74c125]  C2Compiler::compile_method(ciEnv*, ciMethod*, int, DirectiveSet*)+0x175
V  [libjvm.so+0x90d76e]  CompileBroker::invoke_compiler_on_method(CompileTask*)+0x45e
V  [libjvm.so+0x90ee08]  CompileBroker::compiler_thread_loop()+0x6b8
V  [libjvm.so+0x169383c]  JavaThread::thread_main_inner()+0x21c
V  [libjvm.so+0x1699660]  Thread::call_run()+0x100
V  [libjvm.so+0x139eb86]  thread_native_entry(Thread*)+0x116
Comments
Fix request (11u) -- will label after testing completed. I would like to downport this for parity with 11.0.9-oracle. Applies clean.
22-06-2020

URL: https://hg.openjdk.java.net/jdk/jdk/rev/6a4bdf4655ce User: thartmann Date: 2020-06-08 06:31:20 +0000
08-06-2020

http://cr.openjdk.java.net/~thartmann/8246453/webrev.01/
04-06-2020

Similar to old JDK-8033626 [1], we assert when trying to merge two JVMStates with different reexecute settings. This only happens with -XX:+StressReflectiveCode because in that case we don't fold the array guard and emit code to allocate the array to be cloned into. The fix is to simply set deoptimize_on_exception for that allocation as well (we already set it for the non-array case). http://cr.openjdk.java.net/~thartmann/8246453/webrev.00/
03-06-2020

ILW = Assert during C2 compilation, with single test and debug stress option (could also happen without), disable clone intrinsic = HLM = P3
03-06-2020