Skip to content

Don't report SIGQUIT to Sentry#570

Merged
edolstra merged 1 commit into
mainfrom
sigquit
Jul 17, 2026
Merged

Don't report SIGQUIT to Sentry#570
edolstra merged 1 commit into
mainfrom
sigquit

Conversation

@edolstra

@edolstra edolstra commented Jul 17, 2026

Copy link
Copy Markdown
Collaborator

Motivation

Reset SIGQUIT to its default handler (overriding the Sentry handler). Since SIGQUIT is a user-initiated core dump, we don't want to report these to Sentry.

Context

Summary by CodeRabbit

  • Bug Fixes
    • Improved signal handling on non-Windows systems.
    • Ensured quit signals use the expected default behavior during initialization.
    • Added error reporting when signal configuration cannot be applied.

SIGQUIT is a user-initiated "quit with core dump" action (e.g. pressing
Ctrl-\ at a terminal), not a crash, but crashpad includes it in its set
of handled signals, so it got uploaded to Sentry as a fatal error. For
example, we received crash reports of nix sitting in the blocking stdin
read at the flake nixConfig trust prompt when the user pressed Ctrl-\.

Fix this by resetting SIGQUIT to its default disposition in initNix(),
which runs after sentry_init() has installed the crashpad handlers. We
already did this on macOS; now it's done on all platforms.

Assisted-by: Claude Fable 5 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Jul 17, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 3560854a-a168-45fa-a24d-9e90d7e7b2ed

📥 Commits

Reviewing files that changed from the base of the PR and between 2eca43c and 9857dc6.

📒 Files selected for processing (1)
  • src/libmain/shared.cc

📝 Walkthrough

Walkthrough

nix::initNix now resets SIGQUIT to SIG_DFL earlier during non-Windows signal initialization, reports failures through SysError, and removes the later duplicate SIGQUIT setup.

Changes

Signal initialization

Layer / File(s) Summary
Reset SIGQUIT during initialization
src/libmain/shared.cc
initNix installs the default SIGQUIT disposition with error handling and removes the later SIGQUIT setup before SIGTRAP handling.

Estimated code review effort: 2 (Simple) | ~10 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly matches the main change: resetting SIGQUIT so it won't be reported to Sentry.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch sigquit

Comment @coderabbitai help to get the list of available commands.

@github-actions

Copy link
Copy Markdown

@github-actions
github-actions Bot temporarily deployed to pull request July 17, 2026 10:50 Inactive
@edolstra
edolstra added this pull request to the merge queue Jul 17, 2026
Merged via the queue into main with commit b112336 Jul 17, 2026
33 checks passed
@edolstra
edolstra deleted the sigquit branch July 17, 2026 16:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants