]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
global/signal_handler: one less frame of context 22586/head
authorSage Weil <sage@redhat.com>
Sat, 16 Jun 2018 12:55:12 +0000 (07:55 -0500)
committerSage Weil <sage@redhat.com>
Wed, 20 Jun 2018 12:45:49 +0000 (07:45 -0500)
    "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 <sage@redhat.com>
src/global/signal_handler.cc

index bdcc06f215523d6259362320107a795df6c23098..5af31c28df236fd7d1a7cbca0692c5873fc0056e 100644 (file)
@@ -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());