Codereview needed for #6929479

Xueming Shen Xueming.Shen at Sun.COM
Thu Feb 25 20:00:04 UTC 2010


Alan Bateman wrote:
> Xueming Shen wrote:
>>
>> http://cr.openjdk.java.net/~sherman/6929479/webrev/
>>
>> This is a rfe to add a system property sun.zip.disableMmap to enable 
>> the end user to disable the mmap usage in
>> Sun's java.util.zip.ZipFile implementaiton (for Solaris and Linux 
>> platforms).
>>
>> Application uses java.util.zip.ZipFile might experience SIGBUS vm 
>> crash if the application mistakely over-writes
>> zip/jar files that are still being used, for example the application 
>> server repeatedly deploy the same jar file into the
>> same location again and again while there is still code (running in 
>> the same vm)  still accessing this particular zip/
>> jar file (access the memory that mmapped the central directory of the 
>> zip file). While this is indeed an programming
>> error in the offending application, there is situation that the end 
>> user really does not have the control of those
>> applications and look for a workaround for the crash. With this 
>> property set to true (-Dsun.zip.disableMmap=true)
>> the sun zipfile implementation reads in the central directory into 
>> the memory instead of using mmap.
> I've had to debug a few of these so this option should be very useful. 
> I wonder if sun.zip.disableMapping would be a slightly better name?

The webrev has been updated to use "sun.zip.disableMmapping", I guess 
you meant "sun.zip.disableMmapping", right?

Sherman

>
> The changes looks reasonable to me - it's just a pity that we can't 
> get rid of USE_MMAP (the changes really make this stand out).
>
> -Alan




More information about the core-libs-dev mailing list