JDK-8015436 : compiler/ciReplay/TestSA.sh fails with assert() index is out of bounds
  • Type: Bug
  • Component: hotspot
  • Sub-Component: compiler
  • Affected Version: hs25
  • Priority: P2
  • Status: Closed
  • Resolution: Fixed
  • Submitted: 2013-05-27
  • Updated: 2014-01-14
  • Resolved: 2013-05-31
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 Other
8Fixed hs25Fixed
Related Reports
Relates :  
Relates :  
Description
This failure was seen on all platforms.

ILW => HMM?

# To suppress the following error report, specify this argument
# after -XX: or in .hotspotrc:  SuppressErrorAt=/instanceKlass.cpp:2760
#
# A fatal error has been detected by the Java Runtime Environment:
#
#  Internal Error (/opt/jprt/T/P1/172807.ddaugher/s/src/share/vm/oops/instanceKlass.cpp:2760), pid=28567, tid=2
#  assert(0 <= index && index < idnum_allocated_count()) failed: index is out of bounds
#
# JRE version: Java(TM) SE Runtime Environment (8.0-b91) (build 1.8.0-ea-fastdebug-b91)
# Java VM: Java HotSpot(TM) Server VM (25.0-b35-internal-201305241728.ddaugher.merge_main_to_rt_b-fastdebug mixed mode solaris-x86 )
# Core dump written. Default location: /export/local/aurora/sandbox/results/workDir/compiler/ciReplay/TestSA/core or core.28567
#
# An error report file with more information is saved as:
# /export/local/aurora/sandbox/results/workDir/compiler/ciReplay/TestSA/hs_err_pid28567.log
#
# If you would like to submit a bug report, please visit:
#   http://bugreport.sun.com/bugreport/crash.jsp
#

Stack: [0x00007fe2125fe000,0x00007fe2126ff000],  sp=0x00007fe2126fbd90,  free space=1015k
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
V  [libjvm.so+0xdcf042]  VMError::report_and_die()+0x302;;  VMError::report_and_die()+0x302
V  [libjvm.so+0x698024]  report_vm_error(char const*, int, char const*, char const*)+0x84;;  report_vm_error(char const*, int, char const*, char const*)+0x84
V  [libjvm.so+0x82eb27]  InstanceKlass::add_member_name(int, Handle)+0x127;;  InstanceKlass::add_member_name(int, Handle)+0x127
V  [libjvm.so+0xb27378]  MethodHandles::init_method_MemberName(Handle, Method*, bool, KlassHandle)+0xd8;;  MethodHandles::init_method_MemberName(Handle, Method*, bool, KlassHandle)+0xd8
V  [libjvm.so+0xb27d0a]  MethodHandles::init_MemberName(Handle, Handle)+0x41a;;  MethodHandles::init_MemberName(Handle, Handle)+0x41a
V  [libjvm.so+0xb2ba10]  MHN_init_Mem+0x180;;  MHN_init_Mem+0x180
j  java.lang.invoke.MethodHandleNatives.init(Ljava/lang/invoke/MemberName;Ljava/lang/Object;)V+0
j  java.lang.invoke.MemberName.<init>(Ljava/lang/reflect/Method;Z)V+11
j  java.lang.invoke.MemberName.<init>(Ljava/lang/reflect/Method;)V+3
j  java.lang.invoke.MethodHandles$Lookup.unreflect(Ljava/lang/reflect/Method;)Ljava/lang/invoke/MethodHandle;+5
j  randomPackage95ccf894fe12c970.SafeUnreflectorImpl.unreflect(Ljava/lang/reflect/Method;)Ljava/lang/invoke/MethodHandle;+4
j  jdk.internal.dynalink.beans.SafeUnreflector.unreflect(Ljava/lang/reflect/Method;)Ljava/lang/invoke/MethodHandle;+4
j  jdk.internal.dynalink.beans.FacetIntrospector.unreflect(Ljava/lang/reflect/Method;)Ljava/lang/invoke/MethodHandle;+2
j  jdk.internal.dynalink.beans.AbstractJavaLinker.<init>(Ljava/lang/Class;Ljava/lang/invoke/MethodHandle;Ljava/lang/invoke/MethodHandle;)V+136
j  jdk.internal.dynalink.beans.BeanLinker.<init>(Ljava/lang/Class;)V+10
j  jdk.internal.dynalink.beans.BeansLinker$1.computeValue(Ljava/lang/Class;)Ljdk/internal/dynalink/linker/TypeBasedGuardingDynamicLinker;+56
j  jdk.internal.dynalink.beans.BeansLinker$1.computeValue(Ljava/lang/Class;)Ljava/lang/Object;+2
j  java.lang.ClassValue.getFromHashMap(Ljava/lang/Class;)Ljava/lang/Object;+29
j  java.lang.ClassValue.getFromBackup([Ljava/lang/ClassValue$Entry;Ljava/lang/Class;)Ljava/lang/Object;+17
j  java.lang.ClassValue.get(Ljava/lang/Class;)Ljava/lang/Object;+27
j  jdk.internal.dynalink.beans.BeansLinker.getLinkerForClass(Ljava/lang/Class;)Ljdk/internal/dynalink/linker/TypeBasedGuardingDynamicLinker;+4

Attaching the hs_err file.
Comments
Thank you for the update. I hope, this noise will go away after the fix for this bug is picked up from the hotspot-rt.
04-06-2013

The test failed with the pattern described in the 8011888 before the fix for 8014288.
29-05-2013

The test failed in the nightly with a different pattern before the fix for the 8014288. The problem of this bug seems to be related to the generation of the overpass methods. The following context is the only code path where the assigned to a method idnum can become bigger than the initial_method_idnum() value: ClassFileParser::parseClassFile()-> DefaultMethods::generate_default_methods()-> create_overpasses()-> merge_in_new_methods()-> merged_methods->at(i)->set_method_idnum(i); The following patch fixes new issue, and the test fails with the same failure pattern that was seen before: diff -r 6c138b9851fb src/share/vm/classfile/defaultMethods.cpp --- a/src/share/vm/classfile/defaultMethods.cpp Fri May 24 17:36:12 2013 -0700 +++ b/src/share/vm/classfile/defaultMethods.cpp Tue May 28 21:47:00 2013 -0700 @@ -1291,6 +1291,7 @@ static void merge_in_new_methods(Instanc Array<int>* merged_ordering = Universe::the_empty_int_array(); int new_size = klass->methods()->length() + new_methods->length(); + klass->set_initial_method_idnum(new_size); Array<Method*>* merged_methods = MetadataFactory::new_array<Method*>( klass->class_loader_data(), new_size, NULL, CHECK);
29-05-2013

The issue is reproducible.
28-05-2013

Assertion and index usage introduced by fix for 8014288
27-05-2013

RULE compiler/ciReplay/TestSA.sh Crash: Internal Error ...instanceKlass.cpp...assert(... <= index && index < idnum_allocated_count()) failed: index is out of bounds
27-05-2013