Firefox died with "__vm_enough_memory: not enough memory for the allocation" despite several GB of free RAM and swap
0
votes
0
answers
62
views
I am working on a laptop with 16 GB of non-upgradable RAM on Linux Mint 22, kernel
---
Just for completeness, here is my kernel vm configuration and contents of
6.8.0-63-generic #66-Ubuntu
. I created a 32 GB swap partition on my NVMe drive with a high swappiness value [note1] and disabled overcommit (vm.overcommit_memory=2
). This usually works fine, even with several very hungry processes running (Firefox, Thunderbird, Zotero, VSCode, Element). Linux keeps around 5 GB of RAM for cache and 5-10 GB in swap. Slowdown when switching programs is minimal due to the fast NVMe swap.
Now Firefox just died and the dmesg
log is full of lines like this:
[77152.624112] __vm_enough_memory: pid: 4107, comm: IPC Launch, not enough memory for the allocation
[77152.624979] __vm_enough_memory: pid: 4612, comm: WebExtensions, not enough memory for the allocation
[77152.624986] __vm_enough_memory: pid: 4612, comm: WebExtensions, not enough memory for the allocation
[77156.091496] __vm_enough_memory: pid: 4107, comm: IPC Launch, not enough memory for the allocation
[77227.513600] __vm_enough_memory: pid: 203606, comm: Sandbox Forked, not enough memory for the allocation
[77227.514500] __vm_enough_memory: pid: 4612, comm: WebExtensions, not enough memory for the allocation
[77227.514509] __vm_enough_memory: pid: 4612, comm: WebExtensions, not enough memory for the allocation
[77227.529083] __vm_enough_memory: pid: 4007, comm: firefox-bin, not enough memory for the allocation
Sandbox Forked: segfault at 0 ip 00007d4850861bd9 sp 00007d482b7fc1f0 error 6 in libxul.so[7d484dcdb000+6bb3000] likely on CPU 7 (core 3, socket 0)
[77227.562043] Code: 48 89 01 31 c0 b9 ca 02 00 00 48 89 08 e8 3f 25 02 04 48 8d 05 f2 66 82 fb 48 8b 0d 79 8a 53 04 48 89 01 31 c0 b9 ae 02 00 00 89 08 e8 1f 25 02 04 e8 3a c1 02 04 48 8d 35 6e d9 8a fb 48 8d
However, there were about 4 GB of RAM and more than 26 GB of swap available. **Does anyone have any idea how this could happen? I doubt that Firefox tried to allocate 30 GB at once and exhausted both RAM and Swap at the same time.**
Here's a screenshot from System Monitor, which happened to be running, where you can see how much was free and how much it dropped when Firefox died:

/proc/meminfo
:
$ sudo sysctl vm
vm.admin_reserve_kbytes = 8192
vm.compact_unevictable_allowed = 1
vm.compaction_proactiveness = 20
vm.dirty_background_bytes = 0
vm.dirty_background_ratio = 10
vm.dirty_bytes = 0
vm.dirty_expire_centisecs = 1500
vm.dirty_ratio = 20
vm.dirty_writeback_centisecs = 1500
vm.dirtytime_expire_seconds = 43200
vm.extfrag_threshold = 500
vm.hugetlb_optimize_vmemmap = 0
vm.hugetlb_shm_group = 0
vm.laptop_mode = 0
vm.legacy_va_layout = 0
vm.lowmem_reserve_ratio = 256 256 32 0 0
vm.max_map_count = 1048576
vm.memfd_noexec = 0
vm.memory_failure_early_kill = 0
vm.memory_failure_recovery = 1
vm.min_free_kbytes = 67584
vm.min_slab_ratio = 5
vm.min_unmapped_ratio = 1
vm.mmap_min_addr = 65536
vm.mmap_rnd_bits = 32
vm.mmap_rnd_compat_bits = 16
vm.nr_hugepages = 0
vm.nr_hugepages_mempolicy = 0
vm.nr_overcommit_hugepages = 0
vm.numa_stat = 1
vm.numa_zonelist_order = Node
vm.oom_dump_tasks = 1
vm.oom_kill_allocating_task = 0
vm.overcommit_kbytes = 0
vm.overcommit_memory = 2
vm.overcommit_ratio = 50
vm.page-cluster = 0
vm.page_lock_unfairness = 5
vm.panic_on_oom = 0
vm.percpu_pagelist_high_fraction = 0
vm.stat_interval = 1
vm.swappiness = 180
vm.unprivileged_userfaultfd = 0
vm.user_reserve_kbytes = 131072
vm.vfs_cache_pressure = 100
vm.watermark_boost_factor = 0
vm.watermark_scale_factor = 125
vm.zone_reclaim_mode = 0
$ cat /proc/meminfo
MemTotal: 16024252 kB
MemFree: 2941612 kB
MemAvailable: 5504264 kB
Buffers: 346236 kB
Cached: 4639316 kB
SwapCached: 979904 kB
Active: 7280640 kB
Inactive: 2468760 kB
Active(anon): 6426732 kB
Inactive(anon): 529828 kB
Active(file): 853908 kB
Inactive(file): 1938932 kB
Unevictable: 1809680 kB
Mlocked: 592 kB
SwapTotal: 33554428 kB
SwapFree: 29745344 kB
Zswap: 0 kB
Zswapped: 0 kB
Dirty: 3088 kB
Writeback: 0 kB
AnonPages: 6473408 kB
Mapped: 996316 kB
Shmem: 2192712 kB
KReclaimable: 839736 kB
Slab: 1131764 kB
SReclaimable: 839736 kB
SUnreclaim: 292028 kB
KernelStack: 33728 kB
PageTables: 100528 kB
SecPageTables: 0 kB
NFS_Unstable: 0 kB
Bounce: 0 kB
WritebackTmp: 0 kB
CommitLimit: 41566552 kB
Committed_AS: 35867360 kB
VmallocTotal: 34359738367 kB
VmallocUsed: 114112 kB
VmallocChunk: 0 kB
Percpu: 9280 kB
HardwareCorrupted: 0 kB
AnonHugePages: 0 kB
ShmemHugePages: 1144832 kB
ShmemPmdMapped: 0 kB
FileHugePages: 0 kB
FilePmdMapped: 0 kB
Unaccepted: 0 kB
HugePages_Total: 0
HugePages_Free: 0
HugePages_Rsvd: 0
HugePages_Surp: 0
Hugepagesize: 2048 kB
Hugetlb: 0 kB
DirectMap4k: 408748 kB
DirectMap2M: 11821056 kB
DirectMap1G: 4194304 kB
Asked by Fritz
(748 rep)
Jul 11, 2025, 09:38 AM