Repository navigation
Conversation
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.
[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
SummaryThe PR suppresses crash notifications for command lines containing a listed Chromium child flag.
Reviews (2) · Last reviewed commit: "Match only Chromium child types in crash..." · Reviewed by Greptile |
| # 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 |
There was a problem hiding this comment.
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.
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.
|
Thanks @AnPod. This pull request competes with #16823, which was opened three days earlier against The two fixes do the same thing in This one adds two things over #16823: it accepts NUL-separated arguments, and it lists #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 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. |
Fixes #16819
Problem:
omarchy-crash-watchannounces every coredump of the user's UID and names it bybasename(COREDUMP_EXE). Chromium-based apps (Spotify/CEF, Electron, Brave) run their--type=gpu-process/--type=renderer/--type=utilitychildren 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_CMDLINEfrom 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 byrenderer,gpu-process,utility,zygote,broker,crashpad-handler,ppapi,ppapi-broker,nacl-loaderornacl-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:--type=gpu-processchild crash, and a NUL-separated--type=rendererone, are not announced;git … --type=boolcrash and a--type=rendererinside a filename are still announced (this case fails with the earlier substring guard).All 31 cases in the file pass.