RFR(xs): 8224548: [TESTBUG] runtime/appcds/jvmti/ClassFileLoadHookTest.java failed: must be shared
coleen.phillimore at oracle.com
coleen.phillimore at oracle.com
Tue May 28 16:25:28 UTC 2019
On 5/28/19 12:08 PM, Calvin Cheung wrote:
> Hi Coleen,
>
> Thanks for taking a look.
>
> With -Xshare:on and if the archive failed to load, in filemap.cpp we
> call vm_exit_during_initialization().
> For this test, we call TestCommon.checkExec(out) to check the result.
> TestCommon.checkExec() eventually calls
> CDSTestUtils.checkCommonExecExceptions() which has the following check:
>
> // Special case -- sometimes Xshare:on fails because it failed
> to map
> // at given address. This behavior is platform-specific,
> machine config-specific
> // and can be random (see ASLR).
> if (isUnableToMap(output)) {
> throw new SkippedException(UnableToMapMsg);
> }
>
> So the test shouldn't hit the assertTrue() if mapping of archive has
> failed with -Xshare:on.
Thank you! I thought there was such a thing but couldn't find it by
quickly searching. Looks good then.
Coleen
>
> thanks,
> Calvin
>
> On 5/28/19, 4:40 AM, coleen.phillimore at oracle.com wrote:
>>
>>
>> On 5/24/19 12:22 PM, Calvin Cheung wrote:
>>> bug: https://bugs.openjdk.java.net/browse/JDK-8224548
>>> webrev: http://cr.openjdk.java.net/~ccheung/8224548/webrev.00/
>>>
>>> I couldn't reproduce the failure so far. The failure is likely due
>>> to mapping of the shared archive failed on Windows occasionally.
>>> For the -Xshare:auto case, check if the app class is loaded from the
>>> archive only if the java/lang/Object class is loaded from the archive.
>>
>> If the archive fails to load on Windows for the Xshare:on case, won't
>> it fail also on line 99?
>> Thanks,
>> Coleen
>>
>> 98 case SHARING_ON_CFLH_ON:
>> 99 assertTrue(wb.isSharedClass(c), "must be shared");
>> 100 break;
>> 101 case SHARING_AUTO_CFLH_ON:
>> 102 // With -Xshare:auto, the test continues to run with mapping
>> failure.
>> 103 // In case of mapping failure, java/lang/Object and the app class
>> 104 // won't be loaded from the archive.
>>
>>>
>>> Testing: ran the test on a Windows host repeated 60 times.
>>>
>>> thanks,
>>> Calvin
>>
More information about the hotspot-runtime-dev
mailing list