When I run firefox, the following commands
lsof |grep -i firefox|grep memfd|wc -l
lsof |grep -i firefox|grep memfd|grep DEL|wc -l
produce values in the 20 000 or even 100… (read more)
When I run firefox, the following commands
lsof |grep -i firefox|grep memfd|wc -l
lsof |grep -i firefox|grep memfd|grep DEL|wc -l
produce values in the 20 000 or even 100 000 range.
For instance, currently with only 1 tab open - the form on which I type this question - I get
$lsof |grep -i firefox|grep memfd|wc -l
19317
$lsof |grep -i firefox|grep memfd|grep DEL|wc -l
16362
And these numbers are still on the low side. In normal use (e.g., 10 tabs open), the numbers reach
close to 100 000.
Some example lines of lsof:
firefox 3883 135330 StreamT~s xxx DEL REG 0,1 27559 /memfd:mozilla-ipc
firefox 3883 135325 Indexed~I xxx 156u REG 0,1 67108864 11945 /memfd:pulseaudio (deleted)
firefox 3883 135325 Indexed~I xxx 160r REG 0,1 13192 78 /memfd:mozilla-ipc (deleted)
firefox 3883 135427 StreamT~s xxx 132r REG 0,1 170 3110 /memfd:mozilla-ipc (deleted)
Although it may be a problem in lsof, this suggests that firefox performs a lot of memmaps that are
later deleted, but are deleted in a way that leaves some left over state.
Note that the "DEL" state in column 6 does not always agree with "(deleted)" in the right most column.
I first discovered this issue when my computer started failing with messages like
pipewire-pulse[103898]: pw.mem: 0x55ce0273ac50: Failed to create memfd: Too many open files
This could be a coincidence of course.
Current firefox version: 137.0 (but also occurs in other versiosn, e.g. 133.0.3)
uname -r: 6.12.7-100.fc40.x86_64
OS: fedora 40