From 7566c2eee2be3f035295d3ab59285fbc89a2df89 Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Sat, 16 Jun 2018 07:55:12 -0500 Subject: [PATCH] global/signal_handler: one less frame of context "backtrace": [ "(()+0x942e6e) [0x55859889ae6e]", "(()+0x11fc0) [0x7f955b1aafc0]", "(gsignal()+0x10b) [0x7f9559e91f2b]", "(abort()+0x12b) [0x7f9559e7c561]", ... Drop one frame; it's not really helpful. We could probably drop up through gsignal(), but 1 seems safer across platforms. Signed-off-by: Sage Weil --- src/global/signal_handler.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/global/signal_handler.cc b/src/global/signal_handler.cc index bdcc06f215523..5af31c28df236 100644 --- a/src/global/signal_handler.cc +++ b/src/global/signal_handler.cc @@ -163,7 +163,7 @@ static void handle_fatal_signal(int signum) // TODO: don't use an ostringstream here. It could call malloc(), which we // don't want inside a signal handler. // Also fix the backtrace code not to allocate memory. - BackTrace bt(0); + BackTrace bt(1); ostringstream oss; bt.print(oss); dout_emergency(oss.str()); -- 2.39.5