United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
Bug ID: JDK-7098528 crash with java -XX:+ExtendedDTraceProbes
JDK-7098528 : crash with java -XX:+ExtendedDTraceProbes

Details
Type:
Bug
Submit Date:
2011-10-06
Status:
Closed
Updated Date:
2012-01-23
Project Name:
JDK
Resolved Date:
2012-01-23
Component:
hotspot
OS:
solaris_10
Sub-Component:
runtime
CPU:
x86
Priority:
P3
Resolution:
Fixed
Affected Versions:
hs22
Fixed Versions:
hs23 (b03)

Related Reports
Backport:
Relates:
Relates:

Sub Tasks

Description
crash with java -client -XX:+ExtendedDTraceProbes -version after fields in Class changes

From 7005510:


Another failure mode, the rest of the stack is the same.

#
# A fatal error has been detected by the Java Runtime Environment:
#
#  Internal Error (/tmp/jprt/P1/B/070014.dh198349/source/src/share/vm/oops/oop.inline.hpp:482), pid=10564, tid=2
#  assert(s> 0) failed: Bad size calculated
#
# JRE version: 7.0-b137
# Java VM: Java HotSpot(TM) Server VM (21.0-b05-internal-201104120700.dh198349.hotspot-fastdebug compiled mode solaris-sparc )
# Core dump written. Default location: /export/local/47437.JDK7.NIGHTLY.VM+solaris-sparc_vm_server_comp_vm.dtrace.testlist/results/ResultDir/DynamicProbes01/core or core.10564
#
# 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 (0x0003e000):  JavaThread "main" [_thread_in_vm, id=2, stack(0xfd380000,0xfd400000)]

Stack: [0xfd380000,0xfd400000],  sp=0xfd3fd010,  free space=500k
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
V  [libjvm.so+0x10f0344]  void VMError::report_and_die()+0x7d0;;  void VMError::report_and_die()+0x7d0
V  [libjvm.so+0x68cd38]  void report_vm_error(const char*,int,const char*,const char*)+0x74;;  void report_vm_error(const char*,int,const char*,const char*)+0x74
V  [libjvm.so+0x2bdb00]  int oopDesc::size_given_klass(Klass*)+0x5d8;;  int oopDesc::size_given_klass(Klass*)+0x5d8
V  [libjvm.so+0xf100d0]  int SharedRuntime::dtrace_object_alloc_base(Thread*,oopDesc*)+0x100;;  int SharedRuntime::dtrace

Full stack trace:

Stack: [0xfffffd7ffec1f000,0xfffffd7ffed1f000],  sp=0xfffffd7ffed1b1c0,  free space=1008k
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
V  [libjvm.so+0x270eb8c]  void VMError::report(outputStream*)+0x8c8
V  [libjvm.so+0x270fccd]  void VMError::report_and_die()+0x4fd
V  [libjvm.so+0xe82753]  void report_vm_error(const char*,int,const char*,const char*)+0x55f
V  [libjvm.so+0x23f0855]  int SharedRuntime::dtrace_object_alloc(oopDesc*)+0xcc1
V  [libjvm.so+0x139e312]  instanceOop instanceMirrorKlass::allocate_instance(KlassHandle,Thread*)+0x3dca
V  [libjvm.so+0x1507994]  oop java_lang_Class::create_basic_type_mirror(const char*,BasicType,Thread*)+0x4f8
V  [libjvm.so+0x2663a69]  void Universe::initialize_basic_type_mirrors(Thread*)+0x59
V  [libjvm.so+0x254b2b8]  void SystemDictionary::initialize(Thread*)+0x194
V  [libjvm.so+0x265d28c]  void Universe::genesis(Thread*)+0xdd4
V  [libjvm.so+0x2669e3e]  void universe2_init()+0x36
V  [libjvm.so+0x11f78cb]  int init_globals()+0xcf
V  [libjvm.so+0x25dd498]  int Threads::create_vm(JavaVMInitArgs*,bool*)+0x1b8
V  [libjvm.so+0x16b5808]  JNI_CreateJavaVM+0x78
C  [libjli.so+0x7295]  InitializeJVM+0x109
C  [libjli.so+0x518f]  JavaMain+0x4f
C  [libc.so.1+0x114b24]  _thrp_setup+0xbc
C  [libc.so.1+0x114df0]  _lwp_start+0x0

                                    

Comments
EVALUATION

The problem is that the dtrace and jvmti code asks for the size of the java.lang.Class instance because we've set the oop_size.
                                     
2011-10-06
EVALUATION

http://hg.openjdk.java.net/hsx/hotspot-comp/hotspot/rev/e5928e7dab26
                                     
2011-10-18
EVALUATION

7098528: crash with java -XX:+ExtendedDTraceProbes
Reviewed-by: kvn

The problem is that the dtrace and jvmti code asks for the size of the
java.lang.Class instance before we've set the oop_size.  We could just
pass the size argument down through the various interfaces but that
seems fragile.  Instead I changed the initialization path for Class
instances to setup the indirections earlier so that the dtrace paths
work correctly.  Tested with failing command from bug report.
                                     
2011-10-18
EVALUATION

See main CR
                                     
2011-10-28



Hardware and Software, Engineered to Work Together