JDK-7006471 : fix for 6988439 crashes when pending list lock is null
  • Type: Bug
  • Component: hotspot
  • Sub-Component: runtime
  • Affected Version: hs20
  • Priority: P2
  • Status: Closed
  • Resolution: Fixed
  • OS: generic
  • CPU: generic
  • Submitted: 2010-12-13
  • Updated: 2011-03-08
  • Resolved: 2011-03-08
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 6 JDK 7 Other
6u25Fixed 7Fixed hs20Fixed
Description
nsk/regression/b6298299 
this tests crashes because we're checking whether the pending_list_lock is held by the current thread before the pending_list_lock is initialized.

#
# A fatal error has been detected by the Java Runtime Environment:
#
#  Internal Error (c:\users\coleenp\vschange\src\share\vm\runtime/handles.hpp:81
), pid=3340, tid=932
#  assert(_handle != NULL) failed: resolving NULL handle
#
# JRE version: 7.0
# Java VM: Java HotSpot(TM) Server VM (20.0-b03-debug mixed mode windows-x86 )
# If you would like to submit a bug report, please visit:
#   http://java.sun.com/webapps/bugreport/crash.jsp
#

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

Current thread (0x003e9800):  JavaThread "Unknown thread" [_thread_in_vm, id=932
, stack(0x00920000,0x00970000)]

Stack: [0x00920000,0x00970000],  sp=0x0096f3e0,  free space=316k
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
V  [jvm.dll+0x27ccad]  VMError::report+0x9dd
V  [jvm.dll+0x27db7b]  VMError::report_and_die+0x4ab
V  [jvm.dll+0x273606]  report_vm_error+0x56
V  [jvm.dll+0x102c5]  Handle::non_null_obj+0x25
V  [jvm.dll+0x1bb4f]  KlassHandle::non_null_obj+0xf
V  [jvm.dll+0x1f85ef]  BiasedLocking::revoke_and_rebias+0x3f
V  [jvm.dll+0x2400a0]  ObjectSynchronizer::current_thread_holds_lock+0x20
V  [jvm.dll+0x1273b3]  instanceRefKlass::owns_pending_list_lock+0x23
V  [jvm.dll+0x13408f]  methodOopDesc::build_interpreter_method_data+0xf
V  [jvm.dll+0xb17f9]  InterpreterRuntime::profile_method+0x179
j  java.lang.Object.<clinit>()V+0
v  ~StubRoutines::call_stub
V  [jvm.dll+0x20f3a5]  JavaCalls::call_helper+0x3c5
V  [jvm.dll+0x30714c]  os::os_exception_wrapper+0xac
V  [jvm.dll+0x20efd2]  JavaCalls::call+0x52
V  [jvm.dll+0x10ad97]  instanceKlass::call_class_initializer_impl+0x127
V  [jvm.dll+0x10ac3b]  instanceKlass::call_class_initializer+0x2b
V  [jvm.dll+0x109eec]  instanceKlass::initialize_impl+0x3fc
V  [jvm.dll+0x1091bb]  instanceKlass::initialize+0x4b
V  [jvm.dll+0x109dd5]  instanceKlass::initialize_impl+0x2e5
V  [jvm.dll+0x1091bb]  instanceKlass::initialize+0x4b
V  [jvm.dll+0x2495ec]  initialize_class+0x4c
V  [jvm.dll+0x248691]  Threads::create_vm+0x511
V  [jvm.dll+0x16878f]  JNI_CreateJavaVM+0x7f
C  [java.exe+0x13c8]
...

Comments
EVALUATION http://hg.openjdk.java.net/jdk7/build/hotspot/rev/b03e6b4c7c75
25-12-2010

EVALUATION Summary: missing null check in owns_pending_list_lock() because this can be called before pending_list_lock is initialized.
15-12-2010

EVALUATION http://hg.openjdk.java.net/jdk7/hotspot-rt/hotspot/rev/b03e6b4c7c75
15-12-2010

SUGGESTED FIX Check PLL is null in owns_pending_list_lock().
13-12-2010