"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>
// 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());