Closed Bug 1753201 Opened 3 years ago Closed 3 years ago

oom exception with plenty of free ram

Categories

(Core :: JavaScript Engine: JIT, defect, P3)

Firefox 96
defect

Tracking

()

RESOLVED INVALID

People

(Reporter: zstaseg, Unassigned)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

Attached file memory-report.json.gz

User Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:96.0) Gecko/20100101 Firefox/96.0

Steps to reproduce:

  1. open about:memory
  2. press measure in "Show memory reports" about 5-10 times

Actual results:

  1. firefox window hung
  2. I'm getting one of those errors in syslog.

There are 2 examples:

Feb 2 12:46:11 workstation gnome-shell[2380013]: [unhandlable oom] Failed to mmap, likely no more mappings available /build/firefox-oDiU8w/firefox-96.0+build2/memory/build/mozjemalloc.cpp : 1395ExceptionHandler::GenerateDump cloned child 2380608
Feb 2 12:46:11 workstation gnome-shell[2380013]: ExceptionHandler::SendContinueSignalToChild sent continue signal to child
Feb 2 12:46:12 workstation gnome-shell[2380013]: Hit MOZ_CRASH([unhandlable oom] ExecutableAllocator::reprotectPool) at /build/firefox-oDiU8w/firefox-96.0+build2/js/src/vm/JSContext.cpp:1234
Feb 2 12:46:12 workstation gnome-shell[2380013]: #01: ???[/usr/lib/firefox/libxul.so +0x46862d5]
Feb 2 12:46:12 workstation gnome-shell[2380013]: #02: ???[/usr/lib/firefox/libxul.so +0x4c38b15]
Feb 2 12:46:12 workstation gnome-shell[2380013]: #03: ???[/usr/lib/firefox/libxul.so +0x4741117]
Feb 2 12:46:12 workstation gnome-shell[2380013]: #04: ???[/usr/lib/firefox/libxul.so +0x49ecb37]
Feb 2 12:46:12 workstation gnome-shell[2380013]: #05: ???[/usr/lib/firefox/libxul.so +0x49b8939]
Feb 2 12:46:12 workstation gnome-shell[2380013]: #06: ???[/usr/lib/firefox/libxul.so +0x49b9ab1]
Feb 2 12:46:12 workstation gnome-shell[2380013]: #07: ???[/usr/lib/firefox/libxul.so +0x49ba22e]
Feb 2 12:46:12 workstation gnome-shell[2380013]: #08: ???[/usr/lib/firefox/libxul.so +0x49a5f60]
Feb 2 12:46:12 workstation gnome-shell[2380013]: #09: ???[/usr/lib/firefox/libxul.so +0x2f1d8b8]
Feb 2 12:46:12 workstation gnome-shell[2380013]: #10: ???[/usr/lib/firefox/libxul.so +0xb163fb]
Feb 2 12:46:12 workstation gnome-shell[2380013]: #11: ???[/usr/lib/firefox/libxul.so +0xafb785]
Feb 2 12:46:12 workstation gnome-shell[2380013]: #12: ???[/usr/lib/firefox/libxul.so +0x2f11b8b]
Feb 2 12:46:12 workstation gnome-shell[2380013]: #13: ???[/usr/lib/firefox/libxul.so +0x2f2056c]
Feb 2 12:46:12 workstation gnome-shell[2380013]: #14: ???[/usr/lib/firefox/libxul.so +0x2f19d50]
Feb 2 12:46:12 workstation gnome-shell[2380013]: #15: ???[/usr/lib/firefox/libxul.so +0x2f194fc]
Feb 2 12:46:12 workstation gnome-shell[2380013]: #16: ???[/usr/lib/firefox/libxul.so +0x2f09efc]
Feb 2 12:46:12 workstation gnome-shell[2380013]: #17: ???[/usr/lib/firefox/libxul.so +0xb0214e]
Feb 2 12:46:12 workstation gnome-shell[2380013]: #18: ???[/usr/lib/firefox/libxul.so +0xb062e6]
Feb 2 12:46:12 workstation gnome-shell[2380013]: #19: ???[/usr/lib/firefox/libxul.so +0x10b93f8]
Feb 2 12:46:12 workstation gnome-shell[2380013]: #20: ???[/usr/lib/firefox/libxul.so +0x106f3d8]
Feb 2 12:46:12 workstation gnome-shell[2380013]: #21: ???[/usr/lib/firefox/libxul.so +0xaffdfe]
Feb 2 12:46:12 workstation gnome-shell[2380013]: #22: ???[/usr/lib/firefox/libnspr4.so +0x2bd59]
Feb 2 12:46:12 workstation gnome-shell[2380013]: #23: ???[/lib/x86_64-linux-gnu/libpthread.so.0 +0x9609]
Feb 2 12:46:12 workstation gnome-shell[2380013]: #24: clone[/lib/x86_64-linux-gnu/libc.so.6 +0x122293]
Feb 2 12:46:12 workstation gnome-shell[2380013]: #25: ??? (???:???)

Feb 2 07:51:42 workstation gnome-shell[2349806]: [GFX1-]: GFX: RenderThread detected a device reset in PostUpdate
Feb 2 07:53:54 workstation gnome-shell[2349806]: ###!!! [Parent][MessageChannel] Error: (msgtype=0x6B0008,name=PMessagePort::Msg___delete__) Channel closing: too late to send/recv, messages will be lost
Feb 2 07:53:54 workstation gnome-shell[2349806]: ###!!! [Parent][RunMessage] Error: Channel closing: too late to send/recv, messages will be lost
Feb 2 07:53:54 workstation gnome-shell[2349806]: message repeated 18 times: [ ###!!! [Parent][RunMessage] Error: Channel closing: too late to send/recv, messages will be lost]
Feb 2 08:13:19 workstation gnome-shell[2349806]: ###!!! [Parent][RunMessage] Error: Channel closing: too late to send/recv, messages will be lost
Feb 2 08:13:19 workstation gnome-shell[2349806]: message repeated 27 times: [ ###!!! [Parent][RunMessage] Error: Channel closing: too late to send/recv, messages will be lost]
Feb 2 08:36:08 workstation gnome-shell[2349806]: ###!!! [Parent][RunMessage] Error: Channel closing: too late to send/recv, messages will be lost
Feb 2 08:36:08 workstation gnome-shell[2349806]: message repeated 9 times: [ ###!!! [Parent][RunMessage] Error: Channel closing: too late to send/recv, messages will be lost]
Feb 2 08:45:06 workstation gnome-shell[2349806]: ###!!! [Parent][RunMessage] Error: Channel closing: too late to send/recv, messages will be lost
Feb 2 08:45:06 workstation gnome-shell[2349806]: message repeated 16 times: [ ###!!! [Parent][RunMessage] Error: Channel closing: too late to send/recv, messages will be lost]
Feb 2 08:45:55 workstation gnome-shell[2349806]: [Parent 2349806, Compositor] WARNING: Call to mmap failed: Cannot allocate memory: file /build/firefox-oDiU8w/firefox-96.0+build2/ipc/chromium/src/base/shared_memory_posix.cc:509

Expected results:

browser should work without hung/crash/etc

Forgot to mention that I have 32G RAM and I experience those hungs after 5-10 minutes of casual browsing. If I open "heavy" web-sites like google maps - I immediately get an OOM exception.
I've tried with new profile, with disabled hw-acceleration, with troubleshoot mode - it doesn't change anything.

The Bugbug bot thinks this bug should belong to the 'Core::DOM: Core & HTML' component, and is moving the bug to that component. Please revert this change in case you think the bot is wrong.

Component: Untriaged → DOM: Core & HTML
Product: Firefox → Core
Component: DOM: Core & HTML → JavaScript Engine: JIT

(In reply to zstaseg from comment #0)

Feb 2 12:46:12 workstation gnome-shell[2380013]: Hit MOZ_CRASH([unhandlable oom] ExecutableAllocator::reprotectPool) at /build/firefox-oDiU8w/firefox-96.0+build2/js/src/vm/JSContext.cpp:1234

This can happen when there is no more memory available to change the status of memory pages.
This is an OOM in the handling of the page table, which has limited space.

One thing to note here, Linux is the only platform to properly report OOMs, Windows will return an error and claim that the arguments are incorrect, while Mac will crash within mprotect.

Last time I encountered these issues was while adding some test instrumentation to aggressively protect memory regions for crash investigation.

Blocks: sm-jits
Severity: -- → S4
Status: UNCONFIRMED → NEW
Ever confirmed: true
Priority: -- → P3

I've just found that one 3-rd party software was setting vm.max_map_count to 3096. That's why mmap was failing with enough RAM. Sorry for disturbance and I'm closing the bug.

Status: NEW → RESOLVED
Closed: 3 years ago
Resolution: --- → INVALID

(In reply to zstaseg from comment #4)

I've just found that one 3-rd party software was setting vm.max_map_count to 3096. That's why mmap was failing with enough RAM. Sorry for disturbance and I'm closing the bug.

Thanks a lot for commenting on the issue! This is much appreciated.
Out of curiosity, what is this third party software?

It's fd.io project (vpp - userspace dataplane for forwarding network packets), I'm developing some plugins for it.

You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: