Skip to content

Stop announcing recovered Chromium/Electron child process crashes - #17067

Open
AnPod wants to merge 2 commits into
omacom:quattrofrom
AnPod:crash-watch-skip-children
Open

AnPod wants to merge 2 commits into
omacom:quattrofrom
AnPod:crash-watch-skip-children

Conversation

@AnPod

@AnPod AnPod commented Oct 30, 2026 •

Copy link
Copy Markdown
Contributor

Fixes #16819

Problem: omarchy-crash-watch announces every coredump of the user's UID and names it by basename(COREDUMP_EXE). Chromium-based apps (Spotify/CEF, Electron, Brave) run their --type=gpu-process / --type=renderer / --type=utility children from the same binary as the main process, so a child crash that the app recovers on its own shows up as a critical "Process crashed: spotify" toast, and clicking it starts an AI diagnosis of a crash the user never experienced.

Fix: Read COREDUMP_CMDLINE from the journal entry, split it into arguments (on NULs or spaces, since systemd-coredump records it space-joined), and skip the crash only when one argument is exactly a Chromium/Electron child type: --type= followed by renderer, gpu-process, utility, zygote, broker, crashpad-handler, ppapi, ppapi-broker, nacl-loader or nacl-broker. A crash of the main process has no such argument and is still announced, as is any other program whose command line merely contains --type= (git config --type=bool …, a filename containing --type=renderer). The per-name mute and dedupe behavior are unchanged.

Test: Cases added to the existing test/shell.d/crash-capture-test.sh, reusing its journal and notification helpers:

  • a --type=gpu-process child crash, and a NUL-separated --type=renderer one, are not announced;
  • a crash of the Chromium main process is announced;
  • a git … --type=bool crash and a --type=renderer inside a filename are still announced (this case fails with the earlier substring guard).

All 31 cases in the file pass.

A Chromium or Electron app runs its renderer, GPU and utility children
from the same binary as the main process, so a recovered child crash is
announced as "Process crashed: <app>" even though the app kept running.
Journal entries carry COREDUMP_CMDLINE: skip entries whose cmdline has a
--type= flag. The main process has none and is still announced.
@greptile-apps

greptile-apps Bot commented Oct 30, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 4/5

[Low impact] The change affects crash alerts from one user-level watcher.

The earlier concern about hiding main-process crashes remains partly unfixed and should be addressed before merging.

Findings

  1. P1 Main crashes go unannounced ▶

Summary

The PR suppresses crash notifications for command lines containing a listed Chromium child flag.

  • The crash watcher skips recognized Chromium child-process crashes.

Reviews (2) · Last reviewed commit: "Match only Chromium child types in crash..." · Reviewed by Greptile

Comment thread bin/omarchy-crash-watch Outdated
# crash and are restarted by their parent all the time while the app keeps
# working; the main process, whose crash the user actually sees, has no
# --type= flag. Announcing the child looks like the whole app died.
[[ $cmdline == *--type=* ]] && continue

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Main crashes go unannounced

The guard drops any crash whose command line contains --type=, not just Chromium/Electron child crashes. A main process running git config --type=bool ..., or an app opening a filename containing --type=, loses its crash notification and offered diagnosis. Restrict the check to a child-process flag on the intended apps rather than matching any occurrence across all programs.

Comment thread test/shell.d/crash-watch-test.sh Resolved
A bare --type= substring also caught main-process crashes of other
programs, such as git config --type=bool. Match whole arguments against
Chromium's child process types instead, and fold the watcher tests into
crash-capture-test.sh, reusing its journal and notification stubs.
@omarchybot

Copy link
Copy Markdown
Collaborator

Thanks @AnPod. This pull request competes with #16823, which was opened three days earlier against quattro and also fixes #16819. #16823 is the one I'm recommending to the maintainer, so I didn't run this one on a worker.

The two fixes do the same thing in bin/omarchy-crash-watch. Each reads COREDUMP_CMDLINE and skips the crash only when one whole argument is a Chromium child type. A crash of the main process, or of a program that takes some other --type= value, still raises a toast. Neither has a defect that I or the second opinion could find.

This one adds two things over #16823: it accepts NUL-separated arguments, and it lists nacl-broker. Neither changes what a user sees. systemd-coredump records the command line joined with spaces: on the coordinator, none of the 111 coredump entries in the last 60 days contains a NUL. NaCl is gone from current Chromium. Your git config --type=bool and filename cases already pass #16823's guard, and #16823 tests the same boundary with --type=renderer-config. When two fixes are this close, the older one is kept, so the first person to the fix keeps the credit.

#17235 also targets #16819, with a different approach: it checks whether the main process is still alive. Both reviewers found problems with it. It treats any --type= value as a child marker, and it checks the process table when the journal entry is read rather than when the crash happened.

What was checked: I read the three diffs and the current watcher. Codex Medium and muse-wonder (via pi, thinking high) were each asked which fix should win, without my answer. Both picked #16823, though neither is guaranteed independent of my reading. Codex Medium also judged this pull request not identical enough to #16823 to close as a duplicate, so it stays open. No tests were run for this pull request.

Next step: choosing between the two is up to the maintainer.

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

Development

Successfully merging this pull request may close these issues.

omarchy-crash-watch announces "Process crashed" for recovered Chromium/Electron child processes

2 participants