United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
Bug ID: JDK-6958254 -XX:+VerifyOops is broken on x86
JDK-6958254 : -XX:+VerifyOops is broken on x86

Details
Type:
Bug
Submit Date:
2010-06-03
Status:
Closed
Updated Date:
2011-03-08
Project Name:
JDK
Resolved Date:
2011-03-08
Component:
hotspot
OS:
solaris
Sub-Component:
compiler
CPU:
sparc
Priority:
P4
Resolution:
Fixed
Affected Versions:
hs19
Fixed Versions:
hs19 (b03)

Related Reports
Backport:
Backport:
Backport:
Backport:

Sub Tasks

Description
Note: it fails with all GCs.

% java -d64 -Xbatch -XX:CICompilerCount=1 -XX:+PrintCompilation -XX:+UseConcMarkSweepGC -XX:+VerifyOops -Xmx128M -XX:+UseCompressedOops -XX:+PrintCompressedOopsMode -jar GCBasher.jar -time:300000 
VM option 'CICompilerCount=1'
VM option '+PrintCompilation'
VM option '+UseConcMarkSweepGC'
VM option '+VerifyOops'
VM option '+UseCompressedOops'
VM option '+PrintCompressedOopsMode'

heap address: 0x00000000f2c00000, zero based Compressed Oops, 32-bits Oops

  1   b   java.lang.String::startsWith (78 bytes)
  2   b   java.lang.Object::<init> (1 bytes)
  3   b   java.util.zip.ZipFile::access$300 (5 bytes)
  4   b   java.util.zip.ZipFile::ensureOpen (37 bytes)
  5   b   java.util.zip.ZipFile::access$100 (5 bytes)
  6   b   Fastparser::readUTF (387 bytes)
#
# A fatal error has been detected by the Java Runtime Environment:
#
#  SIGSEGV (0xb) at pc=0xfffffd7ff72fdf02, pid=8327, tid=2
#
# JRE version: 6.0_21-b05
# Java VM: Java HotSpot(TM) 64-Bit Server VM (17.0-b15-fastdebug mixed mode solaris-amd64 compressed oops)
# Problematic frame:
# J  Fastparser.readUTF()Ljava/lang/String;
#
# An error report file with more information is saved as:
# /home/kvn/hs_err_pid8327.log
#
# If you would like to submit a bug report, please visit:
#   http://java.sun.com/webapps/bugreport/crash.jsp
#
Current thread is 2
Dumping core ...
Abort

i% java -d64 -Xbatch -XX:CICompilerCount=1 -XX:+PrintCompilation -XX:+UseConcMarkSweepGC -XX:+VerifyOops -Xmx128M -XX:+UseCompressedOops -XX:+PrintCompressedOopsMode -jar GCBasher.jar -time:300000
VM option 'CICompilerCount=1'
VM option '+PrintCompilation'
VM option '+UseConcMarkSweepGC'
VM option '+VerifyOops'
VM option '+UseCompressedOops'
VM option '+PrintCompressedOopsMode'

heap address: 0x00000000f2c00000, zero based Compressed Oops, 32-bits Oops

  1   b   sun.nio.cs.UTF_8$Decoder::decodeArrayLoop (553 bytes)
  2   b   java.lang.String::startsWith (78 bytes)
  3   b   java.lang.Object::<init> (1 bytes)
  4   b   java.nio.Buffer::position (43 bytes)
  5   b   java.nio.charset.CoderResult::isUnderflow (13 bytes)
---   n   java.util.zip.ZipFile::getEntryBytes (static)
  6   b   java.nio.Buffer::limit (62 bytes)
  7   b   java.nio.Buffer::<init> (121 bytes)
  8   b   java.util.zip.ZipFile::access$300 (5 bytes)
  9   b   java.util.zip.ZipFile::ensureOpen (37 bytes)
 10   b   java.util.zip.ZipFile::access$100 (5 bytes)
 11   b   Fastparser::readUTF (387 bytes)
 12   b   java.lang.String::equals (88 bytes)
 13   b   Fastparser::readUnsignedShort (49 bytes)
 14   b   java.lang.String::hashCode (67 bytes)
 15   b   Decompiler::decodeMethodDependencies (949 bytes)
 16   b   Fastparser::readUnsignedByte (21 bytes)
 17   b   ConstantPoolEntry::<init> (10 bytes)
 18   b   Decompiler::decodeConstantPool (440 bytes)
#
# A fatal error has been detected by the Java Runtime Environment:
#
#  SIGSEGV (0xb) at pc=0xfffffd7ff7308499, pid=8328, tid=2
#
# JRE version: 7.0-b95
# Java VM: Java HotSpot(TM) 64-Bit Server VM (19.0-b01-fastdebug mixed mode solaris-amd64 compressed oops)
# Problematic frame:
# J  Decompiler.decodeConstantPool()V
#
# An error report file with more information is saved as:
# /home/kvn/hs_err_pid8328.log
#
# If you would like to submit a bug report, please visit:
#   http://java.sun.com/webapps/bugreport/crash.jsp
#
Current thread is 2
Dumping core ...
Abort

                                    

Comments
EVALUATION

The next instruction in verify_oop() trashes r10 since stub address is far in 64bit VM:

  movptr(rax, ExternalAddress(StubRoutines::verify_oop_subroutine_entry_address()));

Also verify_oop() does not restore RAX.
                                     
2010-06-03
EVALUATION

http://hg.openjdk.java.net/jdk7/hotspot-comp/hotspot/rev/02e771df338e
                                     
2010-06-03
PUBLIC COMMENTS

Save r10 (rscratch1) since movptr() instruction in verify_oop() trashes it.
                                     
2010-06-04



Hardware and Software, Engineered to Work Together