Skip to content

Skip Electron utility subprocess crashes in crash-watch - #11569

Open
Bartok9 wants to merge 2 commits into
omacom:quattrofrom
Bartok9:crash-watch-skip-electron-utility-v2
Open

Bartok9 wants to merge 2 commits into
omacom:quattrofrom
Bartok9:crash-watch-skip-electron-utility-v2

Conversation

@Bartok9

@Bartok9 Bartok9 commented Sep 12, 2026

Copy link
Copy Markdown
Contributor

Problem

omarchy-crash-watch announces every coredump for the user UID. Electron/Chromium apps (Antigravity IDE, Chrome, …) spawn --type=utility children that dump core as a matter of course while the parent stays up. The journaled COREDUMP_COMM / COREDUMP_EXE is the parent, so name-based ignore/mute cannot tell a utility child from a real app crash. Result: noisy critical toasts for crashes the user does not need to care about.

Fixes #11440.

Change

Skip journal entries whose COREDUMP_CMDLINE contains --type=utility. A crash of the Electron/Chromium process itself (no utility flag) still announces.

Tests

test/shell.d/crash-capture-test.sh: utility cmdline stays silent; parent crash still toasts; skipping a utility entry does not stop the watcher.

@omarchybot omarchybot added the bug Something isn't working label Sep 27, 2026
@omarchybot omarchybot added verified Omarchy Triage has verified that this issue is ready for final review ready Good to merge labels Oct 1, 2026
@omarchybot

Copy link
Copy Markdown
Collaborator

Reviewed at 79a6494, nothing to fix.

Reproduced on a disposable Omarchy worker (systemd 261, Chromium 152): sending SIGSEGV to Chromium's real --type=utility NetworkService child gives a journal entry with COREDUMP_EXE=/usr/lib/chromium/chromium, and the browser respawns the service. Replaying that real entry through omarchy-crash-watch with stubbed notifications: quattro toasts "Process crashed: chromium", this branch stays silent, and this branch with the new check deleted toasts again. A real crash of the main browser process still toasts here. On quattro the utility toast also starts the 60-second dedupe window for chromium, so a real browser crash right after it is swallowed. This change fixes that too.

systemd records the cmdline in POSIX-quoted form, so for Chromium the whole cmdline arrives as one $'…' string. The --type=utility substring survives that quoting, so the match holds against what the journal actually stores and not just against the test fixture.

Suite: ./test/cli and every test/shell.d file ran on the worker against this branch merged into current quattro. The failures are exactly the ones quattro already has on its own (ascii, branding-about-animation, the kernel migrations, launch-browser, network-captive-portal, passwordless-grant-lifecycle, video-background, and one ./test/cli case about the vscode theme), so none come from this change. crash-capture-test.sh passes 36 of 36, and its utility case fails with the fix removed.

Second opinion: Codex Medium reviewed the same head and found no blocking defects. It agreed on the reproduction and the size of the change; that agreement is not guaranteed to be independent. It added one limitation of its own: the substring match would also hide a crash of an unrelated program whose arguments contain the literal text --type=utility. That is unusual enough, and costs only a notification, that it is not worth more code here. Whether to also quiet renderer or GPU-process crashes is left to the maintainer.

One unrelated detail: the diff changes test/shell.d/crash-capture-test.sh from mode 755 to 644. The runner calls bash on each file, so nothing breaks.

This links #11440, so the issue closes when this merges. It now waits on the maintainer.

Utility children (--type=utility) dump core as a matter of course while
the parent Electron/Chromium app stays up. The journaled COMM/EXE is the
parent, so name-based ignore/mute cannot tell them from a real crash.
Skip those cmdline entries; a crash of the app itself still announces.
Fixes omacom#11440.
@Bartok9
Bartok9 force-pushed the crash-watch-skip-electron-utility-v2 branch from 79a6494 to 1d7ea7d Compare October 25, 2026 21:27
@greptile-apps

greptile-apps Bot commented Oct 25, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] The PR appears safe to merge.

Summary

The PR skips crash notifications for Electron/Chromium utility children while keeping notifications for parent app crashes.

  • The crash watcher skips utility-process dumps.

Reviews (2) · Last reviewed commit: "Keep crash-capture-test.sh executable" · Reviewed by Greptile

@omarchybot omarchybot removed verified Omarchy Triage has verified that this issue is ready for final review ready Good to merge labels Oct 26, 2026
The fix dropped the file's executable bit, an unrelated change; quattro has it at 755.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@omarchybot omarchybot added verified Omarchy Triage has verified that this issue is ready for final review ready Good to merge labels Nov 1, 2026
@omarchybot

Copy link
Copy Markdown
Collaborator

Re-reviewed at 0fd4519 after the rebase onto quattro. The fix itself is unchanged from the version reviewed on 79a6494. I pushed one commit: it restores the executable bit on test/shell.d/crash-capture-test.sh, which the rebased commit had dropped. That was an unrelated change, and quattro keeps the file at 755.

Reproduced again on a disposable Omarchy worker (Chromium 156, systemd 262), this time with each version of the watcher running live in the desktop session and showing real toasts. I sent SIGSEGV to Chromium's --type=utility NetworkService child. The journal stored it with COREDUMP_EXE=/usr/lib/chromium/chromium and the cmdline as a single $'/usr/lib/chromium/chromium --type=utility …' string, and the browser kept running. Each capture below is cropped to where toasts appear:

Before, quattro's watcher: a "Process crashed: chromium" toast for the NetworkService child
After, this branch: no toast for the same crash

With the new check deleted from this branch, the toast comes back. A SIGSEGV of the main browser process still toasts on this branch.

Tests: crash-capture-test.sh passes 36 of 36 on the worker and fails one check with the fix removed. ./test/cli passes. Of the full ./test/shell run, 7 checks fail, none in crash code. Five files fail the same way on this branch's base commit (ascii, branding-about-animation, first-run, lock-appear-budget, runtime-smoke). privileged-heredoc and i18n-startup pass when run on their own on this branch. CI is green.

Competing fixes: #16823 and #17067, both opened later, change the same check to also skip renderer, GPU and other Chromium child types. This pull request is the oldest, so it takes precedence. Neither newer one is clearly better: in the real journal form above, both miss a child whose --type= argument is the last one on the line, because the closing quote sticks to it, while this one matches it. Their wider list of child types is a real improvement, for the Spotify GPU crashes in #16819, and can be folded in here.

Second opinion: Codex Medium and muse-wonder (pi, thinking high) reviewed this head and found nothing blocking. They agreed on the reproduction and the size of the change, and that agreement is not guaranteed to be independent. They raised two loose ends that cost at most a missed toast: there is no boundary after utility, so --type=utility-extra also matches, and nothing checks that the process is Chromium or Electron. For the second, muse-wonder pointed out that an Electron app runs as its own binary, so a check on the executable would undo the fix for the app in #11440. They also noted a policy trade-off: if a utility crash takes the whole app down without the main process dumping core, nothing toasts now.

This closes #11440. It waits on the maintainer, who also decides whether the wider child-type list from #16823 and #17067 belongs here.

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

Labels

bug Something isn't working ready Good to merge verified Omarchy Triage has verified that this issue is ready for final review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

omarchy-crash-watch fires false positives for Electron utility subprocess crashes (antigravity-ide)

2 participants