Project

General

Profile

Actions

Bug #62627

open

global: core fatal signal handler uses may signal-unsafe functions

Added by Patrick Donnelly 8 months ago. Updated 8 months ago.

Status:
New
Priority:
High
Category:
common
Target version:
% Done:

0%

Source:
Development
Tags:
Backport:
reef,quincy
Regression:
No
Severity:
2 - major
Reviewed:
Affected Versions:
ceph-qa-suite:
Pull request ID:
Crash signature (v1):
Crash signature (v2):

Description

For example, here:

https://github.com/ceph/ceph/blob/aa2c5c09a0a5c6a6e0663bc4361aae9ef2b62f47/src/global/signal_handler.cc#L326

and many other places (basically everywhere).

I don't know why but this handler is installed outside of the SignalHandler class which is supposed to protect us from missteps like this. It's been this way for a long time.

See also discussion in this PR: https://github.com/ceph/ceph/pull/53014#issuecomment-1696623131

I think the way forward is introducing a modern C++ signal handler abstraction that funnels all signals over to a dedicated thread which handles all signal conditions with multiple callbacks per signal.

Actions #1

Updated by Patrick Donnelly 8 months ago

I've assigned this to myself but I'm not yet sure when I'll work on it. If a senior engineer wants to do this, please let me know.

Actions

Also available in: Atom PDF