From: Sage Weil Date: Sat, 16 Jun 2018 12:55:12 +0000 (-0500) Subject: global/signal_handler: one less frame of context X-Git-Tag: v14.0.1~1042^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F22586%2Fhead;p=ceph.git 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 --- diff --git a/src/global/signal_handler.cc b/src/global/signal_handler.cc index bdcc06f21552..5af31c28df23 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());