[11u] Backport of 8274338 causes jtreg test failurs

Zhengyu Gu zgu at redhat.com
Thu Dec 16 15:03:26 UTC 2021


Hi Andrew,

On 12/16/21 06:00, Andrew Haley wrote:
> On 12/2/21 15:09, Zhengyu Gu wrote:
>> I redid the backport [1], would you mind to run the patch through SAP's
>> test suite?
> 
> Do you know what happened here? I'm guessing that 11u is different from 
> jdk-dev,
> so the assertions do hold in jdk-dev but not in 11u.
> 

The real fix for JDK-8274338, is to take MultiArray_lock in 
InstanceKlass::restore_unshareable_info().

The original fix added assertion in ClassLoaderData::loaded_classes_do() 
for insurance.

But it does not work well for 11u, since 
MetaspacceShared::link_and_cleanup_shared_classes() was refactored, e.g. 
JDK-8251860, now collects CLDs with MultiArray_lock, then link classes 
without MultiArray_lock, while 11u does that in single pass.

Linking classes invoke java calls, which can *not* hold mutex (that was 
the mistake in early backport for taking the lock) Therefore, I have to 
drop the new assertion for 11u.

Thanks,

-Zhengyu





> Would more stress testing perhaps reveal the bug in a test case? I'd like
> to see some analysis of what happened.
> 



More information about the jdk-updates-dev mailing list