JDK-8233164 : C2 fails with assert(phase->C->get_alias_index(t) == phase->C->get_alias_index(t_adr)) failed: correct memory chain
  • Type: Bug
  • Component: hotspot
  • Sub-Component: compiler
  • Affected Version: 11,13,14
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2019-10-29
  • Updated: 2020-12-22
  • Resolved: 2019-12-23
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 14 JDK 15
11.0.11-oracleFixed 14 b30Fixed 15Fixed
Related Reports
Relates :  
Relates :  
Description
Test runtime/SelectionResolution/InvokeInterfaceICCE.java crashes with 


# A fatal error has been detected by the Java Runtime Environment:
#
#  Internal Error (open/src/hotspot/share/opto/memnode.cpp:222), pid=22191, tid=22323
#  assert(phase->C->get_alias_index(t) == phase->C->get_alias_index(t_adr)) failed: correct memory chain
#
# JRE version: Java(TM) SE Runtime Environment (14.0+20) (fastdebug build 14-ea+20-879)
# Java VM: Java HotSpot(TM) 64-Bit Server VM (fastdebug 14-ea+20-879, mixed mode, sharing, tiered, compressed oops, g1 gc, linux-amd64)
# Problematic frame:
# V  [libjvm.so+0x12ee114]  MemNode::optimize_memory_chain(Node*, TypePtr const*, Node*, PhaseGVN*)+0x184
#
# Core dump will be written. Default location: Core dumps may be processed with "/opt/core.sh %p" (or dumping to /opt/mach5/mesos/work_dir/slaves/6e54f4af-e606-43b0-80ce-0a482a5988b6-S216/frameworks/1735e8a2-a1db-478c-8104-60c8b0af87dd-0196/executors/ee4cd1b9-b909-4e68-9189-0cacc86e5aef/runs/aa563094-e983-466d-bf37-8fc0c597325d/testoutput/test-support/jtreg_open_test_hotspot_jtreg_hotspot_tier2_runtime_platform_agnostic/scratch/3/core.22191)
#
# If you would like to submit a bug report, please visit:
#   http://bugreport.java.com/bugreport/crash.jsp
#

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

Command Line: -Dtest.class.path.prefix=/opt/mach5/mesos/work_dir/slaves/6e54f4af-e606-43b0-80ce-0a482a5988b6-S216/frameworks/1735e8a2-a1db-478c-8104-60c8b0af87dd-0196/executors/ee4cd1b9-b909-4e68-9189-0cacc86e5aef/runs/aa563094-e983-466d-bf37-8fc0c597325d/testoutput/test-support/jtreg_open_test_hotspot_jtreg_hotspot_tier2_runtime_platform_agnostic/classes/3/runtime/SelectionResolution/InvokeInterfaceICCE.d:/opt/mach5/mesos/work_dir/jib-master/install/jdk-14+20-879/src.full/open/test/hotspot/jtreg/runtime/SelectionResolution:/opt/mach5/mesos/work_dir/slaves/6e54f4af-e606-43b0-80ce-0a482a5988b6-S216/frameworks/1735e8a2-a1db-478c-8104-60c8b0af87dd-0196/executors/ee4cd1b9-b909-4e68-9189-0cacc86e5aef/runs/aa563094-e983-466d-bf37-8fc0c597325d/testoutput/test-support/jtreg_open_test_hotspot_jtreg_hotspot_tier2_runtime_platform_agnostic/classes/3/runtime/SelectionResolution/classes -Dtest.src=/opt/mach5/mesos/work_dir/jib-master/install/jdk-14+20-879/src.full/open/test/hotspot/jtreg/runtime/SelectionResolution -Dtest.src.path=/opt/mach5/mesos/work_dir/jib-master/install/jdk-14+20-879/src.full/open/test/hotspot/jtreg/runtime/SelectionResolution:/opt/mach5/mesos/work_dir/jib-master/install/jdk-14+20-879/src.full/open/test/hotspot/jtreg/runtime/SelectionResolution/classes -Dtest.classes=/opt/mach5/mesos/work_dir/slaves/6e54f4af-e606-43b0-80ce-0a482a5988b6-S216/frameworks/1735e8a2-a1db-478c-8104-60c8b0af87dd-0196/executors/ee4cd1b9-b909-4e68-9189-0cacc86e5aef/runs/aa563094-e983-466d-bf37-8fc0c597325d/testoutput/test-support/jtreg_open_test_hotspot_jtreg_hotspot_tier2_runtime_platform_agnostic/classes/3/runtime/SelectionResolution/InvokeInterfaceICCE.d -Dtest.class.path=/opt/mach5/mesos/work_dir/slaves/6e54f4af-e606-43b0-80ce-0a482a5988b6-S216/frameworks/1735e8a2-a1db-478c-8104-60c8b0af87dd-0196/executors/ee4cd1b9-b909-4e68-9189-0cacc86e5aef/runs/aa563094-e983-466d-bf37-8fc0c597325d/testoutput/test-support/jtreg_open_test_hotspot_jtreg_hotspot_tier2_runtime_platform_agnostic/classes/3/runtime/SelectionResolution/InvokeInterfaceICCE.d:/opt/mach5/mesos/work_dir/slaves/6e54f4af-e606-43b0-80ce-0a482a5988b6-S216/frameworks/1735e8a2-a1db-478c-8104-60c8b0af87dd-0196/executors/ee4cd1b9-b909-4e68-9189-0cacc86e5aef/runs/aa563094-e983-466d-bf37-8fc0c597325d/testoutput/test-support/jtreg_open_test_hotspot_jtreg_hotspot_tier2_runtime_platform_agnostic/classes/3/runtime/SelectionResolution/classes -Dtest.vm.opts=-XX:MaxRAMPercentage=6 -Dtest.tool.vm.opts=-J-XX:MaxRAMPercentage=6 -Dtest.compiler.opts= -Dtest.java.opts= -Dtest.jdk=/opt/mach5/mesos/work_dir/jib-master/install/jdk-14+20-879/linux-x64-debug.jdk/jdk-14/fastdebug -Dcompile.jdk=/opt/mach5/mesos/work_dir/jib-master/install/jdk-14+20-879/linux-x64-debug.jdk/jdk-14/fastdebug -Dtest.timeout.factor=4.0 -Dtest.root=/opt/mach5/mesos/work_dir/jib-master/install/jdk-14+20-879/src.full/open/test/hotspot/jtreg -Dtest.modules=java.base/jdk.internal.org.objectweb.asm -Dtest.nativepath=/opt/mach5/mesos/work_dir/jib-master/install/jdk-14+20-879/linux-x64-debug.test/hotspot/jtreg/native --add-modules=java.base --add-exports=java.base/jdk.internal.org.objectweb.asm=ALL-UNNAMED -XX:MaxRAMPercentage=6 -Djava.library.path=/opt/mach5/mesos/work_dir/jib-master/install/jdk-14+20-879/linux-x64-debug.test/hotspot/jtreg/native -XX:+IgnoreUnrecognizedVMOptions -XX:-VerifyDependencies com.sun.javatest.regtest.agent.MainWrapper /opt/mach5/mesos/work_dir/slaves/6e54f4af-e606-43b0-80ce-0a482a5988b6-S216/frameworks/1735e8a2-a1db-478c-8104-60c8b0af87dd-0196/executors/ee4cd1b9-b909-4e68-9189-0cacc86e5aef/runs/aa563094-e983-466d-bf37-8fc0c597325d/testoutput/test-support/jtreg_open_test_hotspot_jtreg_hotspot_tier2_runtime_platform_agnostic/runtime/SelectionResolution/InvokeInterfaceICCE.d/main.0.jta

Host: Intel(R) Xeon(R) Platinum 8167M CPU @ 2.00GHz, 8 cores, 58G, Oracle Linux Server release 7.6
Time: Sat Oct 26 06:39:31 2019 UTC elapsed time: 10 seconds (0d 0h 0m 10s)

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

Current thread (0x00007ff5c453b800):  JavaThread "C2 CompilerThread1" daemon [_thread_in_native, id=22323, stack(0x00007ff5d7675000,0x00007ff5d7776000)]


Current CompileTask:
C2:  10989  866       4       selectionresolution.ClassBuilder::buildClassConstructs (214 bytes)

Stack: [0x00007ff5d7675000,0x00007ff5d7776000],  sp=0x00007ff5d77713e0,  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+0x12ee114]  MemNode::optimize_memory_chain(Node*, TypePtr const*, Node*, PhaseGVN*)+0x184
V  [libjvm.so+0x12f2ec6]  LoadNode::Ideal(PhaseGVN*, bool)+0x2f6
V  [libjvm.so+0x14accb0]  PhaseIterGVN::transform_old(Node*)+0xe0
V  [libjvm.so+0x14ad8ad]  PhaseIterGVN::optimize()+0x5d
V  [libjvm.so+0x9d31ea]  Compile::Optimize()+0x65a
V  [libjvm.so+0x9d4c34]  Compile::Compile(ciEnv*, C2Compiler*, ciMethod*, int, bool, bool, bool, DirectiveSet*)+0x1094
V  [libjvm.so+0x81b760]  C2Compiler::compile_method(ciEnv*, ciMethod*, int, DirectiveSet*)+0x110
V  [libjvm.so+0x9e104c]  CompileBroker::invoke_compiler_on_method(CompileTask*)+0x2cc
V  [libjvm.so+0x9e1ff8]  CompileBroker::compiler_thread_loop()+0x468
V  [libjvm.so+0x16ece36]  JavaThread::thread_main_inner()+0x226
V  [libjvm.so+0x16f2626]  Thread::call_run()+0xf6
V  [libjvm.so+0x14150ae]  thread_native_entry(Thread*)+0x10e

Register to memory mapping:

RAX=0x00007ff616ebd000 points into unknown readable memory: 58 00 00 00 00 00 00 00
RBX=0x00007ff5c4139a90 points into unknown readable memory: c0 54 0a 16 f6 7f 00 00
RCX=0x00007ff615e0a88c: <offset 0x0000000001a5588c> in /opt/mach5/mesos/work_dir/jib-master/install/jdk-14+20-879/linux-x64-debug.jdk/jdk-14/fastdebug/lib/server/libjvm.so at 0x00007ff6143b5000
RDX=0x00007ff615d5c7c0: <offset 0x00000000019a77c0> in /opt/mach5/mesos/work_dir/jib-master/install/jdk-14+20-879/linux-x64-debug.jdk/jdk-14/fastdebug/lib/server/libjvm.so at 0x00007ff6143b5000
RSP=0x00007ff5d77713e0 is pointing into the stack for thread: 0x00007ff5c453b800
RBP=0x00007ff5d7771420 is pointing into the stack for thread: 0x00007ff5c453b800
RSI=0x00000000000000de is an unknown value
RDI=0x00007ff615d5b658: <offset 0x00000000019a6658> in /opt/mach5/mesos/work_dir/jib-master/install/jdk-14+20-879/linux-x64-debug.jdk/jdk-14/fastdebug/lib/server/libjvm.so at 0x00007ff6143b5000
R8 =0x00007ff5c4024a50 points into unknown readable memory: c0 54 0a 16 f6 7f 00 00
R9 =0x0000000000000113 is an unknown value
R10=0x0 is NULL
R11=0x0 is NULL
R12=0x00007ff5c45cf4e8 points into unknown readable memory: 80 fd 14 16 f6 7f 00 00
R13=0x00007ff5d77717a0 is pointing into the stack for thread: 0x00007ff5c453b800
R14=0x000000000000001e is an unknown value
R15=0x00007ff5c4024a50 points into unknown readable memory: c0 54 0a 16 f6 7f 00 00


Registers:
RAX=0x00007ff616ebd000, RBX=0x00007ff5c4139a90, RCX=0x00007ff615e0a88c, RDX=0x00007ff615d5c7c0
RSP=0x00007ff5d77713e0, RBP=0x00007ff5d7771420, RSI=0x00000000000000de, RDI=0x00007ff615d5b658
R8 =0x00007ff5c4024a50, R9 =0x0000000000000113, R10=0x0000000000000000, R11=0x0000000000000000
R12=0x00007ff5c45cf4e8, R13=0x00007ff5d77717a0, R14=0x000000000000001e, R15=0x00007ff5c4024a50
RIP=0x00007ff6156a3114, EFLAGS=0x0000000000010216, CSGSFS=0x002b000000000033, ERR=0x0000000000000006
  TRAPNO=0x000000000000000e

Top of Stack: (sp=0x00007ff5d77713e0)
0x00007ff5d77713e0:   000003fa0000009b 00007ff5b44b9a38
0x00007ff5d77713f0:   00007ff5b42b80b8 00007ff5a5316280
0x00007ff5d7771400:   00007ff5d77717a0 0000000000000000
0x00007ff5d7771410:   0000000000000001 00007ff5c45cf4e8 

Instructions: (pc=0x00007ff6156a3114)
0x00007ff6156a3014:   0f 1f 40 00 49 8b 04 24 4c 89 e7 ff 50 28 48 8d
0x00007ff6156a3024:   15 bf a7 be 00 48 3b 02 74 33 48 8d 05 eb f2 ae
0x00007ff6156a3034:   00 48 8d 0d 94 5c 74 00 48 8d 15 8d b5 62 00 be
0x00007ff6156a3044:   d4 00 00 00 48 8d 3d 09 86 6b 00 48 8b 00 c6 00
0x00007ff6156a3054:   58 31 c0 e8 c4 3e 7a ff e8 5f e9 11 00 49 8b 04
0x00007ff6156a3064:   24 48 8d 15 84 dd 57 ff 48 8b 40 30 48 39 d0 0f
0x00007ff6156a3074:   85 27 01 00 00 be 01 00 00 00 4c 89 e7 e8 fa 36
0x00007ff6156a3084:   57 ff 4d 8b 7c 24 60 48 8d 05 8e a5 be 00 4c 39
0x00007ff6156a3094:   38 0f 84 e5 00 00 00 48 8d 05 76 a5 be 00 4c 39
0x00007ff6156a30a4:   38 0f 84 d5 00 00 00 41 8b 47 10 83 e8 11 83 f8
0x00007ff6156a30b4:   02 77 0d 4d 85 ff 74 08 41 8b 47 44 85 c0 7e 64
0x00007ff6156a30c4:   49 8b 7d 10 31 c9 31 d2 4c 89 fe e8 9c 50 6d ff
0x00007ff6156a30d4:   49 8b 7d 10 31 c9 31 d2 48 89 de 44 8b 30 e8 89
0x00007ff6156a30e4:   50 6d ff 44 39 30 0f 84 04 ff ff ff 48 8d 05 29
0x00007ff6156a30f4:   f2 ae 00 48 8d 0d 8e 77 76 00 48 8d 15 bb 96 6b
0x00007ff6156a3104:   00 be de 00 00 00 48 8d 3d 47 85 6b 00 48 8b 00
0x00007ff6156a3114:   c6 00 58 31 c0 e8 02 3e 7a ff e8 9d e8 11 00 e9
0x00007ff6156a3124:   cc fe ff ff 49 8b 07 be 01 00 00 00 4c 89 ff ff
0x00007ff6156a3134:   90 f0 00 00 00 49 89 c0 8b 40 10 83 e8 11 83 f8
0x00007ff6156a3144:   02 77 66 49 8b 00 4c 89 c7 8b 73 28 ff 90 c0 00
0x00007ff6156a3154:   00 00 49 89 c0 8b 40 10 83 e8 11 83 f8 02 0f 87
0x00007ff6156a3164:   85 00 00 00 49 8b 00 8b 73 44 4c 89 c7 ff 90 f8
0x00007ff6156a3174:   00 00 00 48 39 c3 0f 85 44 ff ff ff 48 83 c4 18
0x00007ff6156a3184:   4c 89 f2 48 89 de 4c 89 e7 5b 41 5c 41 5d 41 5e
0x00007ff6156a3194:   41 5f 5d e9 44 3e 57 ff 0f 1f 40 00 4c 89 e7 ff
0x00007ff6156a31a4:   d0 49 89 c7 e9 de fe ff ff 48 8d 05 6c f1 ae 00
0x00007ff6156a31b4:   48 8d 0d e4 ca 72 00 4c 89 45 c8 48 8d 15 62 ad
0x00007ff6156a31c4:   5c 00 be 68 06 00 00 48 8d 3d 66 0e 5c 00 48 8b
0x00007ff6156a31d4:   00 c6 00 58 31 c0 e8 41 3d 7a ff e8 dc e7 11 00
0x00007ff6156a31e4:   4c 8b 45 c8 e9 5a ff ff ff 48 8d 05 2c f1 ae 00
0x00007ff6156a31f4:   48 8d 0d a4 ca 72 00 4c 89 45 c8 48 8d 15 22 ad
0x00007ff6156a3204:   5c 00 be 68 06 00 00 48 8d 3d 26 0e 5c 00 48 8b 


Stack slot to memory mapping:
stack at sp + 0 slots: 0x000003fa0000009b is an unknown value
stack at sp + 1 slots: 0x00007ff5b44b9a38 points into unknown readable memory: 20 e5 14 16 f6 7f 00 00
stack at sp + 2 slots: 0x00007ff5b42b80b8 points into unknown readable memory: 38 9a 4b b4 f5 7f 00 00
stack at sp + 3 slots: 0x00007ff5a5316280 points into unknown readable memory: a0 b7 15 16 f6 7f 00 00
stack at sp + 4 slots: 0x00007ff5d77717a0 is pointing into the stack for thread: 0x00007ff5c453b800
stack at sp + 5 slots: 0x0 is NULL
stack at sp + 6 slots: 0x0000000000000001 is an unknown value
stack at sp + 7 slots: 0x00007ff5c45cf4e8 points into unknown readable memory: 80 fd 14 16 f6 7f 00 00


---------------  P R O C E S S  ---------------

uid  : 10668 euid : 10668 gid  : 10668 egid : 10668

umask: 0022 (----w--w-)

Threads class SMR info:
_java_thread_list=0x00007ff5c453c2d0, length=12, elements={
0x00007ff610024800, 0x00007ff610579800, 0x00007ff61057c000, 0x00007ff610585800,
0x00007ff610588000, 0x00007ff61058a800, 0x00007ff61058d000, 0x00007ff6105c3800,
0x00007ff610616800, 0x00007ff610618800, 0x00007ff61064a800, 0x00007ff5c453b800
}
_java_thread_list_alloc_cnt=19, _java_thread_list_free_cnt=17, _java_thread_list_max=13, _nested_thread_list_max=0
_tlh_cnt=264, _tlh_times=39, avg_tlh_time=0.15, _tlh_time_max=32
_deleted_thread_cnt=3, _deleted_thread_times=0, avg_deleted_thread_time=0.00, _deleted_thread_time_max=0
_delete_lock_wait_cnt=0, _delete_lock_wait_max=0
_to_delete_list_cnt=0, _to_delete_list_max=1

Java Threads: ( => current thread )
  0x00007ff610024800 JavaThread "main" [_thread_blocked, id=22195, stack(0x00007ff616d9d000,0x00007ff616e9e000)]
  0x00007ff610579800 JavaThread "Reference Handler" daemon [_thread_blocked, id=22207, stack(0x00007ff5d7d7c000,0x00007ff5d7e7d000)]
  0x00007ff61057c000 JavaThread "Finalizer" daemon [_thread_blocked, id=22208, stack(0x00007ff5d7c7b000,0x00007ff5d7d7c000)]
  0x00007ff610585800 JavaThread "Signal Dispatcher" daemon [_thread_blocked, id=22210, stack(0x00007ff5d7b7a000,0x00007ff5d7c7b000)]
  0x00007ff610588000 JavaThread "C2 CompilerThread0" daemon [_thread_in_native, id=22211, stack(0x00007ff5d7a79000,0x00007ff5d7b7a000)]
  0x00007ff61058a800 JavaThread "C1 CompilerThread0" daemon [_thread_blocked, id=22212, stack(0x00007ff5d7978000,0x00007ff5d7a79000)]
  0x00007ff61058d000 JavaThread "Sweeper thread" daemon [_thread_blocked, id=22213, stack(0x00007ff5d7877000,0x00007ff5d7978000)]
  0x00007ff6105c3800 JavaThread "Common-Cleaner" daemon [_thread_blocked, id=22215, stack(0x00007ff5d7776000,0x00007ff5d7877000)]
  0x00007ff610616800 JavaThread "Service Thread" daemon [_thread_blocked, id=22221, stack(0x00007ff5d7574000,0x00007ff5d7675000)]
  0x00007ff610618800 JavaThread "Notification Thread" daemon [_thread_blocked, id=22222, stack(0x00007ff5d7473000,0x00007ff5d7574000)]
  0x00007ff61064a800 JavaThread "MainThread" [_thread_in_vm, id=22224, stack(0x00007ff5d723f000,0x00007ff5d7340000)]
=>0x00007ff5c453b800 JavaThread "C2 CompilerThread1" daemon [_thread_in_native, id=22323, stack(0x00007ff5d7675000,0x00007ff5d7776000)]

Other Threads:
  0x00007ff610572800 VMThread "VM Thread" [stack: 0x00007ff5d7e7f000,0x00007ff5d7f7f000] [id=22206]
  0x00007ff61061b800 WatcherThread [stack: 0x00007ff5d7373000,0x00007ff5d7473000] [id=22223]
  0x00007ff61009d800 GCTaskThread "GC Thread#0" [stack: 0x00007ff5ef438000,0x00007ff5ef538000] [id=22200]
  0x00007ff5d0001000 GCTaskThread "GC Thread#1" [stack: 0x00007ff5d6e3e000,0x00007ff5d6f3e000] [id=22281]
  0x00007ff5d0003000 GCTaskThread "GC Thread#2" [stack: 0x00007ff5d6d3c000,0x00007ff5d6e3c000] [id=22282]
  0x00007ff5d0004800 GCTaskThread "GC Thread#3" [stack: 0x00007ff5d6966000,0x00007ff5d6a66000] [id=22286]
  0x00007ff5d0006800 GCTaskThread "GC Thread#4" [stack: 0x00007ff5d6864000,0x00007ff5d6964000] [id=22287]
  0x00007ff5d0008800 GCTaskThread "GC Thread#5" [stack: 0x00007ff5d6762000,0x00007ff5d6862000] [id=22288]
  0x00007ff5d000a800 GCTaskThread "GC Thread#6" [stack: 0x00007ff5d6660000,0x00007ff5d6760000] [id=22290]
  0x00007ff5d000c000 GCTaskThread "GC Thread#7" [stack: 0x00007ff5d655e000,0x00007ff5d665e000] [id=22292]
  0x00007ff6100bc800 ConcurrentGCThread "G1 Main Marker" [stack: 0x00007ff5ef336000,0x00007ff5ef436000] [id=22201]
  0x00007ff6100be800 ConcurrentGCThread "G1 Conc#0" [stack: 0x00007ff5ef234000,0x00007ff5ef334000] [id=22203]
  0x00007ff5e0001000 ConcurrentGCThread "G1 Conc#1" [stack: 0x00007ff5d5b4e000,0x00007ff5d5c4e000] [id=22306]
  0x00007ff610483800 ConcurrentGCThread "G1 Refine#0" [stack: 0x00007ff5ec92a000,0x00007ff5eca2a000] [id=22204]
  0x00007ff5d8001000 ConcurrentGCThread "G1 Refine#1" [stack: 0x00007ff5d645c000,0x00007ff5d655c000] [id=22295]
  0x00007ff578001000 ConcurrentGCThread "G1 Refine#2" [stack: 0x00007ff5d635a000,0x00007ff5d645a000] [id=22296]
  0x00007ff57c001000 ConcurrentGCThread "G1 Refine#3" [stack: 0x00007ff5d6258000,0x00007ff5d6358000] [id=22297]
  0x00007ff570001000 ConcurrentGCThread "G1 Refine#4" [stack: 0x00007ff5d6156000,0x00007ff5d6256000] [id=22298]
  0x00007ff574001000 ConcurrentGCThread "G1 Refine#5" [stack: 0x00007ff5d6054000,0x00007ff5d6154000] [id=22299]
  0x00007ff568001000 ConcurrentGCThread "G1 Refine#6" [stack: 0x00007ff5d5f52000,0x00007ff5d6052000] [id=22300]
  0x00007ff56c001000 ConcurrentGCThread "G1 Refine#7" [stack: 0x00007ff5d5e50000,0x00007ff5d5f50000] [id=22301]
  0x00007ff610485800 ConcurrentGCThread "G1 Young RemSet Sampling" [stack: 0x00007ff5ec828000,0x00007ff5ec928000] [id=22205]

Threads with active compile tasks:
C2 CompilerThread0    10999  867       4       selectionresolution.ClassBuilder::addHelperMethod (107 bytes)
C2 CompilerThread1    10999  866       4       selectionresolution.ClassBuilder::buildClassConstructs (214 bytes)

VM state:not at safepoint (normal execution)

VM Mutex/Monitor currently owned by a thread: None

Heap address: 0x000000071e800000, size: 3608 MB, Compressed Oops mode: Zero based, Oop shift amount: 3
Narrow klass base: 0x0000000800000000, Narrow klass shift: 3
Compressed class space size: 1073741824 Address: 0x0000000800b4e000
Comments
Fix Request Should get backported for parity with 11.0.11-oracle. Applies almost cleanly. Only trivial resultion needed. Review thread: http://mail.openjdk.java.net/pipermail/jdk-updates-dev/2020-December/004470.html
21-12-2020

URL: https://hg.openjdk.java.net/jdk/jdk14/rev/be9033a248f7 User: thartmann Date: 2019-12-23 08:44:57 +0000
23-12-2019

The problem is that the arraycopy ideal transformation does not correctly wire memory inputs on individual loads from a non-escaping src array. I was able to extract a test from the intermittently failing application that depends on indify string concat (test1). From that, I've created another test that does not depend on Strings (test2). Gory details based on test2: Two subsequent arraycopies copy data from two sources into the same destination. The ideal transformation replaces the first arraycopy by a forward and backward copy (because ArrayCopyNode::array_copy_test_overlap determines that the arrays may overlap). A PhiNode is added to select between the memory outputs of the forward and backward stores: http://hg.openjdk.java.net/jdk/jdk/file/2fbc66ef1a1d/src/hotspot/share/opto/arraycopynode.cpp#l617 574 StoreB === 559 572 553 573 [[ 568 576 ]] @byte[int:0..max-2]:NotNull:exact+any ... 567 StoreB === 558 562 565 566 [[ 560 576 ]] @byte[int:0..max-2]:NotNull:exact+any ... 575 Region === 575 558 559 [[ 575 576 ]] 576 Phi === 575 567 574 [[]] #memory Memory: @byte[int:>=0]:exact+any *, idx=6; The second arraycopy can't be optimized (yet) because the src operand and its length are not known but once Escape Analysis is executed, it determines that both source arrays are non-escaping. Now the ideal transformation is able to replace the second arraycopy by loads/stores as well. The memory slice for the first load is selected from the MergeMem based on its address type ('atp_src') which is the general byte[int:>=0] slice due to a CastPP that hides the type of the non-escaping source array. As a result, we wire it to the byte[int:>=0] memory Phi that was created when optimizing the first arraycopy: 305 CheckCastPP === 302 300 [[ 385 316 420 494 ]] #byte[int:1]:NotNull:exact *,iid=288 494 CastPP === 486 305 [[ 526 514 626 626 ]] #byte[int:>=0]:NotNull:exact * 626 AddP === _ 494 494 68 [[ 629 ]] 576 Phi === 575 567 574 [[ 560 628 629 ]] #memory Memory: @byte[int:>=0]:exact+any 629 LoadB === 508 576 626 [[]] @byte[int:>=0]:NotNull:exact+any *, idx=6; #byte That's obviously incorrect because now the LoadB has an address input into a non-escaping source with type byte[int:1], iid=288 and a memory input from the independent byte[int:>=0] slice: http://cr.openjdk.java.net/~thartmann/8233164/graph_Failure.png Basically, 629 LoadB uses memory from 47 AllocateArray when loading from an address into non-escaping 288 AllocateArray. We then hit an assert in MemNode::optimize_memory_chain. The fix is to use _src_type/_dest_type (introduced by JDK-8076188) as address types for the loads and stores. These will have the correct type if the source or destination array is non-escaping: http://cr.openjdk.java.net/~thartmann/8233164/webrev.00/ The affected code is in there for a long time but I can only reproduce this back until JDK 13 b08 when JDK-8217990 was fixed. I don't think that fix is related but since the crash greatly depends on the order in which nodes are processed by IGVN, it probably just triggers the issue (for example, if we process a CastPP node first, it goes away and we get the correct type from the CheckCastPP). The code was also changed significantly by JDK-8210887 in JDK 12.
20-12-2019

> This was trigged by JDK-8217990 in JDK 13 b08 but I don't think it causes the issue. FTR I see that JDK-8217990 was backported into 11u (11.0.5).
18-12-2019

This was trigged by JDK-8217990 in JDK 13 b08 but I don't think it causes the issue.
18-12-2019

I finally gathered enough information to write a simple regression test that reliably reproduces the issue: https://bugs.openjdk.java.net/secure/attachment/86145/Test.java
17-12-2019

I'm able to reproduce this (once in 48 hours). We are processing this load: 7949 LoadB === 4676 2906 4774 [[ 7950 ]] @byte[int:>=0]:NotNull:exact+any *, idx=30; #byte !jvms: ClassBuilder::buildClassConstructs @ bci:-1 that has an address input of type "byte[int:0..max-2]:NotNull:exact[0]": 2865 AllocateArray === 3999 1641 4000 320 1 ( 3995 4001 1078 1117 1081 1082 1091 1424 1 1093 1081 1091 1637 1 1 1643 1643 1 1 1 1 1644 1637 1 1700 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 ) [[ 4585 3663 2413 5699 1674 2869 ]] rawptr:NotNull ( int:>=0, java/lang/Object:NotNull *, bool, int ) Unsafe::allocateUninitializedArray @ bci:51 StringConcatHelper::newArray @ bci:19 DirectMethodHandle$Holder::invokeStatic @ bci:10 0x0000000800be4040::invoke @ bci:31 Invokers$Holder::linkToTargetMethod @ bci:5 Builder::getPackageName @ bci:1 ClassBuilder::addHelperMethod @ bci:38 ClassBuilder::buildClassConstructs @ bci:111 !jvms: ClassBuilder::buildClassConstructs @ bci:63 2869 Proj === 2865 [[ 4002 1676 ]] #5 !jvms: ClassBuilder::buildClassConstructs @ bci:63 1676 CheckCastPP === 2868 2869 [[ 5712 2888 4003 4774 4014 872 872 4774 874 874 871 4014 874 871 871 872 4003 884 ]] #byte[int:0..max-2]:NotNull:exact *,iid=2865 !orig=[6413] !jvms: ClassConstruct::addMethod @ bci:0 ClassConstruct::addMethod @ bci:5 TestBuilder::<init> @ bci:32 ClassBuilder::buildClassConstructs @ bci:15 4774 AddP === _ 1676 1676 2364 [[ 3683 7949 ]] !orig=[7941] !jvms: Method::makeConstructor @ bci:58 Clazz::<init> @ bci:36 Clazz::<init> @ bci:10 ClassBuilder::buildClassConstructs @ bci:105 but a memory Phi input of type "byte[int:>=0]:exact+any *": 5057 StoreB === 5052 5726 5727 5723 [[ 4050 ]] @byte[int:0..max-2]:NotNull:exact+any *, idx=30; Memory: @byte[int:0..max-2]:NotNull:exact[1] *, idx=30; !jvms: HashMap::getNode @ bci:62 HashMap::get @ bci:6 ClassBuilder::addHelperMethod @ bci:8 ClassBuilder::buildClassConstructs @ bci:111 4050 StoreB === 5052 5057 5058 5059 [[ 2906 ]] @byte[int:0..max-2]:NotNull:exact+any *, idx=30; Memory: @byte[int:0..max-2]:NotNull:exact[0] *, idx=30; !jvms: Clazz::<init> @ bci:3 Clazz::<init> @ bci:10 ClassBuilder::buildClassConstructs @ bci:105 2906 Phi === 4047 4049 4050 [[ 1727 7950 7949 ]] #memory Memory: @byte[int:>=0]:exact+any *, idx=30; !jvms: ClassBuilder::buildClassConstructs @ bci:66
02-12-2019

ILW = Assert during C2 compilation, intermittent with single test, disable compilation of affected method = HLM = P3
04-11-2019