trying to fix 6843484 (os::commit_memory() failures are not handled properly on linux)
Omair Majid
omajid at redhat.com
Tue Aug 24 07:25:48 PDT 2010
Hi Florian,
On 08/16/2010 01:37 PM, Florian Weimer wrote:
> * Omair Majid:
>
>> Hi,
>>
>> I have been trying to fix 6843484. The bug relies on exact behaviour
>> of mmap(2) on linux. I have asked for help from kernel developers and
>> they have suggested that this is not a bug. Just so that I am clear,
>> here is what I understood from the bug report:
>>
>> The bug happens if hotspot does
>> (1) mmap(ADDR,..., MAP_NORESERVE,...) = succeeds
>> followed by
>> (2) mmap(ADDR, .....) = fails
>> in which case the map from (1) is lost.
>
> You should change that to mmap(PROT_NONE) followed by memprotect().
> It has got the added benefit of better working with
> vm.overcommit_memory=2, too. 8-)
Thanks for that advice! However my main problem is still reproducing the
bug. As far as I can tell it can not be reproduced at all.
Thanks,
Omair
More information about the hotspot-dev
mailing list