JDK-7088020 : SEGV in JNIHandleBlock::release_block
  • Type: Bug
  • Component: hotspot
  • Sub-Component: compiler
  • Affected Version: hs22
  • Priority: P3
  • Status: Closed
  • Resolution: Fixed
  • OS: solaris_10
  • CPU: x86
  • Submitted: 2011-09-07
  • Updated: 2013-04-24
  • Resolved: 2011-11-28
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
7u2Fixed 8Fixed hs22Fixed
Related Reports
Relates :  
Description
Several tests on linux crash like this:

#
# A fatal error has been detected by the Java Runtime Environment:
#
#  SIGSEGV (0xb) at pc=0x00007fd96584fd7c, pid=11126, tid=140571679655696
#
# JRE version: 7.0-b147
# Java VM: Java HotSpot(TM) 64-Bit Server VM (22.0-b02-internal-201109060011.never.7051798-fastdebug compiled mode linux-amd64 compressed oops)
# Problematic frame:
# V  [libjvm.so+0x7ced7c]  JNIHandleBlock::release_block(JNIHandleBlock*, Thread*)+0x3c
#
# Failed to write core dump. Core dumps have been disabled. To enable core dumping, try "ulimit -c unlimited" before starting Java again
#
# If you would like to submit a bug report, please visit:
#   http://bugreport.sun.com/bugreport/crash.jsp

The problem is misalignment of the stack when calling throw WrongMethodTypeException.  The other uses of generate_throw_exception always call it with an aligned stack but method handles don't enforce alignment while shifting arguments around.

Comments
EVALUATION See main CR
24-09-2011

EVALUATION 7088020: SEGV in JNIHandleBlock::release_block Reviewed-by: kvn, twisti The throw_WrongMethodTypeException stub on x64 needs to align the stack before calling into the runtime or it might crash. I also noticed that two stubs were dead which made an extra argument dead so I cleaned that up at the same time. Tested on linux-amd64 with new regression test and failing tests from report.
12-09-2011

EVALUATION http://hg.openjdk.java.net/hsx/hotspot-comp/hotspot/rev/c565834fb592
10-09-2011