JDK-8154589 : assert(k != NULL) failed: preloaded klass not initialized
  • Type: Bug
  • Component: hotspot
  • Sub-Component: runtime
  • Affected Version: 8u75,9
  • Priority: P2
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2016-04-19
  • Updated: 2018-05-09
  • Resolved: 2016-05-27
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 9
9 b122Fixed
Related Reports
Relates :  
Description
The hs_err head:
#
# A fatal error has been detected by the Java Runtime Environment:
#
#  Internal Error (/tmp/workspace/8-2-build-solaris-amd64/jdk8u-cpu/6389/hotspot/src/share/vm/classfile/systemDictionary.hpp:401), pid=22976, tid=0x0000000000000006
#  assert(k != NULL) failed: preloaded klass not initialized
#
# JRE version: Java(TM) SE Runtime Environment (8.0_81-b01) (build 1.8.0_81-ea-fastdebug-langtools-nightly-h7686-20160303-b01)
# Java VM: Java HotSpot(TM) 64-Bit Server VM (25.81-b01-fastdebug mixed mode solaris-amd64 compressed oops)
# Core dump written. Default location: /export/local/aurora/sandbox/results/ResultDir/oom_stack_copy_2/core or core.22976
#
# If you would like to submit a bug report, please visit:
#   http://bugreport.java.com/bugreport/crash.jsp
#

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

Current thread (0x000000000072d800):  VMThread [stack: 0xfffffd7fa80ff000,0xfffffd7fa81ff000] [id=6]

Stack: [0xfffffd7fa80ff000,0xfffffd7fa81ff000],  sp=0xfffffd7fa81fc570,  free space=1013k
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
V  [libjvm.so+0x2a01a57]  void VMError::report(outputStream*)+0x937
V  [libjvm.so+0x2a02e4b]  void VMError::report_and_die()+0x55f
V  [libjvm.so+0x10b670b]  void report_vm_error(const char*,int,const char*,const char*)+0x55f
V  [libjvm.so+0x28937e5]  void ConcurrentLocksDump::dump_at_safepoint()+0x43d
V  [libjvm.so+0x287ab7e]  void Threads::print_on(outputStream*,bool,bool,bool)+0xcce
V  [libjvm.so+0x2a372a7]  void VM_PrintThreads::doit()+0x1b
V  [libjvm.so+0x2a366e9]  void VM_Operation::evaluate()+0xc5
V  [libjvm.so+0x2a32b9c]  void VMThread::evaluate_operation(VM_Operation*)+0x1ac
V  [libjvm.so+0x2a33889]  void VMThread::loop()+0x879
V  [libjvm.so+0x2a326be]  void VMThread::run()+0xb6
V  [libjvm.so+0x23c5e36]  java_start+0x1ce
C  [libc.so.1+0xdda9b]  _thr_setup+0x5b
C  [libc.so.1+0xddcd0]  _lwp_start+0x0

VM_Operation (0xfffffd7fa72efa10): PrintThreads, mode: safepoint, requested by thread 0x0000000000a1c000

Comments
In: bool VM_ThreadDump::doit_prologue() { assert(Thread::current()->is_Java_thread(), "just checking"); // Load AbstractOwnableSynchronizer class before taking thread snapshots java_util_concurrent_locks_AbstractOwnableSynchronizer::initialize(JavaThread::current()); if (_with_locked_synchronizers) { // Acquire Heap_lock to dump concurrent locks Heap_lock->lock(); } return true; } we do not check if an exception (like OOME) occurred trying to load the AbstractOwnableSynchronizer class. This means the VM_Operation will be posted to the VM_op queue and processed by the VMThread. So when we actually invoke doit() and proceed to retrieve the AbstractOwnableSynchronizer class, we will get NULL because it was not loaded and so hit the assert in check_klass.
25-05-2016