RFR: 8075466: Address not aligned in Klass::decode_klass_not_null

Bengt Rutisson bengt.rutisson at oracle.com
Mon Apr 13 11:12:53 UTC 2015


Hi Kim,

On 13/04/15 04:47, Kim Barrett wrote:
> Please review this change to the filtering of SATB queue contents.
>
> The problem is that a SATB queue may contain a stale reference to an
> eagerly reclaimed humongous object.  Assert-conditional verification
> during full queue processing that all entries are oop's can now fail.
>
> We deal with this by eliminating the pre-filtering verification
> (removed call to ObjPtrQueue::verify_oops_in_buffer and removed that
> now unused function).  Instead, ObjPtrQueue::filter has been revised
> to be more careful about oop-ness assumptions, and to assert the
> oop-ness of entries that are retained.
>
> This is related to
> https://bugs.openjdk.java.net/browse/JDK-8073717
> which is another failure due to unexpected stuff in SATB queues as a
> result of eager reclaim of a humongous object.
>
> As an aside, ObjPtrQueue is now poorly named.  A followup CR will be
> filed to rename it to something like SATBQueue.
>
> CR:
> https://bugs.openjdk.java.net/browse/JDK-8075466
>
> Webrev:
> http://cr.openjdk.java.net/~kbarrett/8075466/webrev.00/

Nice refactoring and fix! Some minor comments:

satbQueue.cpp

What's the advantage of casting to HeapWord** and HeapWord* in 
ObjPtrQueue::filter() rather than just working with void** and void* 
when popping from and pushing to the "buf"?


83   if (entry >= region->next_top_at_mark_start()) return false;

Please add some brackets to this if statement.

if (entry >= region->next_top_at_mark_start()) {
   return false;
}


85   // Can obj really have it's mark word set?  It's not in young gen...
86   assert(((oop)entry)->is_oop(true /* ignore mark word */),
87          err_msg("Invalid oop in SATB buffer: " PTR_FORMAT, p2i(entry)));

What does the comment mean? This is concurrent marking so anyone can be 
manipulating the mark work. Locking etc. I think that is why the assert 
avoids checking the mark word.

Thanks,
Bengt


>
> Testing:
> JPRT
> local RefWorkload with -XX:+UseG1GC
> Aurora GC Nightly and VM quicktests with -XX:+UseG1GC
>
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.org/pipermail/hotspot-gc-dev/attachments/20150413/ff1fa010/attachment.htm>


More information about the hotspot-gc-dev mailing list