Skip to content

Commit

Permalink
common/assert: include ceph_abort_msg(arg) arg in log output
Browse files Browse the repository at this point in the history
This will also be part of the "assert_msg" field in the crash dump.

Signed-off-by: Sage Weil <sage@redhat.com>
  • Loading branch information
liewegas committed Apr 23, 2019
1 parent 83ab6aa commit 6f2743b
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/common/assert.cc
Expand Up @@ -172,8 +172,10 @@ namespace ceph {
BackTrace *bt = new BackTrace(1);
snprintf(g_assert_msg, sizeof(g_assert_msg),
"%s: In function '%s' thread %llx time %s\n"
"%s: %d: abort()\n", file, func, (unsigned long long)pthread_self(),
tss.str().c_str(), file, line);
"%s: %d: ceph_abort_msg(\"%s\")\n", file, func,
(unsigned long long)pthread_self(),
tss.str().c_str(), file, line,
msg.c_str());
dout_emergency(g_assert_msg);

// TODO: get rid of this memory allocation.
Expand Down

0 comments on commit 6f2743b

Please sign in to comment.