Repository navigation
Conversation
[Medium impact] The PR appears safe to merge; both previous findings are addressed. SummaryThe crash watcher skips zygote aborts and suppresses child-process crash notifications while a matching main process remains alive.
Reviews (2) · Last reviewed commit: "Ignore throwaway zygote and recovered ch..." · Reviewed by Greptile |
…atcher
Chromium-based and Electron applications run helper child processes
(--type=zygote, --type=gpu-process, etc.) from the same executable.
During theme switching, omarchy-theme-set-browser briefly launches
Chromium with --refresh-platform-policy --no-startup-window, and when
the parent hands off and exits, its orphaned zygote process aborts with
SIGTRAP ("Sending zygote magic failed: Connection reset by peer").
Similarly, recovered GPU process crashes trigger false critical
"Process crashed" notifications while the app keeps running.
Ignore --type=zygote helper aborts unconditionally, and ignore any
other child process crashes when their main application process remains
alive in the user session.
Fixes omacom#17207
Fixes omacom#16819
19f59bf to
6f752f9
Compare
|
GPT-6 High in Codex compared the watcher, tests, linked reports #16819 and #17207, and competing fixes #11569, #16823 and #17067. Opus 5.5 High and muse-wonder via pi, thinking high also reviewed the four diffs and favored earlier #16823: its existing whole-argument child-type filter covers the reported GPU and zygote cases, while #11569 covers utility children only. Agreement does not guarantee independence. This PR additionally conditions non-zygote suppression on finding a running main process. Whether that extra condition belongs remains a maintainer decision. Its explicit zygote regression case has been queued for #16823 to carry forward with attribution. No commits were pushed, and no worker tests ran in this session because it stopped at the competing-fix comparison. This PR remains open, waiting for the maintainer to choose among the overlapping fixes. |
Context & Problem
Chromium-based and Electron applications run helper child processes (
--type=zygote,--type=gpu-process,--type=renderer, etc.) from the same executable.Theme Switch SIGTRAP Aborts (omarchy-theme-set-browser: theme switch with Chromium running spawns a second browser whose zygote aborts (SIGTRAP core) #17207):
When switching themes with Chromium or Brave running,
omarchy-theme-set-browserinvokeschromium --refresh-platform-policy --no-startup-window. This spawns a short-lived parent browser process that hands off the reload command overSingletonSocketto the active browser instance and exits immediately. When the parent exits before the spawned helper zygote finishes its socket handshake ("Sending zygote magic failed: Connection reset by peer"), the orphaned zygote process aborts withSIGTRAPas designed. Even though no tab or user window crashed,omarchy-crash-watchcatches the coredump and shows a spuriousProcess crashed: chromiumnotification.Recovered Child Process Notifications (omarchy-crash-watch announces "Process crashed" for recovered Chromium/Electron child processes #16819):
Similarly, when an internal GPU process or utility worker in an Electron app (e.g. Spotify) crashes and is transparently recovered by the main process while the app continues running,
omarchy-crash-watchannounces it as a crash of the entire application.Solution
--type=zygoteHelpers:Zygote processes are Linux fork servers holding no windows or user state. When a zygote aborts during parent exit or policy refresh, it is harmless and ignored.
When a child process (
--type=) dumps core, check whether the main application process (comm/exewithout--type=) is still running in the user session. If the application is alive, suppress the false alarm; if the main application is dead, announce the crash normally.Added assertions in
test/shell.d/crash-capture-test.shverifying:Fixes #17207
Fixes #16819