From: Sage Weil Date: Tue, 23 Apr 2019 21:48:52 +0000 (-0500) Subject: common/assert: include ceph_abort_msg(arg) arg in log output X-Git-Tag: v14.2.2~98^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=73fa19ab6cf004a0b6c1071664588c3aa98a0963;p=ceph.git common/assert: include ceph_abort_msg(arg) arg in log output This will also be part of the "assert_msg" field in the crash dump. Signed-off-by: Sage Weil (cherry picked from commit 6f2743b66cb6e8b80dd8e7cc07f2b5e470adcf67) --- diff --git a/src/common/assert.cc b/src/common/assert.cc index 0f3e1e2e097f..6fb50014f439 100644 --- a/src/common/assert.cc +++ b/src/common/assert.cc @@ -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.