JDK-7119286 : JSR292: SIGSEGV in JNIHandleBlock::release_block(JNIHandleBlock*, Thread*)+0x3c
  • Type: Bug
  • Component: hotspot
  • Sub-Component: compiler
  • Affected Version: hs23
  • Priority: P2
  • Status: Closed
  • Resolution: Fixed
  • OS: generic
  • CPU: generic
  • Submitted: 2011-12-08
  • Updated: 2012-03-22
  • Resolved: 2012-02-21
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 JDK 8 Other
7u4Fixed 8Fixed hs23Fixed
Related Reports
Relates :  
Relates :  
Relates :  
Description
JCK based test
lang/EXPR/expr751/expr75101m5/expr75101m5_rt
lang/EXPR/expr751/expr75101m5/expr75101m5_rt.html
crashes in nightly with report below

;; Using jvm: "/export/local/common/jdk/baseline/linux-amd64/jre/lib/amd64/server/libjvm.so"
#
# A fatal error has been detected by the Java Runtime Environment:
#
#  SIGSEGV (0xb) at pc=0x00007f32aeccc48c, pid=2074, tid=139855649453824
#
# JRE version: 7.0-b147
# Java VM: Java HotSpot(TM) 64-Bit Server VM (23.0-b06-internal-201112030540.kvn.7117282-fastdebug compiled mode linux-amd64 )
# Problematic frame:
# V  [libjvm.so+0x7e848c]  JNIHandleBlock::release_block(JNIHandleBlock*, Thread*)+0x3c
#
# Core dump written. Default location: /export/local/56727.JDK7.NIGHTLY.VM_linux-amd64_jck_server_comp_lang_EXPR_expr751/results/core or core.2074
#
# If you would like to submit a bug report, please visit:
#   http://bugreport.sun.com/bugreport/crash.jsp
#

.....

Stack: [0x00007f32ae3e3000,0x00007f32ae4e4000],  sp=0x00007f32ae4e1e38,  free space=1019k
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
V  [libjvm.so+0x7e848c]  JNIHandleBlock::release_block(JNIHandleBlock*, Thread*)+0x3c;;  JNIHandleBlock::release_block(JNIHandleBlock*, Thread*)+0x3c
V  [libjvm.so+0x7711eb]  JavaCalls::call_helper(JavaValue*, methodHandle*, JavaCallArguments*, Thread*)+0x78b;;  JavaCalls::call_helper(JavaValue*, methodHandle*, JavaCallArguments*, Thread*)+0x78b
V  [libjvm.so+0x76ec37]  JavaCalls::call_special(JavaValue*, KlassHandle, Symbol*, Symbol*, JavaCallArguments*, Thread*)+0xc7;;  JavaCalls::call_special(JavaValue*, KlassHandle, Symbol*, Symbol*, JavaCallArguments*, Thread*)+0xc7
V  [libjvm.so+0x642b69]  Exceptions::new_exception(Thread*, Symbol*, Symbol*, JavaCallArguments*, Handle, Handle, Handle)+0x599;;  Exceptions::new_exception(Thread*, Symbol*, Symbol*, JavaCallArguments*, Handle, Handle, Handle)+0x599
V  [libjvm.so+0x642e1e]  Exceptions::new_exception(Thread*, Symbol*, char const*, Handle, Handle, Handle, Exceptions::ExceptionMsgToUtf8Mode)+0x20e;;  Exceptions::new_exception(Thread*, Symbol*, char const*, Handle, Handle, Handle, Exceptions::ExceptionMsgToUtf8Mode)+0x20e
V  [libjvm.so+0x642e9c]  Exceptions::new_exception(Thread*, Symbol*, char const*, Exceptions::ExceptionMsgToUtf8Mode)+0x6c;;  Exceptions::new_exception(Thread*, Symbol*, char const*, Exceptions::ExceptionMsgToUtf8Mode)+0x6c
V  [libjvm.so+0xb0ba8f]  SharedRuntime::throw_NullPointerException_at_call(JavaThread*)+0xdf;;  SharedRuntime::throw_NullPointerException_at_call(JavaThread*)+0xdf
v  ~RuntimeStub::NullPointerException at call throw_exception
J  javasoft.sqe.tests.lang.expr751.expr75101m5.expr75101m5.run([Ljava/lang/String;Ljava/io/PrintStream;)I

Java frames: (J=compiled Java code, j=interpreted, Vv=VM code)
v  ~RuntimeStub::NullPointerException at call throw_exception
J  javasoft.sqe.tests.lang.expr751.expr75101m5.expr75101m5.run([Ljava/lang/String;Ljava/io/PrintStream;)I
J  javasoft.sqe.tests.lang.expr751.expr75101m5.expr75101m5.main([Ljava/lang/String;)V
v  ~StubRoutines::call_stub

Comments
EVALUATION http://hg.openjdk.java.net/lambda/lambda/hotspot/rev/c742b0b47fe5
22-03-2012

EVALUATION http://hg.openjdk.java.net/hsx/hotspot-gc/hotspot/rev/c742b0b47fe5
18-02-2012

EVALUATION http://hg.openjdk.java.net/hsx/hotspot-comp/hotspot/rev/c742b0b47fe5
08-02-2012

EVALUATION A SIGSEGV happens in a method handle stub ad is used to trigger a NPE but because, the method handle stubs are called from the interpreter (or through a c2i), when the thread executes the throw_NullPointerException_at_call_entry, the stack is not properly aligned. Aligning the stack before the call in throw_NullPointerException_at_call_entry fixes the problem.
03-02-2012

EVALUATION Again unaligned (requires 16 bytes alignment) stack in the call to runtime: ;; 00007f32aeccc483 48 8b 05 ae 1e 99 00 mov 10034862(%rip),%rax # 0x00007f32af65e338 ;; 00007f32aeccc48a 8b 38 mov (%rax),%edi ;; --------------- ;; 00007f32aeccc48c 66 0f 7f 45 c0 movdqa %xmm0,0xffffffffffffffc0(%rbp) ;; 00007f32aeccc491 66 0f 7f 4d b0 movdqa %xmm1,0xffffffffffffffb0(%rbp) RBP=0x00007f32ae4e1e88 is pointing into the stack for thread: 0x00007f32a8029800 V [libjvm.so+0x7e848c] JNIHandleBlock::release_block(JNIHandleBlock*, Thread*)+0x3c;; JNIHandleBlock::release_block(JNIHandleBlock*, Thread*)+0x3c V [libjvm.so+0x7711eb] JavaCalls::call_helper(JavaValue*, methodHandle*, JavaCallArguments*, Thread*)+0x78b;; JavaCalls::call_helper(JavaValue*, methodHandle*, JavaCallArguments*, Thread*)+0x78b V [libjvm.so+0x76ec37] JavaCalls::call_special(JavaValue*, KlassHandle, Symbol*, Symbol*, JavaCallArguments*, Thread*)+0xc7;; JavaCalls::call_special(JavaValue*, KlassHandle, Symbol*, Symbol*, JavaCallArguments*, Thread*)+0xc7 V [libjvm.so+0x642b69] Exceptions::new_exception(Thread*, Symbol*, Symbol*, JavaCallArguments*, Handle, Handle, Handle)+0x599;; Exceptions::new_exception(Thread*, Symbol*, Symbol*, JavaCallArguments*, Handle, Handle, Handle)+0x599 V [libjvm.so+0x642e1e] Exceptions::new_exception(Thread*, Symbol*, char const*, Handle, Handle, Handle, Exceptions::ExceptionMsgToUtf8Mode)+0x20e;; Exceptions::new_exception(Thread*, Symbol*, char const*, Handle, Handle, Handle, Exceptions::ExceptionMsgToUtf8Mode)+0x20e V [libjvm.so+0x642e9c] Exceptions::new_exception(Thread*, Symbol*, char const*, Exceptions::ExceptionMsgToUtf8Mode)+0x6c;; Exceptions::new_exception(Thread*, Symbol*, char const*, Exceptions::ExceptionMsgToUtf8Mode)+0x6c V [libjvm.so+0xb0ba8f] SharedRuntime::throw_NullPointerException_at_call(JavaThread*)+0xdf;; SharedRuntime::throw_NullPointerException_at_call(JavaThread*)+0xdf v ~RuntimeStub::NullPointerException at call throw_exception J javasoft.sqe.tests.lang.expr751.expr75101m5.expr75101m5.run([Ljava/lang/String;Ljava/io/PrintStream;)I
08-12-2011