omarchy icon indicating copy to clipboard operation
omarchy copied to clipboard

Quickshell memory leak (~1.86 GB RSS after 31h) causes multi-minute IPC teardown spin, breaking omarchy-restart-shell

Open yongkang-yang opened this issue 1 week ago • 2 comments

System details

  • Omarchy: 4.5.0-3 (omarchy-settings 4.5.0-3)
  • Quickshell: 0.3.2.r7.g2b4501a-1
  • Qt6: qt6-base 6.12.0-3, qt6-declarative 6.12.0-2, qt6-wayland 6.12.0-1
  • Hyprland / UWSM: hyprland 0.56.2-4, uwsm 0.27.1-1
  • Kernel: 7.2.15-1-omarchy
  • Hardware: AMD Ryzen 9 7940HS w/ Radeon 780M Graphics (amdgpu, Mini-PC Venus series), single active display (DP-8), 27 GiB RAM + 54 GiB swap
  • Third-party plugins: superwhisper-panel and ykyan.tray (installed Nov 5–6, prior to the first long-uptime exit hang); jankeesvw.notification-center (Nov 10) and ykyan.r2drop (Nov 11)

What's wrong?

Related to #9897 (runaway quickshell anonymous memory growth), #13072 / #13165 (duplicate panel trees / IpcHandlers on screen churn), and #12641 / #12983 (omarchy-restart-shell lacking a signal fallback).

Over multi-hour uptimes on Omarchy 4.5.0-3, quickshell continuously leaks anonymous private memory (reaching 1.86 GB RSS after ~31 hours). When omarchy-restart-shell subsequently runs (e.g. during pacman -Syu updates or manual restarts) and sends quickshell kill, the shell does not crash or deadlock — instead, its main thread spins at 100% of one CPU core (STAT=Rl) for 10+ minutes slowly tearing down accumulated objects before exiting cleanly. Because omarchy-restart-shell stops waiting after 60 seconds (timeout 30 quickshell kill + 30s registry wait) without sending SIGTERM/SIGKILL, the replacement omarchy-launch-shell aborts with An instance of this configuration is already running., leaving the desktop without a top bar.

Live measurements (PID 1717301, uptime ~31h, started Nov 18 01:48:13)

  • At Nov 19 08:37:30, omarchy-shell logged INFO: Exiting due to IPC request.
  • At 08:38:05: at-spi2-registryd: Disabling unresponsive app with pid 1717301
  • At 08:38:29 (59s later) and 08:42:14: replacement launches failed with An instance of this configuration is already running.
  • Live process stats while tearing down:
    • 08:47:10: STAT=Rl, RSS=1,857,684 kB (VSZ=4,888,612 kB)
    • 08:47:27: Private_Dirty=1,655,044 kB, Swap=97,120 kB, RSS=1,810,940 kB (only 102 open FDs; clipboard-history.json is 84 KB, ruling out clipboard history bloat)
    • 08:48:50: STAT=Rl, RSS=1,625,040 kB
    • 08:49:13: STAT=Rl, RSS=1,574,232 kB (main thread burning 100% CPU, freeing ~2.2 MB/s)
    • ~08:49:45: process finally exited cleanly on its own (~12 minutes after IPC exit request).
  • No quickshell core dumps exist in coredumpctl, and no OOM kills occurred.

Uptime vs. IPC exit duration (journalctl -t omarchy-shell)

Exit duration scales super-linearly with uptime, matching progressive object accumulation:

Launch → Exit Request Uptime Result
Nov 05 13:26 → Nov 06 01:05 (8 restarts) 13s – 4.5h Exited cleanly in < 1s
Nov 11 18:32 → Nov 12 01:49 7.3h Exited cleanly in 28s
Nov 12 01:50 → Nov 12 17:59 16.1h Exceeded 60s (already running at +60s), eventually exited minutes later
Nov 06 20:11 → Nov 09 00:01 51.8h Exceeded 60s; killed by systemd SIGKILL at shutdown
Nov 09 00:08 → Nov 10 16:07 40.0h Exceeded 60s (already running at +60s)
Nov 10 16:41 → Nov 11 18:29 25.8h Exceeded 60s; manually killed (status 143)
Nov 12 18:10 → Nov 14 22:56 52.8h Exceeded 60s; killed by systemd SIGKILL at shutdown
Nov 14 23:07 → Nov 17 13:13 62.1h Exceeded 60s; manually killed (status 143)
Nov 18 01:48 → Nov 19 08:37 30.8h Exceeded 60s; spun at 100% CPU for ~12 min before exiting

(Note: jankeesvw.notification-center and ykyan.r2drop were not installed yet on Nov 09–10 when the first 40–52h exit hangs occurred.)

#13072 duplicate-handler signature present in journal

Per the diagnostic check requested in #9897:

$ journalctl -t omarchy-shell -g "Handler was registered but will not be used" --since "30 days ago" | wc -l
15883
$ journalctl -b -t omarchy-shell -g "Handler was registered but will not be used" | wc -l
192

These appear in full-bar bursts across all panel targets (omarchy.agents, omarchy.audio, omarchy.bluetooth, omarchy.clock, omarchy.elsewhen, omarchy.indicators, omarchy.monitor, omarchy.network, omarchy.power, omarchy.system-update, omarchy.tailscale, omarchy.weather, omarchy.workspaces, plus third-party panels):

Nov 16 05:05:11 omarchy omarchy-shell[2341]: WARN scene: QML ShellIpc at file:///usr/share/omarchy/shell/plugins/agents/Panel.qml[959:3]: Handler was registered but will not be used because another handler is registered for target omarchy.agents
Nov 16 05:05:11 omarchy omarchy-shell[2341]: WARN scene: QML ShellIpc at @Ui/Panel.qml[49:3]: Handler was registered but will not be used because another handler is registered for target omarchy.audio
Nov 16 05:05:11 omarchy omarchy-shell[2341]: WARN scene: QML ShellIpc at file:///usr/share/omarchy/shell/plugins/panels/bluetooth/Panel.qml[641:3]: Handler was registered but will not be used because another handler is registered for target omarchy.bluetooth

Expected behavior

  1. quickshell should not accumulate gigabytes of anonymous heap / leaked panel objects over normal desktop uptime (appears to be addressed by #13165 for the placeholder-screen duplication path).
  2. omarchy-restart-shell should reliably recover when an old instance fails to exit within its timeout instead of launching a replacement that aborts with already running and leaving the user with no bar (addressed by #12983).

Steps to reproduce

  1. Run an Omarchy 4.5.0-3 session for 15–30+ hours across normal idle/lock/wake cycles.
  2. Observe quickshell RSS climbing past ~1.5–2 GB alongside bursts of Handler was registered but will not be used in journalctl -t omarchy-shell.
  3. Run omarchy-restart-shell (or trigger a shell restart via omarchy update).
  4. Observe quickshell logging INFO: Exiting due to IPC request., spinning at 100% CPU for many minutes, and omarchy-restart-shell failing after 60s with An instance of this configuration is already running.

Filed by Gemini 4 Neon via Antigravity.

yongkang-yang avatar Nov 19 '26 08:11 yongkang-yang

The second half of this, the replacement shell refusing to start and leaving the desktop without a bar, is the gap tracked in #12641. Open PR #12983 ("Add signal fallback to omarchy-restart-shell for IPC-wedged shells") adds exactly that fallback and is currently mergeable against quattro.

On current quattro, bin/omarchy-restart-shell still only loops timeout 30 quickshell kill -p "$CONFIG_DIR" --any-display and then waits on the registry. Nothing sends SIGTERM/SIGKILL to an instance that accepted the exit request but is still tearing down, so the 10+ minute teardown you measured always outlasts the restart. #12983 would turn this into a slow shell restart rather than a missing bar.

The underlying growth (1.86 GB RSS and the 15,883 "Handler was registered but will not be used" lines) is the #9897 / #13072 problem, and needs fixing separately.

Jitheswar avatar Nov 19 '26 08:11 Jitheswar

I read the report and checked the restart and launcher code on current quattro (69bb34c6e). The restart script has bounded IPC and registry waits but no TERM/KILL fallback before relaunching. The long-uptime memory-growth mechanism remains unverified; no worker reproduction or tests ran.

GPT-6 High in Codex performed this source review; no second opinion on the diagnosis ran. The classification model (deepseek-v4p1-flash) returned no usable class, so the queue rules stop this run before verification. This remains open pending completed classification.

omarchybot avatar Nov 19 '26 08:11 omarchybot