Request for Review: 7007769: VM crashes with SIGBUS writing PerfData if tmp space is full

Rémi Forax forax at
Tue Dec 21 08:57:09 PST 2010

On 12/21/2010 02:51 PM, Bob Vandette wrote:
> On 12/21/2010 3:18 AM, Rémi Forax wrote:
>> On 12/20/2010 08:49 PM, Bob Vandette wrote:
>>> New changeset for review.
>>> If there is very little /tmp space, the VM will be able to 
>>> successfully mmap the
>>> performance data area in /tmp but when the VM attempts to access 
>>> this memory
>>> region, it will crash with a SIGBUS if there is insufficient disk 
>>> space in /tmp.
>>> Solaris will fail the ftruncate call we use to extend the newly 
>>> created file but Linux does not.
>>> To work around this problem, I write a single byte to each page of 
>>> the file about to be mmap'd
>>> top reserve the space on the disk.
>>> Bob Vandette
>>> Oracle
>> Bob,
>> Linux has a specific mmap option that you can use in this case: 
> Thanks for looking at my changeset.
> I tried that option on my Linux test system and it did not solve my 
> problem.  MMAP_POPULATE
> is documented to only populate the page tables.  For file mapping it 
> is supposed to do a read-ahead
> but it doesn't say that it verifies the availability of space for a 
> newly created file.

Oups sorry, when I tested it a long time ago, it was working :(

> The other two things I didn't like about this option, even if it 
> worked, are the fact that this option is
> only supported on Linux 2.5.46 and above and that MMAP_POPULATE is 
> only supported for private
> mappings since 2.6.23.   This fix is for a shared memory region.
> Bob.


More information about the hotspot-runtime-dev mailing list