JDK-8224539 : C2 compilation fails during ArrayCopyNode optimizations with assert(i < _max) failed: oob: i=1, _max=1
  • Type: Bug
  • Component: hotspot
  • Sub-Component: compiler
  • Affected Version: 12,13
  • Priority: P2
  • Status: Closed
  • Resolution: Fixed
  • Submitted: 2019-05-21
  • Updated: 2019-08-15
  • Resolved: 2019-05-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 13
13 b23Fixed
Related Reports
Duplicate :  
Relates :  
Relates :  
Description
Test failed with
#
# A fatal error has been detected by the Java Runtime Environment:
#
#  Internal Error (/scratch/mesos/slaves/8cd6f162-51f6-4a7f-a76b-32ddeb30fb11-S97/frameworks/1735e8a2-a1db-478c-8104-60c8b0af87dd-0196/executors/9b579026-343a-411b-aae6-fd78ce2c672a/runs/54d76e58-a7de-43b5-8245-4974ac50cf39/workspace/open/src/hotspot/share/opto/node.hpp:371), pid=9767, tid=33831
#  assert(i < _max) failed: oob: i=1, _max=1
#
# JRE version: Java(TM) SE Runtime Environment (13.0) (fastdebug build 13-ea+0-1070)
# Java VM: Java HotSpot(TM) 64-Bit Server VM (fastdebug 13-ea+0-1070, compiled mode, sharing, tiered, compressed oops, g1 gc, bsd-amd64)
# Core dump will be written. Default location: /cores/core.9767
#
# 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: -XX:MaxRAMPercentage=6 -Xcomp -XX:+CreateCoredumpOnCrash -ea -esa -XX:CompileThreshold=100 -XX:+UnlockExperimentalVMOptions -XX:+TieredCompilation -XX:+IgnoreUnrecognizedVMOptions -XX:-DoEscapeAnalysis --add-opens=java.base/java.net=ALL-UNNAMED -Dseed=1094684265146601 -XX:MaxRAMPercentage=50 applications.runthese.Runner -duration 30 -runlist /scratch/mesos/slaves/8cd6f162-51f6-4a7f-a76b-32ddeb30fb11-S49/frameworks/1735e8a2-a1db-478c-8104-60c8b0af87dd-0196/executors/c4ffadf3-0edb-4daa-b065-97b75d519d5f/runs/db3ad0d3-7c37-4bcb-a949-7981df7e7e48/testoutput/test-support/jtreg_closed_test_hotspot_jtreg_applications_runthese_RunThese30M_java/scratch/0/./RunTheseTestList.dat

Host: Macmini6,2 x86_64 2300 MHz, 8 cores, 8G, Darwin 17.5.0
Time: Sun May 19 21:15:54 2019 GMT elapsed time: 707 seconds (0d 0h 11m 47s)

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

Current thread (0x00007fdd6646e000):  JavaThread "C2 CompilerThread1" daemon [_thread_in_native, id=33831, stack(0x0000700004917000,0x0000700004a17000)]


Current CompileTask:
C2: 707294 109649   !b  4       javasoft.sqe.tests.api.java.io.DataOutputStream.writeTests::DataOutputStream0007 (808 bytes)

Stack: [0x0000700004917000,0x0000700004a17000],  sp=0x0000700004a13040,  free space=1008k
Native frames: (J=compiled Java code, A=aot compiled Java code, j=interpreted, Vv=VM code, C=native code)
V  [libjvm.dylib+0xc047e6]  VMError::report_and_die(int, char const*, char const*, __va_list_tag*, Thread*, unsigned char*, void*, void*, char const*, int, unsigned long)+0x6ac
V  [libjvm.dylib+0xc04ec1]  VMError::report_and_die(Thread*, void*, char const*, int, char const*, char const*, __va_list_tag*)+0x47
V  [libjvm.dylib+0x417bc2]  report_vm_error(char const*, int, char const*, char const*, ...)+0x145
V  [libjvm.dylib+0x8a33c4]  Node::in(unsigned int) const+0x54
V  [libjvm.dylib+0x1bb69a]  ArrayCopyNode::load(BarrierSetC2*, PhaseGVN*, Node*&, MergeMemNode*, Node*, TypePtr const*, Type const*, BasicType)+0x46
V  [libjvm.dylib+0x1bcbbe]  ArrayCopyNode::array_copy_forward(PhaseGVN*, bool, Node*&, MergeMemNode*, TypePtr const*, TypePtr const*, Node*, Node*, Node*, Node*, BasicType, Type const*, int)+0xb6
V  [libjvm.dylib+0x1bd522]  ArrayCopyNode::Ideal(PhaseGVN*, bool)+0x450
V  [libjvm.dylib+0xa409f6]  PhaseIterGVN::transform_old(Node*)+0x9c
V  [libjvm.dylib+0xa406d4]  PhaseIterGVN::optimize()+0xae
V  [libjvm.dylib+0x39060f]  Compile::Optimize()+0x129
V  [libjvm.dylib+0x38f312]  Compile::Compile(ciEnv*, C2Compiler*, ciMethod*, int, bool, bool, bool, DirectiveSet*)+0xace
V  [libjvm.dylib+0x2beffe]  C2Compiler::compile_method(ciEnv*, ciMethod*, int, DirectiveSet*)+0xdc
V  [libjvm.dylib+0x3a1c50]  CompileBroker::invoke_compiler_on_method(CompileTask*)+0x6da
V  [libjvm.dylib+0x3a139f]  CompileBroker::compiler_thread_loop()+0x283
V  [libjvm.dylib+0xb835b5]  JavaThread::thread_main_inner()+0x1a1
V  [libjvm.dylib+0xb83168]  JavaThread::run()+0x2aa
V  [libjvm.dylib+0xb7fcd7]  Thread::call_run()+0x11b
V  [libjvm.dylib+0x9eb8d8]  thread_native_entry(Thread*)+0x13a
C  [libsystem_pthread.dylib+0x3661]  _pthread_body+0x154
C  [libsystem_pthread.dylib+0x350d]  _pthread_body+0x0
C  [libsystem_pthread.dylib+0x2bf9]  thread_start+0xd

Comments
http://cr.openjdk.java.net/~thartmann/8224539/webrev.00/
22-05-2019

Different failure mode: # Internal Error (/oracle/jdk_jdk/open/src/hotspot/share/opto/node.hpp:371), pid=26257, tid=26269 # assert(i < _max) failed: oob: i=1, _max=1 Stack: [0x00007f65d27c3000,0x00007f65d28c4000], sp=0x00007f65d28be450, free space=1005k Native frames: (J=compiled Java code, A=aot compiled Java code, j=interpreted, Vv=VM code, C=native code) V [libjvm.so+0x64c7de] ArrayCopyNode::store(BarrierSetC2*, PhaseGVN*, Node*&, MergeMemNode*, Node*, TypePtr const*, Node*, Type const*, BasicType)+0xbe V [libjvm.so+0x64f7d1] ArrayCopyNode::array_copy_forward(PhaseGVN*, bool, Node*&, MergeMemNode*, TypePtr const*, TypePtr const*, Node*, Node*, Node*, Node*, BasicType, Type const*, int)+0x311 V [libjvm.so+0x6536da] ArrayCopyNode::Ideal(PhaseGVN*, bool)+0xd8a V [libjvm.so+0x15abe78] PhaseIterGVN::transform_old(Node*)+0xb8 V [libjvm.so+0x15a52c4] PhaseIterGVN::optimize()+0x94 V [libjvm.so+0xa3a0b9] Compile::inline_incrementally_cleanup(PhaseIterGVN&)+0x3d9 V [libjvm.so+0xa3fc7c] Compile::inline_incrementally(PhaseIterGVN&)+0x1cc V [libjvm.so+0xa42b7b] Compile::Optimize()+0x48b V [libjvm.so+0xa44d30] Compile::Compile(ciEnv*, C2Compiler*, ciMethod*, int, bool, bool, bool, DirectiveSet*)+0x12a0 V [libjvm.so+0x8772d2] C2Compiler::compile_method(ciEnv*, ciMethod*, int, DirectiveSet*)+0x2f2 V [libjvm.so+0xa516f8] CompileBroker::invoke_compiler_on_method(CompileTask*)+0x448 V [libjvm.so+0xa5248f] CompileBroker::compiler_thread_loop()+0x32f V [libjvm.so+0x19091aa] JavaThread::thread_main_inner()+0x1da V [libjvm.so+0x190e42b] Thread::call_run()+0xfb V [libjvm.so+0x1507f91] thread_native_entry(Thread*)+0x121
22-05-2019

ILW = Assert during C2 compilation, intermittent but reproducible with replay compilation file, disable compilation of affected method or array copy intrinsic = HMM = P2
22-05-2019

The attached hs_err file is wrong (hs_err_pid14679.log). I've attached the correct one (hs_err_pid9767.log).
22-05-2019