[9] RFR (XS): 8139247: Improper locking of MethodData::_extra_data_lock

Vladimir Ivanov vladimir.x.ivanov at oracle.com
Sun Mar 6 21:49:49 UTC 2016

>> Updated fix:
>>   http://cr.openjdk.java.net/~vlivanov/8139247/webrev.01/
>> I found that ciSpeculativeTrapData::translate_from may block on
>> Compile_lock (in ciMethod ctor [1]), so MDO extra lock has to be
>> unlocked first since it has leaf rank.
> That's interesting - it means even if other compilers were not unlocking
> the mutex immediately, they were unlocking it prior to this modified
> code (else the problem would have been detected earlier). Which all
> suggest that as far as locking is concerned the behaviour of this code
> is somewhat untested!
Yes, it turns out the bug is not specific to Solaris x86. I'm not sure 
why it fails only there though.

> Why was the assertion removed?
It's useless. SpeculativeTrapData is just a view over a memory location 
and the location is the same:

SpeculativeTrapData* data_src  = new SpeculativeTrapData(dp_src);
SpeculativeTrapData* data_src2 = new SpeculativeTrapData(dp_src);

> Don't forget to update copyright year.
Will do. Thanks!

Best regards,
Vladimir Ivanov

More information about the hotspot-dev mailing list