JDK-8151066 : assert(0 <= i && i < length()) failed: index out of bounds
  • Type: Bug
  • Component: hotspot
  • Sub-Component: jvmti
  • Affected Version: 8,9
  • Priority: P2
  • Status: Closed
  • Resolution: Fixed
  • Submitted: 2016-03-02
  • Updated: 2019-10-04
  • Resolved: 2016-05-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 Other
8u212Fixed 9 b120Fixed openjdk8u232Fixed
Related Reports
Relates :  
Relates :  
Description
# A fatal error has been detected by the Java Runtime Environment:
#
#  Internal Error (/opt/jprt/T/P1/004742.mgronlun/s/hotspot/src/share/vm/oops/cpCache.hpp:462), pid=29979, tid=13
#  assert(0 <= i && i < length()) failed: index out of bounds
#
# JRE version: Java(TM) SE Runtime Environment (9.0) (fastdebug build 9-internal+0-2016-03-02-004742.mgronlun.upstream)
# Java VM: Java HotSpot(TM) 64-Bit Server VM (fastdebug 9-internal+0-2016-03-02-004742.mgronlun.upstream, mixed mode, tiered, compressed oops, parallel gc, solaris-amd64)
Comments
Fix Request (8u) I would like to backport this patch to 8u, as it is on Oracle 8u backport list. The patch does not apply cleanly. 8u code review thread: https://mail.openjdk.java.net/pipermail/jdk8u-dev/2019-August/010024.html (Reviewed)
20-08-2019

I'm pretty sure this is a duplicate of the bug I'm fixing, assigning it to me.
09-05-2016

This is another symptom of the constant pool merging is not thread safe bug.
04-05-2016

ILW = H (vm crash) L (intermittent) H = P2
04-03-2016

From the hs_err_pid file, this one comes from compiling an old method too V [libjvm.so+0xbc77d3] ConstantPoolCacheEntry*ConstantPoolCache::entry_at(int)const+0x53;; __1cRConstantPoolCacheIentry_at6kMi_pnWConstantPoolCacheEntry__+0x53 V [libjvm.so+0x144bd5b] int ConstantPool::impl_name_and_type_ref_index_at(int,bool)+0x2b;; __1cMConstantPoolbFimpl_name_and_type_ref_index_at6Mib_i_+0x2b V [libjvm.so+0x127c92f] int ciBytecodeStream::get_method_signature_index()+0x4f;; __1cQciBytecodeStreambAget_method_signature_index6M_i_+0x4f V [libjvm.so+0x127b695] ciMethod*ciBytecodeStream::get_method(bool&,ciSignature**)+0x175;; __1cQciBytecodeStreamKget_method6MrbppnLciSignature__pnIciMethod__+0x175 V [libjvm.so+0x10c2c85] void GraphBuilder::invoke(Bytecodes::Code)+0x35;; __1cMGraphBuilderGinvoke6MnJBytecodesECode__v_+0x35 V [libjvm.so+0x10ca54b] BlockEnd*GraphBuilder::iterate_bytecodes_for_block(int)+0xa9b;; __1cMGraphBuilderbBiterate_bytecodes_for_block6Mi_pnIBlockEnd__+0xa9b V [libjvm.so+0x10cd88f] void GraphBuilder::iterate_all_blocks(bool)+0x11f;; __1cMGraphBuilderSiterate_all_blocks6Mb_v_+0x11f V [libjvm.so+0x10d18e1] GraphBuilder::GraphBuilder(Compilation*,IRScope*)+0x901;; __1cMGraphBuilder2t6MpnLCompilation_pnHIRScope__v_+0x901 V [libjvm.so+0x10e45f0] BlockBegin*IRScope::build_graph(Compilation*,int)+0x20;; __1cHIRScopeLbuild_graph6MpnLCompilation_i_pnKBlockBegin__+0x20 V [libjvm.so+0x10e486f] IRScope::IRScope #Nvariant 1(Compilation*,IRScope*,int,ciMethod*,int,bool)+0x22f;; __1cHIRScope2t6MpnLCompilation_p0ipnIciMethod_ib_v_+0x22f V [libjvm.so+0x10e4fe8] IR::IR #Nvariant 1(Compilation*,ciMethod*,int)+0x88;; __1cCIR2t6MpnLCompilation_pnIciMethod_i_v_+0x88 V [libjvm.so+0x10a43da] void Compilation::build_hir()+0x1ba;; __1cLCompilationJbuild_hir6M_v_+0x1ba V [libjvm.so+0x10a5a18] int Compilation::compile_java_method()+0x1b8;; __1cLCompilationTcompile_java_method6M_i_+0x1b8 V [libjvm.so+0x10a6356] void Compilation::compile_method()+0x1e6;; __1cLCompilationOcompile_method6M_v_+0x1e6 V [libjvm.so+0x10a74be]
02-03-2016

We have (at least) two other bugs filed on this test with different failure modes: JDK-8148772 VM crash in nsk/jvmti/RedefineClasses/StressRedefine: assert failed: Corrupted constant pool JDK-8148773 VM crash in nsk/jvmti/RedefineClasses/StressRedefine: Error: ShouldNotReachHere() Since these are RedefineClasses() stress tests, I'm moving these bugs all to hotspot/jvmti.
02-03-2016