Skip to content

Ignore throwaway zygote and recovered child process aborts in crash watcher - #17235

Open
Sebo1411 wants to merge 1 commit into
omacom:quattrofrom
Sebo1411:fix/crash-watch-child-zygote
Open

Sebo1411 wants to merge 1 commit into
omacom:quattrofrom
Sebo1411:fix/crash-watch-child-zygote

Conversation

@Sebo1411

@Sebo1411 Sebo1411 commented Nov 1, 2026

Copy link
Copy Markdown
Contributor

Context & Problem

Chromium-based and Electron applications run helper child processes (--type=zygote, --type=gpu-process, --type=renderer, etc.) from the same executable.

  1. 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-browser invokes chromium --refresh-platform-policy --no-startup-window. This spawns a short-lived parent browser process that hands off the reload command over SingletonSocket to 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 with SIGTRAP as designed. Even though no tab or user window crashed, omarchy-crash-watch catches the coredump and shows a spurious Process crashed: chromium notification.

  2. 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-watch announces it as a crash of the entire application.

Solution

  1. Unconditionally Ignore --type=zygote Helpers:
    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.
  2. Ignore Recoverable Child Processes When Main Process Is Alive:
    When a child process (--type=) dumps core, check whether the main application process (comm / exe without --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.
  3. Tests:
    Added assertions in test/shell.d/crash-capture-test.sh verifying:
    • Zygote aborts are ignored.
    • Recoverable child processes whose main application is alive are ignored.
    • Child process crashes whose main application has died still announce.

Fixes #17207
Fixes #16819

@greptile-apps

greptile-apps Bot commented Nov 1, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] The PR appears safe to merge; both previous findings are addressed.

Summary

The crash watcher skips zygote aborts and suppresses child-process crash notifications while a matching main process remains alive.

  • Zygote aborts no longer trigger crash notifications.
  • Recovered child-process crashes stay out of app notifications.

Reviews (2) · Last reviewed commit: "Ignore throwaway zygote and recovered ch..." · Reviewed by Greptile

Comment thread bin/omarchy-crash-watch Resolved
Comment thread test/shell.d/crash-capture-test.sh Resolved
…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
@omarchybot

Copy link
Copy Markdown
Collaborator

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.

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

Labels

bug Something isn't working

Projects

None yet

2 participants