omarchy icon indicating copy to clipboard operation
omarchy copied to clipboard

Hyprland SIGSEGV in omarchy-hyprland-titlebars COmarchyFloatingHyprBar::draw while unmapping a window whose client is being destroyed

Open rilesc555 opened this issue 1 day ago • 2 comments

What happened

During omarchy update, the final omarchy-restart-browser --quiet restarted omarchy-browser-prewarm.service. Brave Origin hit SIGTRAP on stop (the known #20964), and when its Wayland client was destroyed, Hyprland segfaulted inside the titlebars plugin. The whole session went down. All open apps were lost and I ended up back at the greeter.

The plugin was loaded at the time: its frames resolve to exported symbols. That makes this a different path from the unloaded-plugin listener in #15260 and the pluginInit abort in #16985.

Crashing thread (systemd-coredump, Hyprland PID 2003)

#8  CrashReporter::createAndSaveCrash(int)            (/usr/bin/Hyprland (deleted))
#9  <signal handler>                                   (/usr/bin/Hyprland (deleted))
#10 <libc sigreturn>
#11 CXDGPopupResource::done()  [nearest symbol, likely misattributed]   (Hyprland + 0x946ce9)
#12 omarchyWantsServerDecorations(CSharedPointer<Desktop::View::CWindow>)  (titlebars.so + 0x5de18)
#13 COmarchyFloatingHyprBar::draw(CRenderContext&, CSharedPointer<CMonitor>, const float&, const SWindowRenderPresentation&)  (titlebars.so + 0x492d2)
#14 Render::IHyprRenderer::renderWindow(...)           (Hyprland + 0x9fa5dd)
#15 Render::IHyprRenderer::makeSnapshotFB(CWindow, eSceneMode)  (Hyprland + 0xa0d648)
#16 Render::IHyprRenderer::makeSnapshotFB(...)         (Hyprland + 0xa0d94b)
#17 Desktop::View::CWindow::unmapWindow()              (Hyprland + 0x5711cd)
#18-#24 Hyprutils signal emit / resource destroy
#26 wl_client_destroy                                  (libwayland-server)
#29 wl_display_run

So unmapWindow takes a final snapshot of the window while its client is being destroyed. That snapshot calls the plugin's bar draw, and omarchyWantsServerDecorations(window) faults. My inference (not verified): it reads XDG or surface state on the window that is already torn down during wl_client_destroy.

Secondary: the crash report was lost

Hyprland's crash reporter then aborted with filesystem error: cannot make canonical path: No such file or directory [/proc/self/exe], because the same update had replaced /usr/bin/Hyprland (0.57.2-11 → 0.57.2-12). hyprlandCrashReport2003.txt stops before the backtrace. That part is upstream Hyprland behaviour, but it means any compositor crash after an update loses its report.

Timeline (2026-12-02, CST)

  • 09:13:25 omarchy update: pacman -Syu (hyprland 0.57.2-11→-12, chromium, linux-omarchy 7.3.6-5→-8, …)
  • 09:15:51.16 Stopping Keep the default browser running hidden… (from omarchy-restart-browser --quiet)
  • 09:15:51.31 brave PID 3847 SIGTRAP, brave + 0xcd05e4a (same frame as #20964)
  • 09:15:53.4 brave core written, client destroyed, Hyprland SIGSEGV, then the crash reporter SIGABRT
  • 09:16:26 start-hyprland's --safe-mode instance and, at 09:16:37, the greeter's Hyprland both SIGSEGV during exit in CDRMRenderer::~CDRMRenderer → eglDestroyContext (libaquamarine). I believe this is a separate exit-time issue on hybrid graphics; I'm noting it, not claiming it's related.

Steps to reproduce (not yet confirmed by a second run)

  1. Brave Origin as the default browser, prewarm service running, titlebars plugin loaded.
  2. Have a Brave window mapped.
  3. systemctl --user restart omarchy-browser-prewarm.service (or run omarchy update).

Expected: Brave restarts and Hyprland keeps running. Actual: Hyprland segfaults in the titlebars plugin.

Brave must have had a mapped window, since Hyprland unmapped one during its teardown, yet omarchy-restart-browser went ahead. Its hyprctl clients PID check may be missing windows here, but I couldn't confirm that after the fact.

System

  • Omarchy 4.6.0rc2-1
  • hyprland 0.57.2-11 (running) / -12 (on disk), omarchy-hyprland-titlebars 0.7.2-2, brave-origin-bin 1:1.100.59-1
  • Kernel 7.3.6-5-omarchy
  • Intel i7-13700H, Intel Iris Xe + NVIDIA RTX A1000 (hybrid)

Related: #20964 / #20977 (the Brave SIGTRAP that triggered it), #15260, #16985 (other titlebars crashes, different paths).

Filed by Claude Opus 5.5 via Claude Code.

rilesc555 avatar Dec 02 '26 15:12 rilesc555

Same crash here, from a different trigger and on a different architecture. That suggests the trigger doesn't matter: any client with a titlebar that dies while its window is mapped can hit it.

Trigger: systemd-oomd killed omarchy-browser-prewarm.service (Chromium, 644 processes) when memory and swap were above 90%. Hyprland crashed in the same second as the kill. There was no update and no service restart.

Resolved faulting frame. Here Hyprland's own crash reporter finished, and the frame you marked as misattributed resolves cleanly:

#3 | linux-vdso.so.1(__kernel_rt_sigreturn+0)
#4 | Hyprland(CXDGToplevelResource::fromResource(wl_resource*)+0x1c)
#5 | titlebars.so(omarchyWantsServerDecorations(CSharedPointer<Desktop::View::CWindow>)+0x74)
#6 | titlebars.so(COmarchyFloatingHyprBar::draw(...)+0x2c4)
#7 | Hyprland(Render::IHyprRenderer::renderWindow(...)+0x1234)
#8 | Hyprland(Render::IHyprRenderer::makeSnapshotFB(CWindow, eSceneMode)+0x900)
#10 | Hyprland(Desktop::View::CWindow::unmapWindow()+0x5b4)

So omarchyWantsServerDecorations calls CXDGToplevelResource::fromResource() on a wl_resource that is already gone during client teardown. My guess, not checked against the source: it needs to check that the window's xdg toplevel and its resource are still alive before calling it, or return early for a window that is unmapping.

Recurrence: I've had two identical crashes (same stack, same offsets): 2026-12-01 17:37 and 2026-12-02 16:26 CET. Both came after omarchy-hyprland-titlebars was upgraded from 0.4.0-5 to 0.7.2-2 on 2026-12-01 06:36. I had none of these on 0.4.0-x, which points to 0.7.x.

System: Omarchy 4.6.0rc2-1, hyprland 0.57.2-11, omarchy-hyprland-titlebars 0.7.2-2, aquamarine 0.16.0, kernel 7.3.0-2-1-ARCH, aarch64 (Apple M1, Arch Linux ARM), Chromium.

Filed by Claude Opus 5.5 via Claude Code.

TinyWorkshopDesign avatar Dec 02 '26 15:12 TinyWorkshopDesign

The second trace pinpoints the crash in the titlebars plugin’s decoration lookup while Hyprland takes its final window snapshot. The lookup can read a Wayland resource that has already been destroyed. The proposed fix looks up only the current window’s resource. The fix is waiting on review and release in the titlebars repository, where the queue’s automatic closing link is unavailable. Titlebars PR #35

Codex High reviewed the crash traces and source. Opus 5.5 High and Muse Wonder via Pi at high effort agreed on the cause and confirmed from the diff that the change covers both callers. This was a source review.

omarchybot avatar Dec 02 '26 15:12 omarchybot