United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
Bug ID: JDK-6728478 Assertion at parallel promotion from young to old generation
JDK-6728478 : Assertion at parallel promotion from young to old generation

Details
Type:
Bug
Submit Date:
2008-07-22
Status:
Resolved
Updated Date:
2010-12-07
Project Name:
JDK
Resolved Date:
2008-09-12
Component:
hotspot
OS:
generic
Sub-Component:
gc
CPU:
generic
Priority:
P3
Resolution:
Fixed
Affected Versions:
hs11
Fixed Versions:
hs14 (b04)

Related Reports
Backport:
Backport:

Sub Tasks

Description
Problem Description    : Fastdebug JVM could fail with assertion "bad address from index" in blockOffsetTable.inline.hpp

                                    

Comments
EVALUATION

See the comments for more details on the root cause of this failure.

The method address_for_index() was being passed an index outside
the limits of the block offset table.
                                     
2008-08-06
SUGGESTED FIX

diff --git a/src/share/vm/memory/blockOffsetTable.hpp b/src/share/vm/memory/blockOffsetTable.hpp
--- a/src/share/vm/memory/blockOffsetTable.hpp
+++ b/src/share/vm/memory/blockOffsetTable.hpp
@@ -198,6 +198,10 @@ public:
   // Return the address indicating the start of the region corresponding to
   // "index" in "_offset_array".
   HeapWord* address_for_index(size_t index) const;
+
+  // Return the address "p" incremented by the size of
+  // a region.
+  HeapWord* inc_by_region_size(HeapWord* p) const { return p + N_words; }

   // Shared space support
   void serialize(SerializeOopClosure* soc, HeapWord* start, HeapWord* end);


diff --git a/src/share/vm/gc_implementation/parNew/parGCAllocBuffer.cpp b/src/share/vm/gc_implementation/parNew/parGCAllocBuffer.cpp
--- a/src/share/vm/gc_implementation/parNew/parGCAllocBuffer.cpp
+++ b/src/share/vm/gc_implementation/parNew/parGCAllocBuffer.cpp
@@ -229,7 +229,7 @@ void ParGCAllocBufferWithBOT::retire(boo
     HeapWord* first_card_start = _bsa->address_for_index(first_card_index);
     if (first_card_start < pre_top) {
       HeapWord* second_card_start =
-        _bsa->address_for_index(first_card_index + 1);
+        _bsa->inc_by_region_size(first_card_start);

       // Ensure enough room to fill with the smallest block
       second_card_start = MAX2(second_card_start, pre_top + AlignmentReserve);
                                     
2008-08-06
EVALUATION

http://hg.openjdk.java.net/jdk7/hotspot-gc/hotspot/rev/387a62b4be60
                                     
2008-08-21



Hardware and Software, Engineered to Work Together