United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
Bug ID: 7069863 G1: SIGSEGV running SPECjbb2011 and -UseBiasedLocking
7069863 : G1: SIGSEGV running SPECjbb2011 and -UseBiasedLocking

Details
Type:
Bug
Submit Date:
2011-07-22
Status:
Closed
Updated Date:
2011-11-25
Project Name:
JDK
Resolved Date:
2011-11-25
Component:
hotspot
OS:
linux
Sub-Component:
gc
CPU:
x86
Priority:
P3
Resolution:
Fixed
Affected Versions:
7u2
Fixed Versions:
hs22

Related Reports
Backport:

Sub Tasks

Description
The SPECjbb2011 benchmark is failing on OEL with a SIGSEGV in java.util.concurrent.ConcurrentHashMap.get or java.util.concurrent.ConcurrentHashMap.put when G1 is enabled but Biased Locking (or UseOptoBiasInlining) is disabled:


#
# A fatal error has been detected by the Java Runtime Environment:
#
#  SIGSEGV (0xb) at pc=0x00007fdc6453cc4f, pid=29870, tid=140555764786960
#
# JRE version: 7.0-b147
# Java VM: Java HotSpot(TM) 64-Bit Server VM (21.0-b17-fastdebug mixed mode linux-amd64 compressed oops)
# Problematic frame:
# J  java.util.concurrent.ConcurrentHashMap.get(Ljava/lang/Object;)Ljava/lang/Object;
#
# Core dump written. Default location: /net/cairnapple.us.oracle.com/export/g1-coredump/core or core.29870
#
#
# If you would like to submit a bug report, please visit:
#   http://bugreport.sun.com/bugreport/crash.jsp
#
Current thread is 140555764786960
Dumping core ...


The SPECjbb2011 benchmark is attached as zip file.

The crash can be seen locally - on sc14ia03.us.oracle.com with the following script:
======================================================
#!/bin/ksh

#JHOME=/java/re/jdk/7/latest/binaries/linux-x64/fastdebug
#JHOME=/net/cairnapple.us.oracle.com/export/jdk7/linux-x64

VM_OPTIONS="-d64 -server -XX:+UseG1GC  -Xms26g -Xmx26g -Xmn8g  -XX:MaxGCPauseMillis=100 -XX:-UseBiasedLocking  -verbosegc"

#VM_OPTIONS="-d64 -server -XX:+UseG1GC  -Xms26g -Xmx26g -Xmn8g  -XX:MaxGCPauseMillis=100 -XX:-UseOptoBiasInlining -verbosegc -XX:+PrintNMethods"

echo "${JHOME}/bin/java ${VM_OPTIONS} -jar target/specjbb2011-composite.jar"

${JHOME}/bin/java ${VM_OPTIONS} -jar target/specjbb2011-composite.jar 2> err.out
====================

The original report was reported with TieredCompilation enabled but +PrintCompilation shows that the twoe methods in which the SEGV occurs have been compiled at tiered-level 4. When TieredStopAt=1 is set the test case passes.

The crash is seen with both product and fastdebug JVMs.

The crash is not seen on a similarly configured machin running solaris (sc14ia01.us.oracle.com).

The problem is also not seen with compressed oops disabled.

The crash was not seen with +PrintOptoAssembly but did occur with +PrintNMethods (without a disassebler). Using the information from PrintNMethods I was able to obtain the generated code java.util.concurrent.ConcurrentHashMap.get (attached as 29870_get.s).

Heap verification (before and after the GCs) does not detect a problem.

hs_err file is also attached.

                                    

Comments
EVALUATION

See main CR
                                     
2011-09-12
EVALUATION

http://hg.openjdk.java.net/hsx/hotspot-main/hotspot/rev/6aa4feb8a366
                                     
2011-08-17
EVALUATION

http://hg.openjdk.java.net/hsx/hotspot-rt/hotspot/rev/6aa4feb8a366
                                     
2011-08-17
EVALUATION

http://hg.openjdk.java.net/hsx/hotspot-gc/hotspot/rev/6aa4feb8a366
                                     
2011-08-02
EVALUATION

Incorrect initialization of the compressed oops mode (and resulting heap base) caused by passing a size, that was not a multiple of the required alignment, into the preferred heap base calculation.

Incorrect constructor called from G1 code.

Failure to check that the actual allocated heap base matches the requested heap base in some cases of the ReservedSpace::initialize.
                                     
2011-07-26
SUGGESTED FIX

1. Fix alignment of requested size in G1 code.
2. Call the correct ReservedSpace constructor.
3. Check that the base of the memory being reserved matches the requested base (if any).
                                     
2011-07-26



Hardware and Software, Engineered to Work Together