Public bug reported:
The Firefox snap AppArmor profile denies read access to /proc/pressure/memory,
which Firefox uses to monitor system memory pressure (via Linux PSI — Pressure
Stall Information) and proactively trim its internal caches before the system
becomes critically low on memory.
Observed behavior:
The system journal shows tens of thousands of AppArmor denials per boot session
of the form:
```
apparmor="DENIED" operation="open" class="file" profile="snap.firefox.firefox"
name="/proc/pressure/memory" pid=... comm="MemoryPoller" requested_mask="r"
```
Because Firefox cannot read this file, its MemoryPoller component receives no
signal when the system is under memory pressure, and Firefox never voluntarily
releases cached memory in response to system-level pressure events.
Impact:
On systems using systemd-oomd (Ubuntu 22.04+), this contributes to
memory pressure exceeding oomd's kill threshold, since Firefox does not
self-trim when it otherwise would. In the case reported here, oomd
repeatedly killed Firefox processes (and eventually the entire GNOME
Shell session) due to sustained memory pressure that Firefox could have
helped relieve had it been able to read /proc/pressure/memory.
Expected behavior:
Firefox should be permitted to read /proc/pressure/memory. The appropriate fix
is to add the necessary AppArmor rule to the Firefox snap profile, likely via
the system-observe interface or a targeted explicit rule permitting read access
to /proc/pressure/.
Environment:
- Ubuntu 24.04
- Firefox installed as a snap
- systemd-oomd active (default on Ubuntu 22.04+)
** Affects: firefox (Ubuntu)
Importance: Undecided
Status: New
--
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/2147667
Title:
Firefox snap blocks access to /proc/pressure/memory, preventing memory
pressure self-management
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/firefox/+bug/2147667/+subscriptions
--
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs