JDK-8029000 : VM crashes with Error: ShouldNotReachHere() in Rewriter ctor
  • Type: Bug
  • Component: hotspot
  • Sub-Component: runtime
  • Affected Version: hs25
  • Priority: P2
  • Status: Closed
  • Resolution: Duplicate
  • OS: generic
  • CPU: generic
  • Submitted: 2013-11-22
  • Updated: 2014-07-07
  • Resolved: 2013-11-22
Related Reports
Relates :  
Description
Starting from hs25-b59 VM may crash with following error:

#
# A fatal error has been detected by the Java Runtime Environment:
#
#  Internal Error (/tmp/workspace/8-2-build-solaris-amd64/jdk8/807/hotspot/src/share/vm/interpreter/rewriter.cpp:516), pid=21142, tid=16
#  Error: ShouldNotReachHere()
#
# JRE version: Java(TM) SE Runtime Environment (8.0-b117) (build 1.8.0-ea-fastdebug-b117)
# Java VM: Java HotSpot(TM) 64-Bit Server VM (25.0-b59-fastdebug mixed mode solaris-amd64 compressed oops)
# Core dump written. Default location: /export/JQA/ResultDir/jck60007/core or core.21142
#
# If you would like to submit a bug report, please visit:
#   http://bugreport.sun.com/bugreport/crash.jsp
#

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

Current thread (0x000000000503b800):  JavaThread "TestThread #2" [_thread_in_vm, id=16, stack(0xfffffd7fc36ff000,0xfffffd7fc37ff000)]

Stack: [0xfffffd7fc36ff000,0xfffffd7fc37ff000],  sp=0xfffffd7fc37f9a90,  free space=1002k
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
V  [libjvm.so+0x28e4c48]  void VMError::report(outputStream*)+0x92c
V  [libjvm.so+0x28e6184]  void VMError::report_and_die()+0x56c
V  [libjvm.so+0xfd6102]  void report_should_not_reach_here(const char*,int)+0x522
V  [libjvm.so+0x250287b]  Rewriter::Rewriter #Nvariant 1(instanceKlassHandle,constantPoolHandle,Array<Method*>*,Thread*)+0x1123
V  [libjvm.so+0x2501270]  void Rewriter::rewrite(instanceKlassHandle,Thread*)+0x214
V  [libjvm.so+0x13e909d]  void InstanceKlass::rewrite_class(Thread*)+0x8d
V  [libjvm.so+0x13e898a]  bool InstanceKlass::link_class_impl(instanceKlassHandle,bool,Thread*)+0x4c6
V  [libjvm.so+0x13e8286]  void InstanceKlass::link_class(Thread*)+0x92
V  [libjvm.so+0x13ea2bb]  void InstanceKlass::initialize_impl(instanceKlassHandle,Thread*)+0x37
V  [libjvm.so+0x13e808a]  void InstanceKlass::initialize(Thread*)+0x92
V  [libjvm.so+0x1ae8a21]  _jclass*find_class_from_class_loader(JNIEnv_*,Symbol*,unsigned char,Handle,Handle,unsigned char,Thread*)+0xb1
V  [libjvm.so+0x1a3a6d9]  JVM_FindClassFromClassLoader+0x6ad
C  [libjava.so+0x11975]  Java_java_lang_Class_forName0+0xd1
J 397  java.lang.Class.forName0(Ljava/lang/String;ZLjava/lang/ClassLoader;)Ljava/lang/Class; (0 bytes) @ 0xfffffd7fecb3f45b [0xfffffd7fecb3f2e0+0x17b]
J 370 C1 java.lang.Class.forName(Ljava/lang/String;)Ljava/lang/Class; (12 bytes) @ 0xfffffd7fecb3cb34 [0xfffffd7fecb3c980+0x1b4]
j  javasoft.sqe.tests.vm.instr.ifnull.ifnull005.ifnull00503m1t.ifnull00503m1t.runPositive(Ljava/lang/String;[Ljava/lang/String;Ljava/io/PrintStream;)I+21
j  javasoft.sqe.tests.vm.instr.ifnull.ifnull005.ifnull00503m1t.ifnull00503m1t.run([Ljava/lang/String;Ljava/io/PrintStream;)I+4
v  ~StubRoutines::call_stub
V  [libjvm.so+0x16de092]  void JavaCalls::call_helper(JavaValue*,methodHandle*,JavaCallArguments*,Thread*)+0x1622
V  [libjvm.so+0x16dca2f]  void JavaCalls::call(JavaValue*,methodHandle,JavaCallArguments*,Thread*)+0x3f
V  [libjvm.so+0x24c05b7]  oop Reflection::invoke(instanceKlassHandle,methodHandle,Handle,bool,objArrayHandle,BasicType,objArrayHandle,bool,Thread*)+0x26c3
V  [libjvm.so+0x24c2cc2]  oop Reflection::invoke_method(oop,Handle,objArrayHandle,Thread*)+0x882
V  [libjvm.so+0x1aea998]  JVM_InvokeMethod+0x9d8
C  [libjava.so+0x133e6]  Java_sun_reflect_NativeMethodAccessorImpl_invoke0+0x12
j  sun.reflect.NativeMethodAccessorImpl.invoke0(Ljava/lang/reflect/Method;Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;+0
j  sun.reflect.NativeMethodAccessorImpl.invoke(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;+100
j  sun.reflect.DelegatingMethodAccessorImpl.invoke(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;+6
j  java.lang.reflect.Method.invoke(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;+56
j  nsk.stress.share.MetaspaceTestRunner$TestThread.run()V+148
v  ~StubRoutines::call_stub
V  [libjvm.so+0x16de092]  void JavaCalls::call_helper(JavaValue*,methodHandle*,JavaCallArguments*,Thread*)+0x1622
V  [libjvm.so+0x16dca2f]  void JavaCalls::call(JavaValue*,methodHandle,JavaCallArguments*,Thread*)+0x3f
V  [libjvm.so+0x16d9ddc]  void JavaCalls::call_virtual(JavaValue*,KlassHandle,Symbol*,Symbol*,JavaCallArguments*,Thread*)+0x77c
V  [libjvm.so+0x16da62d]  void JavaCalls::call_virtual(JavaValue*,Handle,KlassHandle,Symbol*,Symbol*,Thread*)+0xed
V  [libjvm.so+0x1aaffdb]  void thread_entry(JavaThread*,Thread*)+0xc7
V  [libjvm.so+0x27491e9]  void JavaThread::thread_main_inner()+0x521
V  [libjvm.so+0x27488ff]  void JavaThread::run()+0x84f
V  [libjvm.so+0x22b2026]  java_start+0x1ce
C  [libc.so.1+0xdd9db]  _thr_setup+0x5b
C  [libc.so.1+0xddc10]  ht_pause+0x10


Looks like some changes in Rewriter were done in JDK-8025937, maybe it caused regression?

I've attached hs_err and core files for crash reproduced on solaris-amd64 host.