United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
Bug ID: JDK-6992189 G1: inconsistent base used in sparse rem set iterator
JDK-6992189 : G1: inconsistent base used in sparse rem set iterator

Details
Type:
Bug
Submit Date:
2010-10-14
Status:
Closed
Updated Date:
2011-04-20
Project Name:
JDK
Resolved Date:
2011-04-20
Component:
hotspot
OS:
generic
Sub-Component:
gc
CPU:
generic
Priority:
P4
Resolution:
Fixed
Affected Versions:
hs20
Fixed Versions:
hs20 (b02)

Related Reports
Backport:
Backport:

Sub Tasks

Description
I tried to use the HeapRegionRemSetIterator class directly during testing and I was getting inconsistent results from it. In particular, the card indexes it'd return would be out-of-bounds. The reason for this is that there is an inconsistency between the remembered sets and the sparse rem set iterator with respect to what each thinks the "base" of the indexes, used to represent cards in the rem sets, is. The rem sets assume that index 0 corresponds to address 0, whereas the sparse rem set iterator assumes that index 0 corresponds to the bottom fo the heap.

The way we haven't come across this before is that we initialize the iterators that we use in the G1CollectedHeap constructor and at that point not all the heap data structures are initialized. So, it looks as if the iterator constructors pick up a value of 0 for the bottom of the heap (accidentally!) and do the right thing.

                                    

Comments
SUGGESTED FIX

Just remove the _heap_bot_card_ind field and its uses from the RSHashTableIter class.
                                     
2010-10-14
EVALUATION

See Description.
                                     
2010-10-14
EVALUATION

http://hg.openjdk.java.net/jdk7/hotspot-gc/hotspot/rev/9f4848ebbabd
                                     
2010-10-16
EVALUATION

http://hg.openjdk.java.net/jdk7/build/hotspot/rev/9f4848ebbabd
                                     
2010-12-04



Hardware and Software, Engineered to Work Together