RFR(XS) 8234539 ArchiveRelocationTest.java failed: Archive mapping should always succeed

Calvin Cheung calvin.cheung at oracle.com
Mon Nov 25 23:22:51 UTC 2019


Hi Ioi,

This seems good.

Just wondering are the following 'if' checks necessary in 
metaspaceShared.cpp?

2155       if (static_result == MAP_ARCHIVE_SUCCESS) {
2156         static_result = MAP_ARCHIVE_MMAP_FAILURE;
2157       }
2158       if (dynamic_result == MAP_ARCHIVE_SUCCESS) {
2159         dynamic_result = MAP_ARCHIVE_MMAP_FAILURE;
2160       }

The checks weren't there in filemap.cpp. Also, the caller won't try 
map_archives() again if the result is not MAP_ARCHIVE_MMAP_FAILURE.

thanks,

Calvin

On 11/22/19 5:46 PM, Ioi Lam wrote:
> Hi Calvin,
>
> Thanks for the review. It turned out that I needed to fix another 
> (addr_delta == 0) bug in the code. I've also moved the handling of 
> ArchiveRelocationMode==1 in debug builds to 
> MetaspaceShared::map_archives(). This way, we can simulate the 
> "mapping failure" after all archives have been mapped. This way, we 
> can better test the code that unmap the archives after the initial 
> mapping failures.
>
> Here's the updated patch.
> http://cr.openjdk.java.net/~iklam/jdk14/8234539-mapping-should-always-succeed.v02/ 
>
>
> I am running tier4-rt-cds-relocation multiple times to make sure 
> 8234539 is no longer triggered on Windows.
>
> Thanks
> - Ioi
>
> On 11/22/2019 11:23 AM, Calvin Cheung wrote:
>> Hi Ioi,
>>
>> The fix looks good.
>>
>> thanks,
>>
>> Calvin
>>
>> On 11/21/19 2:58 PM, Ioi Lam wrote:
>>> https://bugs.openjdk.java.net/browse/JDK-8234539
>>> http://cr.openjdk.java.net/~iklam/jdk14/8234539-mapping-should-always-succeed.v01/ 
>>>
>>>
>>> This bug happens only on Windows. The fix is one-line -- in order to 
>>> check
>>> whether "This is the second time we try to map the archive(s)", 
>>> instead of
>>> using (addr_delta != 0), the correct condition is 
>>> (rs.is_reserved()). Please
>>> see the bug report for details.
>>>
>>> I also improve the log messages when error happens.
>>>
>>> Thanks
>>> - Ioi
>


More information about the hotspot-runtime-dev mailing list