Skip to content

[Bug]: t3 service protect, install and update silently stop systemd-oomd from watching the user manager (systemd/systemd#43174) #41477

Closed

Description

@THEtheChad

Before submitting

  • I searched existing issues and did not find a duplicate.
  • I included enough detail to reproduce or investigate the problem.

Area

apps/server

Steps to reproduce

On a Linux host where systemd-oomd is running and the user manager has a memory-pressure policy (Ubuntu ships one in /usr/lib/systemd/system/[email protected]/10-oomd-user-service-defaults.conf: ManagedOOMMemoryPressure=kill, limit 50%):

  1. oomctl lists /user.slice/user-1000.slice/[email protected] under "Memory Pressure Monitored CGroups".
  2. Run systemctl --user daemon-reload. T3 runs this command in:
  3. Run oomctl again. [email protected] is gone from the list, and it stays gone until systemctl restart systemd-oomd.

Expected behavior

After t3 service protect, install or update, systemd-oomd still watches the user manager, as it did before.

Actual behavior

systemd-oomd silently stops watching user@<uid>.service. Nothing is logged. This is systemd/systemd#43174 (open). Units that the user manager itself reports to oomd survive the reload. user@<uid>.service is reported by PID 1, which doesn't send it again.

On hosts that rely on oomd's per-user memory-pressure kill, a runaway agent is then no longer stopped by oomd. The kernel OOM killer and MemoryMax still apply.

Impact

Minor bug or occasional failure

Version or commit

  • Code paths read on main at d1a6c35.
  • The host runs v0.1.7.
  • We reproduced the systemd behaviour with a manual systemctl --user daemon-reload (output below). We haven't run t3 service protect on this host: it needs sudo, which this account doesn't have.

Environment

Ubuntu 24.04 on WSL2, systemd 255 (255.4-1ubuntu8.19), systemd-oomd from the same package set.

Logs or stack traces

# after `systemctl restart systemd-oomd`
$ oomctl | grep Path:      # Memory Pressure Monitored CGroups
  Path: /user.slice/user-0.slice/[email protected]
  Path: /user.slice/user-1000.slice/[email protected]
# after `systemctl --user daemon-reload` as uid 1000
$ oomctl | grep Path:
  Path: /user.slice/user-0.slice/[email protected]

(We trimmed a third entry from our own config: a slice that the user manager reports itself. It stayed listed after the reload.)

Workaround

Run sudo systemctl restart systemd-oomd after t3 service protect, install or update. (protect already has a root step that could do this restart.)


Investigated and written with Claude Opus 5.5 (Claude Code), reviewed by Gemini 4 Neon; reviewed by me before posting.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions