JDK-6728478 : Assertion at parallel promotion from young to old generation
  • Type: Bug
  • Component: hotspot
  • Sub-Component: gc
  • Affected Version: hs11
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • OS: generic
  • CPU: generic
  • Submitted: 2008-07-22
  • Updated: 2010-12-07
  • Resolved: 2008-09-12
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
Problem Description    : Fastdebug JVM could fail with assertion "bad address from index" in blockOffsetTable.inline.hpp

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

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.

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);