Open JDK8 fast-debug : crashes on Solaris Sparc T4 machines

Baesken, Matthias matthias.baesken at
Wed Feb 12 15:48:03 UTC 2014

I noticed when building Open JDK 8 fast-debug with Sun Studio 12 on Solaris Sparc,
the VM crashes early when executed on T4 based machines (both T4 based Solaris Sparc10 and 11 machines);
I cannot see the issue on older Sparc processors or Fujitsu SPARC64.
The  Crashes look like this :

  <maindir>/results/SS12/images/j2sdk-image/bin/java -version
# To suppress the following error report, specify this argument
# after -XX: or in .hotspotrc:  SuppressErrorAt=/jni.cpp:278
# A fatal error has been detected by the Java Runtime Environment:
#  Internal Error (/net/, pid=27252, tid=2
#  guarantee(klass_hash_ok(k, id)) failed: Bug in native code: jfieldID class must match object
# JRE version:  (8.0) (build )
# Java VM: OpenJDK 64-Bit Server VM (25.0-b69-fastdebug mixed mode solaris-sparc compressed oops)
# Core dump written. Default location: //core or core.27252
# An error report file with more information is saved as:
# //hs_err_pid27252.log
# If you would like to submit a bug report, please visit:
Current thread is 2
Dumping core ...
Abort (core dumped)

With Stack in the hs_err file  :

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

Current thread (0x0000000100111800):  JavaThread "main" [_thread_in_vm, id=2, stack(0xffffffff7e200000,0xffffffff7e300000)]

Stack: [0xffffffff7e200000,0xffffffff7e300000],  sp=0xffffffff7e2fdd50,  free space=1015k
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
V  []  void VMError::report_and_die()+0x504
V  []  void report_vm_error(const char*,int,const char*,const char*)+0x78
V  []  void jfieldIDWorkaround::verify_instance_jfieldID(Klass*,_jfieldID*)+0xa8
V  []  _jfieldID*jfieldIDWorkaround::to_instance_jfieldID(Klass*,int)+0x60
V  []  jni_GetFieldID+0x52c
C  []  Java_java_io_FileInputStream_initIDs+0x44
v  ~StubRoutines::call_stub
V  []  void JavaCalls::call_helper(JavaValue*,methodHandle*,JavaCallArguments*,Thread*)+0x4e4
V  []  void InstanceKlass::call_class_initializer_impl(instanceKlassHandle,Thread*)+0x224
V  []  void InstanceKlass::call_class_initializer(Thread*)+0x24
V  []  void InstanceKlass::initialize_impl(instanceKlassHandle,Thread*)+0xb08
V  []  void InstanceKlass::initialize(Thread*)+0x5c
V  []  void InterpreterRuntime::_new(JavaThread*,ConstantPool*,int)+0x254
j  java.lang.System.initializeSystemClass()V+37
v  ~StubRoutines::call_stub
V  []  void JavaCalls::call_helper(JavaValue*,methodHandle*,JavaCallArguments*,Thread*)+0x4e4
V  []  void JavaCalls::call_static(JavaValue*,KlassHandle,Symbol*,Symbol*,JavaCallArguments*,Thread*)+0x104
V  []  void JavaCalls::call_static(JavaValue*,KlassHandle,Symbol*,Symbol*,Thread*)+0x64
V  []  void call_initializeSystemClass(Thread*)+0x80
V  []  int Threads::create_vm(JavaVMInitArgs*,bool*)+0x76c
V  []  JNI_CreateJavaVM+0xe4
C  []  InitializeJVM+0x104
C  []  JavaMain+0x68

When building with Sun Studio 12u1 (instead of 12) the crash does not occur, see :

  <maindir>/results/SS12u1/images/j2sdk-image/bin/java -version
openjdk version "1.8.0-internal-fastdebug"
OpenJDK Runtime Environment (build 1.8.0-internal-fastdebug-d040975_2014_02_12_15_29-b00)
OpenJDK 64-Bit Server VM (build 25.0-b69-fastdebug, mixed mode)

Is this a known issue with SunStudio12 build results on T4 Processors ?

I changed the used optimization flags in the fast-debug build from  -xO4  to -xO2 and the problem disappeared.
Could this  be done in the configuration  when SunStudio 12 is detected ?

Thanks, Matthias

More information about the build-dev mailing list