RFR (XS): 8054808: Bitmap verification sometimes fails after Full GC aborts concurrent mark

Bengt Rutisson bengt.rutisson at oracle.com
Thu Aug 28 08:02:29 UTC 2014

Hi Thomas,

(Had an offline discussion with Thomas about this. Replying here for the 

The proposed fix works fine but there is a slightly simpler solution. 
For all HeapRegions we store the original end value in a variable that 
does not change. We could use that for this fix instead of having to 
calculate the end value.

Something like:

HeapWord* end = r->orig_end();
return _bitmap->getNextMarkedWordAddress(r->bottom(), end) != end;


On 2014-08-27 15:24, Thomas Schatzl wrote:
> Hi all,
>    can I have reviews for the following fix that fixes next bitmap
> verification after a full gc aborted concurrent mark?
> The original code to verify whether a region's next bitmap contained a
> mark or not was racy: in CheckBitmapClearHRClosure::doHeapRegion the
> result whether the bitmap had marks was:
>      return _bitmap->getNextMarkedWordAddress(r->bottom(), r->end()) !=
> r->end();
> The problem is that concurrent humongous object allocation changes
> HeapRegion::_end, and if that occurs between the initial evaluation for
> the method call and the comparison, the checking will fail.
> CR:
> http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=8054808
> Webrev:
> http://cr.openjdk.java.net/~tschatzl/8054808/webrev/
> Testing:
> Inspecting generated code, test case in the CR, jprt
> Thanks,
>    Thomas

More information about the hotspot-gc-dev mailing list