Closed Bug 1732325 Opened 3 years ago Closed 3 years ago

mmap in SharedMemory::FindFreeAddressSpace should use MAP_NORESERVE

Categories

(Core :: IPC, defect)

defect

Tracking

()

RESOLVED FIXED
94 Branch
Tracking Status
firefox94 --- fixed

People

(Reporter: petr.sumbera, Assigned: petr.sumbera)

Details

Attachments

(1 file)

User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:92.0) Gecko/20100101 Firefox/92.0

Steps to reproduce:

The issue is similar to:

https://bugzilla.mozilla.org/show_bug.cgi?id=1527597

Sometimes we see in system logs:

Sep 23 09:48:06 solaris genunix: [ID 531226 kern.warning] WARNING:
anon_resv: process 1461 attempted to allocate 4194304 pages of anon memory

The issue is that:

https://searchfox.org/mozilla-central/rev/f62d42b1d98e67dc3da05d586f71103df02b8c4a/ipc/chromium/src/base/shared_memory_posix.cc#521

doesn't use: MAP_NORESERVE

Fix should be to just add MAP_NORESERVE to mmap() call in FindFreeAddressSpace. We don't need to force the system to allocate swap space, because the mapping is temporary. It is destroyed on next line in source code by munmap() call.

Assignee: nobody → petr.sumbera

Moving this over to the correct component based on Bug 1527597 and setting it up as new. Thank you for the reported issues and for working on patches to fix them!

Status: UNCONFIRMED → NEW
Component: Untriaged → JavaScript Engine
Ever confirmed: true
Product: Firefox → Core
Component: JavaScript Engine → IPC
Pushed by mh@glandium.org:
https://hg.mozilla.org/integration/autoland/rev/86f46322fd29
SharedMemory::FindFreeAddressSpace should use MAP_NORESERVE r=glandium
Status: NEW → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → 94 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: