Skip to content

core/reactor: add SIGFPE handler - #311

Merged
WillemKauf merged 1 commit into
redpanda-data:v26.3.xfrom
WillemKauf:sigfpe_downstream
Aug 31, 2026
Merged

WillemKauf merged 1 commit into
redpanda-data:v26.3.xfrom
WillemKauf:sigfpe_downstream

Conversation

@WillemKauf

Copy link
Copy Markdown

SIGFPE is a notable & potentially common enough error that it deserves a handler in seastar - divisions by zero (including % 0 operations), integer overflows, etc., are commonplace bugs for developers to run into.

Add one alongside the existing signal handlers to ensure we print a backtrace for aiding developers in debugging before crashing.

(cherry picked from commit 30a07cf)

SIGFPE is a notable & potentially common enough error that it deserves a
handler in seastar - divisions by zero (including % 0 operations),
integer overflows, etc., are commonplace bugs for developers to run into.

Add one alongside the existing signal handlers to ensure we print a backtrace
for aiding developers in debugging before crashing.

(cherry picked from commit 30a07cf)
@WillemKauf
WillemKauf requested review from travisdowns and a lite review from Copilot August 31, 2026 13:59

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟢 Approval recommended

Pull request overview

Adds a dedicated SIGFPE (floating-point exception) signal handler to Seastar’s reactor startup path so that common arithmetic faults (e.g., division/modulo by zero, some overflow traps) produce a backtrace before the process terminates—consistent with existing fatal-signal diagnostics.

Changes:

  • Introduce a sigfpe_action() handler that prints a backtrace and re-raises SIGFPE.
  • Register the SIGFPE handler during smp::configure() alongside existing SIGSEGV/SIGABRT/SIGILL handlers.
File summaries
File Description
src/core/reactor.cc Adds SIGFPE handler implementation and installs it during reactor/SMP configuration.
Review details
  • Files reviewed: 1/1 changed files
  • Comments generated: 0
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@WillemKauf
WillemKauf merged commit 108519f into redpanda-data:v26.3.x Aug 31, 2026
16 checks passed
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.

3 participants