Firefox in Fedora 42 seems to have a memory leak.
from /proc/cpuinfo:
cpu family : 6
model : 60
model name : Intel(R) Xeon(R) CPU E3-1231 v3 @ 3.40GHz
16 GB physical memory, 8 GB zswap, 24 GB swap partition on platter drive.
Video card is fanless MSI GeForce GT 1030 in half-height bracket, using the noveau driver. I don’t game, it drives two displays, no kernel tainting needed.
lspci |grep -i nvidia
01:00.0 VGA compatible controller: NVIDIA Corporation GP108 [GeForce GT 1030] (rev a1)
01:00.1 Audio device: NVIDIA Corporation GP108 High Definition Audio Controller (rev a1)
I don’t use the nVidia audio controller, I use USB speakers.
MATE desktop.
Anywhoo…
After a few hours of usage, the system would usually get really sluggish and it impacted not just the browser, but use of the terminal too. System Monitor ticker would show a lot of activity. Sometimes closing some tabs would fix things but only temporarily.
In the browser it was most prominent when opening a new link or typing in a URL so I thought maybe the problem was related to systemd-resolved which I had never enabled before Fedora 42. So I disabled systemd-resolved and went back to unbound on the localhost, what I used to previously always do:
sudo dnf install unbound
sudo systemctl restart unbound-keygen
unbound-checkconf
sudo systemctl enable --now unbound
(defaults in the config file were fine)
After verifying unbound was working:
sudo systemctl disable --now systemd-resolved
sudo rm -f /etc/resolv.conf
(note it was just a symlink)
Recreated a real /etc/resolv.conf with the following:
nameserver 127.0.0.1
options edns0 trust-ad
Yes, DoH is disabled in FireFox.
I rebooted the system. No noticeable difference in DNS resolution speed, I may go back to systemd-resolved as it wasn’t the problem and certainly isn’t slower than unbound. But after an hour, FireFox became sluggish again and slowed the entire system down.
Looking at things with top (which I suppose should have been the first step) I noticed that there were lots of Isolated Web Co processes using up resources.
I downloaded the 64-bit Linux binary release of firefox, put it in /opt/firefox/v141.0.3 with a symlink /opt/firefox/current pointing to that directory. Then I created a symlink
/usr/bin/firefox -> /opt/firefox/current/firefox
After reselecting my firefox profile as the default profile, the memory leak seems fixed. After many hours of use, Isolated Web Co processes are still seen in top but they aren’t sucking up resources like they do with the Fedora 42 build of FireFox.
I don’t know how to investigate what is causing the memory leak in the Fedora build, but it seems something is.
I don’t remember what day the issue first appeared but it was within the last three weeks, at least two weeks ago (mid-december) but I don’t recall it ever being an issue in November.
Untill installing the binary version from Mozilla, I would fix it by logging out, logging back in, and restoring my FireFox session — hoping that an update was soon coming. I got tired of waiting which is why I tried the binary build and it does seem to have fixed things.
However it isn’t a great fix as now I have to manually update FireFox from the binary releases for security updates. It would be great if the Fedora build could be fixed. Is this a known issue?