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

Stefan Johansson stefan.johansson at oracle.com
Fri Aug 11 12:03:14 UTC 2017

On 2017-08-11 12:35, Thomas Schatzl wrote:
> Hi Stefan,
> On Fri, 2017-08-11 at 11:33 +0200, Stefan Karlsson wrote:
>> Hi all,
>> Please review this patch to temporarily remove a failing assert in
>> G1.
>> http://cr.openjdk.java.net/~stefank/8186035/webrev.01/
>> https://bugs.openjdk.java.net/browse/JDK-8186035
>    looks good. Thanks for taking care of this.

>> 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:
>> https://bugs.openjdk.java.net/browse/JDK-8186133
>    also, thanks for that.
> Thomas

More information about the hotspot-gc-dev mailing list