JDK-6502237 : HPI sysMonitorExit is broken on linux-amd64
  • Type: Bug
  • Component: hotspot
  • Sub-Component: runtime
  • Affected Version: 7
  • Priority: P3
  • Status: Closed
  • Resolution: Duplicate
  • OS: linux_redhat_3.0
  • CPU: x86
  • Submitted: 2006-12-08
  • Updated: 2010-08-07
  • Resolved: 2006-12-14
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 7
7Resolved
Related Reports
Duplicate :  
Relates :  
Relates :  
Relates :  
Description
host machine: balsawood.east

Running nsk test runtime/ParallelClassLoading/stress-redefine/holdLock/reflect/inner-complex crashed with the following error:

#
# An unexpected error has been detected by Java Runtime Environment:
#
#  Internal Error (/java/east/u2/dh198349/ws-bug6498391/src/share/vm/runtime/hpi.cpp, 14), pid=10847, tid=1088649584
#
# Java VM: Java HotSpot(TM) 64-Bit Server VM (1.7.0-internal-dh198349-fastdebug mixed mode)
#
# Error: Unimplemented()
# 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 (0x0000002abee6a400):  JavaThread "Loading Thread #2" [_thread_in_vm, id=10863]

Stack: [0x0000000040d37000,0x0000000040e38000),  sp=0x0000000040e35b30,  free space=1018k
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
V  [libjvm.so+0x9a715c];;  _ZN7VMError14report_and_dieEv+0x23c
V  [libjvm.so+0x3b0bd6];;  _Z20report_unimplementedPKci+0x66
V  [libjvm.so+0x4610ba];;  unimplemented_panic+0x7a

Java frames: (J=compiled Java code, j=interpreted, Vv=VM code)
j sun.reflect.NativeMethodAccessorImpl.invoke0(Ljava/lang/reflect/Method;Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;+0
j sun.reflect.NativeMethodAccessorImpl.invoke(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;+87
j sun.reflect.DelegatingMethodAccessorImpl.invoke(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;+6
j java.lang.reflect.Method.invoke(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;+161
j custom.Invoker.invoke(Ljava/lang/Object;Ljava/lang/reflect/Method;[Ljava/lang/Object;)Ljava/lang/Object;+42
j  $Proxy1.generatedCode()V+9
j  custom.R2.call(Ljava/lang/Class;)V+37
j  custom.R2.load_AllReflectionMethods()V+23
j  custom.R2.<init>()V+5
j  custom.R2.<clinit>()V+104
v  ~StubRoutines::call_stub
j java.lang.Class.forName0(Ljava/lang/String;ZLjava/lang/ClassLoader;)Ljava/lang/Class;+0
j java.lang.Class.forName(Ljava/lang/String;ZLjava/lang/ClassLoader;)Ljava/lang/Class;+32
j runtime.ParallelClassLoading.shared.ProvokeType.provoke(Ljava/lang/ClassLoader;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V+58
j runtime.ParallelClassLoading.shared.ProvokeType.provoke(Ljava/lang/ClassLoader;Ljava/lang/String;)V+8
j  runtime.ParallelClassLoading.shared.ClassLoadingThread.run()V+83
v  ~StubRoutines::call_stub


Examination of the core revealed:

gdb) where
#0  0x0000002a959e0445 in raise () from /lib64/tls/libc.so.6
#1  0x0000002a959e1bb3 in abort () from /lib64/tls/libc.so.6
#2  0x0000002a963b259c in os::abort ()
   from /scratch/dh198349/ws-bug6498391/linux-amd64/fastdebug/jre/lib/amd64/server/libjvm.so
#3  0x0000002a9659d204 in VMError::report_and_die ()
   from /scratch/dh198349/ws-bug6498391/linux-amd64/fastdebug/jre/lib/amd64/server/libjvm.so
#4  0x0000002a95fa6bd6 in report_unimplemented ()
   from /scratch/dh198349/ws-bug6498391/linux-amd64/fastdebug/jre/lib/amd64/server/libjvm.so
#5  0x0000002a960570ba in unimplemented_panic ()
   from /scratch/dh198349/ws-bug6498391/linux-amd64/fastdebug/jre/lib/amd64/server/libjvm.so
#6  0x0000002a96b3ee03 in sysMonitorExit ()
   from /scratch/dh198349/ws-bug6498391/linux-amd64/fastdebug/jre/lib/amd64/native_threads/libhpi.so
#7  0x0000002a96b4161a in sysFindLibraryEntry ()
   from /scratch/dh198349/ws-bug6498391/linux-amd64/fastdebug/jre/lib/amd64/native_threads/libhpi.so
#8  0x0000002a96385248 in NativeLookup::lookup_style ()
   from /scratch/dh198349/ws-bug6498391/linux-amd64/fastdebug/jre/lib/amd64/server/libjvm.so
#9  0x0000002a963853a5 in NativeLookup::lookup_entry ()
   from /scratch/dh198349/ws-bug6498391/linux-amd64/fastdebug/jre/lib/amd64/server/libjvm.so
#10 0x0000002a96385cb7 in NativeLookup::lookup_base ()
   from /scratch/dh198349/ws-bug6498391/linux-amd64/fastdebug/jre/lib/amd64/server/libjvm.so
#11 0x0000002a96385f8e in NativeLookup::lookup ()
   from /scratch/dh198349/ws-bug6498391/linux-amd64/fastdebug/jre/lib/amd64/server/libjvm.so
#12 0x0000002a960b57b8 in InterpreterRuntime::prepare_native_call ()
   from /scratch/dh198349/ws-bug6498391/linux-amd64/fastdebug/jre/lib/amd64/server/libjvm.so
#13 0x0000002a975638f0 in ?? ()
#14 0x0000000040e36080 in ?? ()
#15 0x0000002a97563837 in ?? ()
---Type <return> to continue, or q <return> to quit---
#16 0x0000000040e360f0 in ?? ()
#17 0x0000002abee6b0f8 in ?? ()
#18 0x0000000040e360a0 in ?? ()
#19 0x0000002a975a632e in ?? ()
#20 0x00000000000000b8 in ?? ()
#21 0x0000002a975a6415 in ?? ()
#22 0x0000000040e36020 in ?? ()
#23 0x0000002a9a9a4698 in ?? ()
#24 0x0000000040e360a8 in ?? ()
#25 0x0000002a9a9a4ad8 in ?? ()
#26 0x0000000000000000 in ?? () 

So we appear to have tried to call hpi::sysMonitorExit

But according according to 4919401 the HPI sysThreadxxx and sysMonitorxxx are obsolete, broken and should be removed. So we should never have been calling this code anyway.

Comments
EVALUATION Since this bug covers 2 issues I'm going to do the following: change this bug to cover only the broken sysMonitorxxx() issue; as such it will be marked duplicate of 6341237. A new Hotspot bug will be filed to fix the unimplemented panic() callback.
14-12-2006

EVALUATION libhpi.so sysMonitorExit is broken (see 4919401) and causes an assertion failure in the debug build. HPI sysAssert calls the JVM HPI panic() callback which is unimplemented, resulting in the Unimplemented() crash. See comments for more detail.
11-12-2006