JDK-6991556 : assert(SharedSkipVerify || obj->is_oop()) failed: sanity check with MethodHandles test
  • Type: Bug
  • Component: hotspot
  • Sub-Component: compiler
  • Affected Version: hs20
  • Priority: P3
  • Status: Closed
  • Resolution: Duplicate
  • OS: generic
  • CPU: generic
  • Submitted: 2010-10-13
  • Updated: 2012-02-01
  • Resolved: 2010-12-20
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 :  
Description
Test
	java/dyn/MethodHandlesTest.java
fails with

# A fatal error has been detected by the Java Runtime Environment:
#
#  Internal Error (/tmp/jprt/P1/B/092216.ct232829/source/src/share/vm/runtime/handles.cpp:32), pid=1854, tid=1087961408
#  assert(SharedSkipVerify || obj->is_oop()) failed: sanity check

Current thread (0x00000000068f3000):  JavaThread "MainThread" [_thread_in_vm, id=1957, stack(0x0000000040c8f000,0x0000000040d90000)]

Stack: [0x0000000040c8f000,0x0000000040d90000],  sp=0x0000000040d8bdb0,  free space=1011k
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
V  [libjvm.so+0xb6ec4c];;  VMError::report(outputStream*)+0x116c
V  [libjvm.so+0xb6f01c];;  VMError::report_and_die()+0x2dc
V  [libjvm.so+0x58a5b4];;  report_vm_error(char const*, int, char const*, char const*)+0x84
V  [libjvm.so+0x68a197];;  HandleArea::allocate_handle(oopDesc*)+0xa7
V  [libjvm.so+0x68a925];;  Handle::Handle(Thread*, oopDesc*)+0x75
V  [libjvm.so+0xa58223];;  SharedRuntime::find_callee_info_helper(JavaThread*, vframeStream&, Bytecodes::Code&, CallInfo&, Thread*)+0x223
V  [libjvm.so+0xa5a92e];;  SharedRuntime::find_callee_info(JavaThread*, Bytecodes::Code&, CallInfo&, Thread*)+0x1de
V  [libjvm.so+0xa5aa7c];;  SharedRuntime::resolve_sub_helper(JavaThread*, bool, bool, Thread*)+0x10c
V  [libjvm.so+0xa5afb2];;  SharedRuntime::resolve_helper(JavaThread*, bool, bool, Thread*)+0x32
V  [libjvm.so+0xa60231];;  SharedRuntime::resolve_opt_virtual_call_C(JavaThread*)+0x121
v  ~RuntimeStub::resolve_opt_virtual_call

Java frames: (J=compiled Java code, j=interpreted, Vv=VM code)
v  ~RuntimeStub::resolve_opt_virtual_call
J  test.java.dyn.MethodHandlesTest.testCastFailure()V
...

Comments
EVALUATION This is not GC related (it happens with UseSerialGC too and actually there is no GC happening). It's reproducible on x64 with and without compressed oops. I can not reproduce it on x86 and SPARC though. $ gamma -XX:+UnlockExperimentalVMOptions -XX:+EnableInvokeDynamic -Xcomp -XX:-UseCompressedOops -cp /java/devtools/share/junit/latest/junit.jar:. org.junit.runner.JUnitCore test.java.dyn.MethodHandlesTest Without COOP: # SIGSEGV (0xb) at pc=0xfffffd7ffa467d00, pid=13059, tid=1 # # JRE version: 7.0-b119 # Java VM: OpenJDK 64-Bit Server VM (20.0-b03-internal-jvmg compiled mode solaris-amd64 ) # Problematic frame: # J java.util.Arrays$ArrayList.toArray()[Ljava/lang/Object; With COOP: # Internal Error (/home/ct232829/hotspot-comp/hotspot/src/share/vm/runtime/handles.cpp:46), pid=13073, tid=1 # assert(SharedSkipVerify || obj->is_oop()) failed: sanity check # # JRE version: 7.0-b119 # Java VM: OpenJDK 64-Bit Server VM (20.0-b03-internal-jvmg compiled mode solaris-amd64 compressed oops)
01-12-2010