oss << BackTrace(1);
dout_emergency(oss.str());
- dout_emergency(" NOTE: a copy of the executable, or `objdump -rdS <executable>` "
- "is needed to interpret this.\n");
-
if (g_assert_context) {
lderr(g_assert_context) << buf << std::endl;
- *_dout << oss.str();
- *_dout << " NOTE: a copy of the executable, or `objdump -rdS <executable>` "
- << "is needed to interpret this.\n" << dendl;
+ *_dout << oss.str() << dendl;
- g_assert_context->_log->dump_recent();
+ // dump recent only if the abort signal handler won't do it for us
+ if (!g_assert_context->_conf->fatal_signal_handlers) {
+ g_assert_context->_log->dump_recent();
+ }
}
abort();
oss << *bt;
dout_emergency(oss.str());
- dout_emergency(" NOTE: a copy of the executable, or `objdump -rdS <executable>` "
- "is needed to interpret this.\n");
-
if (g_assert_context) {
lderr(g_assert_context) << buf << std::endl;
- *_dout << oss.str();
- *_dout << " NOTE: a copy of the executable, or `objdump -rdS <executable>` "
- << "is needed to interpret this.\n" << dendl;
+ *_dout << oss.str() << dendl;
- g_assert_context->_log->dump_recent();
+ // dump recent only if the abort signal handler won't do it for us
+ if (!g_assert_context->_conf->fatal_signal_handlers) {
+ g_assert_context->_log->dump_recent();
+ }
}
abort();
int siglist[] = { SIGPIPE, 0 };
block_signals(siglist, NULL);
- if (g_conf->fatal_signal_handlers)
+ if (g_conf->fatal_signal_handlers) {
install_standard_sighandlers();
+ }
+ register_assert_context(g_ceph_context);
if (g_conf->log_flush_on_exit)
g_ceph_context->_log->set_flush_on_exit();
}
}
- register_assert_context(g_ceph_context);
-
// call all observers now. this has the side-effect of configuring
// and opening the log file immediately.
g_conf->call_all_observers();