Request for review 8003705: CDS failed on Windows: cannot map in the CDS

harold seigel harold.seigel at oracle.com
Wed Dec 26 11:56:32 PST 2012


Hi,

Please review this new fix for bug 8003705.   This new fix contains a 
Windows-only call to MemTracker::record_virtual_memory_type() to ensure 
that the CDS region gets marked as shared memory on Windows.

The new webrev is at: http://cr.openjdk.java.net/~hseigel/bug_8003705_2/ 
<http://cr.openjdk.java.net/%7Ehseigel/bug_8003705_2/>

Thanks!
Harold

On 12/20/2012 1:41 PM, Karen Kinnear wrote:
> Harold,
>
> Thank you for fixing these. The code in itself looks good.
>
> How does it interact with NMT? We want to ensure that the CDS space shows up in NMT
> on Windows as well - so if we skip the virtual mapping you may need to do that manually.
>
> thanks,
> Karen
>
> On Dec 20, 2012, at 12:09 PM, harold seigel wrote:
>
>> Hi,
>>
>> Please review the following changes to fix bug 8003705.
>>
>> Summary:
>> When trying to read the CDS file, the existing code was calling both the Windows VirtualAlloc() and MapViewOfFileEx() api's.  The calls to MapViewOfFileEx() were failing with ERROR_INVALID_ADDRESS because VirtualAlloc() had already reserved the memory.
>>
>> This fix prevents the call to VirtualAlloc(), allowing the MapViewOfFileEx() calls to succeed.
>>
>> Another problem was that 'java -Xshare:dump calls were unable to overwrite an existing CDS file.  This change fixes this by granting the owner full permission when creating the CDS file (mode o744).
>>
>> Open webrev at http://cr.openjdk.java.net/~hseigel/bug_8003705/
>> <http://cr.openjdk.java.net/%7Ehseigel/bug_8003705/>
>> Bug link at http://bugs.sun.com/view_bug.do?bug_id=8003705
>>
>>
>> Thanks!
>> Harold


More information about the hotspot-runtime-dev mailing list