United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
Bug ID: JDK-6812428 G1: Error: assert(!ret || obj_in_cs(obj),"sanity")
JDK-6812428 : G1: Error: assert(!ret || obj_in_cs(obj),"sanity")

Details
Type:
Bug
Submit Date:
2009-03-03
Status:
Resolved
Updated Date:
2010-04-04
Project Name:
JDK
Resolved Date:
2009-03-18
Component:
hotspot
OS:
generic
Sub-Component:
gc
CPU:
generic
Priority:
P2
Resolution:
Fixed
Affected Versions:
hs15
Fixed Versions:
hs15 (b03)

Related Reports
Backport:
Backport:
Backport:
Backport:
Relates:

Sub Tasks

Description
While testing I came across this failure:

4.302: [GC pause (young)# To suppress the following error report, specify this a
rgument
# after -XX: or in .hotspotrc:  SuppressErrorAt=/g1CollectedHeap.hpp:423
#
# A fatal error has been detected by the Java Runtime Environment:
#
#  Internal Error (/java/east/u2/ap31282/hotspot-g1-tmp/src/share/vm/gc_implementation/g1/g1CollectedHeap.hpp:423), pid=18586, tid=8
#  Error: assert(!ret || obj_in_cs(obj),"sanity")
#
# JRE version: 6.0_04-b12
# Java VM: OpenJDK Server VM (15.0-b01-internal-fastdebug mixed mode solaris-sparc )
# An error report file with more information is saved as:
# /java/east/u2/ap31282/gc_test_suite_sparc/specjvm98/hs_err_pid18586.log
#
# If you would like to submit a bug report, please visit:
#   http://java.sun.com/webapps/bugreport/crash.jsp
#

                                    

Comments
SUGGESTED FIX

The very straightforward fix is to use max_regions() (i.e., the number of reserved regions) instead of n_regions() (i.e., the number of committed regions at the beginning of the GC) when setting up the fast cset vector.
                                     
2009-03-03
EVALUATION

The problem is caused by my fix for the evacuation pause efficiency improvements (6484956). When I set up the byte vector which denotes which regions are in the collection set (the vector for the fast cset test), I used n_regions() to decide its size. However, the number of regions can actually be increased during the GC. If this happens and we try to look up into the fast cset test vector, we'll fall off its edge and read junk.
                                     
2009-03-03
EVALUATION

http://hg.openjdk.java.net/jdk7/hotspot-gc/hotspot/rev/ae1579717a57
                                     
2009-03-08



Hardware and Software, Engineered to Work Together