Bug 502279 - OOM notifications resent on systemd services reload
Summary: OOM notifications resent on systemd services reload
Status: RESOLVED FIXED
Alias: None
Product: plasmashell
Classification: Plasma
Component: Out of memory notification (other bugs)
Version First Reported In: 6.3.3
Platform: Other Linux
: NOR normal
Target Milestone: 1.0
Assignee: Plasma Bugs List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-04-01 13:32 UTC by Antonio Rojas
Modified: 2025-07-06 08:23 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed/Implemented In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Antonio Rojas 2025-04-01 13:32:09 UTC
SUMMARY

Restarting the systemd services (which can be done in the background by some external processes) causes all previous OOM notifications to be resent.

STEPS TO REPRODUCE
1. Wait until the kernel kills some application due to OOM and Plasma issues the corresponding notification
2. $ systemctl reload user@1000.service

OBSERVED RESULT

All previos OOM notifications are resent, causing confusion since the relevant applications are running normally

EXPECTED RESULT
No OOM notifications are sent.

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: Arch Linux
KDE Plasma Version: 6.3.3
KDE Frameworks Version: 6.12.0 
Qt Version: 6.8.3

ADDITIONAL INFORMATION
Comment 1 Bug Janitor Service 2025-07-05 18:53:28 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/plasma-workspace/-/merge_requests/5654
Comment 2 Antonio Rojas 2025-07-05 19:51:56 UTC
Git commit ce33b24d4f1b5711f7585b33822ab87f2f43af0b by Antonio Rojas.
Committed on 05/07/2025 at 18:47.
Pushed by arojas into branch 'master'.

Do not emit OOM notifications on systemd services reload

When systemd services are reloaded, systemd emits all PropertiesChanged signals for all units.

Comparing with the original signals these have a null MainPID, so we can use that to identify them and not emit a notification.

M  +3    -0    oom-notifier/module.cpp

https://invent.kde.org/plasma/plasma-workspace/-/commit/ce33b24d4f1b5711f7585b33822ab87f2f43af0b
Comment 3 Antonio Rojas 2025-07-06 08:23:09 UTC
Git commit ec837446c1ebcf45b44d61c4a3b2e361e9913d06 by Antonio Rojas.
Committed on 05/07/2025 at 19:52.
Pushed by arojas into branch 'Plasma/6.4'.

Do not emit OOM notifications on systemd services reload

When systemd services are reloaded, systemd emits all PropertiesChanged signals for all units.

Comparing with the original signals these have a null MainPID, so we can use that to identify them and not emit a notification.


(cherry picked from commit ce33b24d4f1b5711f7585b33822ab87f2f43af0b)

ce33b24d Do not emit OOM notifications on systemd services reload

Co-authored-by: Antonio Rojas <arojas@archlinux.org>

M  +3    -0    oom-notifier/module.cpp

https://invent.kde.org/plasma/plasma-workspace/-/commit/ec837446c1ebcf45b44d61c4a3b2e361e9913d06