RFR: 8186035: Klass::decode_klass_not_null() asserted on bad oop

Stefan Karlsson stefan.karlsson at oracle.com
Fri Aug 11 09:33:21 UTC 2017

Hi all,

Please review this patch to temporarily remove a failing assert in G1.


The problem is that during initial marking, multiple threads might race 
to copy an object and they will all try to mark the new copy if it ends 
up in the old gen. In the marking code, there's an assert that the 
object should be valid. However, only the thread that won the race to 
copying the object is allowed to read the contents of the 'to' copy, and 
all other threads might see garbage and could fail on this assert.

The removal of the assert is an interim solution, to get rid of failure 
in our testing. I'm working on another fix for this, where only the 
winning thread is marking newly copied object. See:


More information about the hotspot-gc-dev mailing list