JDK-8060167 : Crash during PrintThreads VM operation
  • Type: Bug
  • Component: hotspot
  • Sub-Component: runtime
  • Affected Version: 9
  • Priority: P2
  • Status: Closed
  • Resolution: Duplicate
  • Submitted: 2014-10-12
  • Updated: 2014-10-13
  • Resolved: 2014-10-13
Related Reports
Duplicate :  
Description
#
# A fatal error has been detected by the Java Runtime Environment:
#
#  Internal Error (/opt/jprt/T/P1/130200.anoll/s/hotspot/src/share/vm/runtime/synchronizer.cpp:571), pid=14999, tid=46
#  assert(Universe::verify_in_progress() || !SafepointSynchronize::is_at_safepoint()) failed: biases should not be seen by VM thread here
#
# JRE version: Java(TM) SE Runtime Environment (9.0) (build 1.9.0-internal-fastdebug-201410101302.anoll.hs-comp-b00)
# Java VM: Java HotSpot(TM) 64-Bit Server VM (1.9.0-internal-fastdebug-201410101302.anoll.hs-comp-b00 compiled mode solaris-sparc compressed oops)
# Core dump written. Default location: /scratch/local/aurora/sandbox/results/ResultDir/deoptimize/core or core.14999
#
# 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 (0x000000010046d800):  VMThread [stack: 0xffffffff2ba00000,0xffffffff2bb00000] [id=46]

Stack: [0xffffffff2ba00000,0xffffffff2bb00000],  sp=0xffffffff2bafe200,  free space=1016k
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
V  [libjvm.so+0x15f61a8]  void VMError::report_and_die()+0x700;;  __1cHVMErrorOreport_and_die6M_v_+0x700
V  [libjvm.so+0xa71f40]  void report_vm_error(const char*,int,const char*,const char*)+0x70;;  __1cPreport_vm_error6Fpkci11_v_+0x70
V  [libjvm.so+0x14d69f4]  long ObjectSynchronizer::FastHashCode(Thread*,oop)+0xec;;  __1cSObjectSynchronizerMFastHashCode6FpnGThread_nDoop__l_+0xec
V  [libjvm.so+0x14d70d8]  long ObjectSynchronizer::identity_hash_value_for(Handle)+0x78;;  __1cSObjectSynchronizerXidentity_hash_value_for6FnGHandle__l_+0x78
V  [libjvm.so+0x128d6e4]  long oopDesc::slow_identity_hash()+0xfc;;  __1cHoopDescSslow_identity_hash6M_l_+0xfc
V  [libjvm.so+0x105b10c]  const char*Klass::external_name()const+0x19c;;  __1cFKlassNexternal_name6kM_pkc_+0x19c
V  [libjvm.so+0xd93238]  char*java_lang_Throwable::print_stack_element_to_buffer(Handle,int,int,int)+0x150;;  __1cTjava_lang_ThrowablebDprint_stack_element_to_buffer6FnGHandle_iii_pc_+0x150
V  [libjvm.so+0xd93860]  void java_lang_Throwable::print_stack_element(outputStream*,Handle,int,int,int)+0xc8;;  __1cTjava_lang_ThrowableTprint_stack_element6FpnMoutputStream_nGHandle_iii_v_+0xc8
V  [libjvm.so+0xd93a88]  void java_lang_Throwable::print_stack_element(outputStream*,methodHandle,int)+0x190;;  __1cTjava_lang_ThrowableTprint_stack_element6FpnMoutputStream_nMmethodHandle_i_v_+0x190
V  [libjvm.so+0x153dacc]  void JavaThread::print_stack_on(outputStream*)+0x25c;;  __1cKJavaThreadOprint_stack_on6MpnMoutputStream__v_+0x25c
V  [libjvm.so+0x154342c]  void Threads::print_on(outputStream*,bool,bool,bool)+0x914;;  __1cHThreadsIprint_on6FpnMoutputStream_bbb_v_+0x914
V  [libjvm.so+0x16284bc]  void VM_Operation::evaluate()+0xf4;;  __1cMVM_OperationIevaluate6M_v_+0xf4
V  [libjvm.so+0x1624230]  void VMThread::evaluate_operation(VM_Operation*)+0x248;;  __1cIVMThreadSevaluate_operation6MpnMVM_Operation__v_+0x248
V  [libjvm.so+0x1624c74]  void VMThread::loop()+0x5e4;;  __1cIVMThreadEloop6M_v_+0x5e4
V  [libjvm.so+0x1623d10]  void VMThread::run()+0xe0;;  __1cIVMThreadDrun6M_v_+0xe0
V  [libjvm.so+0x12abefc]  java_start+0x3fc;;  java_start+0x3fc

VM_Operation (0xffffffff156ff920): PrintThreads, mode: safepoint, requested by thread 0x00000001063f3000

Comments
Thanks Vladimir - closed as dup of JDK-8059924.
13-10-2014

Does it relate to JDK-8059924?
13-10-2014

Though the comment and the code here don't seem to match: intptr_t ObjectSynchronizer::FastHashCode(Thread * Self, oop obj) { if (UseBiasedLocking) { // NOTE: many places throughout the JVM do not expect a safepoint // to be taken here, in particular most operations on perm gen // objects. However, we only ever bias Java instances and all of // the call sites of identity_hash that might revoke biases have // been checked to make sure they can handle a safepoint. The // added check of the bias pattern is to avoid useless calls to // thread-local storage. if (obj->mark()->has_bias_pattern()) { // Handle for oop obj in case of STW safepoint Handle hobj(Self, obj); // Relaxing assertion for bug 6320749. assert(Universe::verify_in_progress() || !SafepointSynchronize::is_at_safepoint(), "biases should not be seen by VM thread here"); BiasedLocking::revoke_and_rebias(hobj, false, JavaThread::current()); obj = hobj(); assert(!obj->mark()->has_bias_pattern(), "biases should be revoked by now"); } } If we have checked that safepoints are okay (ie that revoke_and_rebias can safely trigger a safepoint if needed) then why are we asserting that we are not already within a safepoint context? It is very unclear why the VM thread should be seeing biases.
13-10-2014

Looks like there is an "impedance" mismatch. Klass:external_name uses identity_hash() with anonymous classes. external_name() can be called at safepoints; but the underlying FastHashCode logic can not.
13-10-2014