JDK-6812428 : G1: Error: assert(!ret || obj_in_cs(obj),"sanity")
  • Type: Bug
  • Component: hotspot
  • Sub-Component: gc
  • Affected Version: hs15
  • Priority: P2
  • Status: Resolved
  • Resolution: Fixed
  • OS: generic
  • CPU: generic
  • Submitted: 2009-03-03
  • Updated: 2010-04-04
  • Resolved: 2009-03-18
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 6 JDK 7 Other
6u14Fixed 7Fixed hs14Fixed
Related Reports
Relates :  
While testing I came across this failure:

4.302: [GC pause (young)# To suppress the following error report, specify this a
# 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

EVALUATION http://hg.openjdk.java.net/jdk7/hotspot-gc/hotspot/rev/ae1579717a57

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.

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.