I haven't tested this yet, but by inspection
# define CRM_LOG_ASSERT(expr) do { \
if (!(expr)) { \
static struct qb_log_callsite *core_cs = NULL; \
if(core_cs == NULL) { \
core_cs = qb_log_callsite_get(__func__, __FILE__, \
"log-assert", LOG_TRACE, \
__LINE__, 0); \
} \
crm_abort(__FILE__, __func__, __LINE__, #expr, \
core_cs?core_cs->targets:FALSE, TRUE); \
} \
} while(0)If we're tracing and any targets are enabled, we pass TRUE as the do_core argument of crm_abort(). Since do_fork=TRUE, fail_assert_as() gets called, which causes the current process to abort if it's *not* a daemon.
It's correct to dump core in this case for tracing purposes, but CRM_LOG_ASSERT() (and CRM_CHECK(), which is similar) should not cause the current process to abort.
https://github.com/ClusterLabs/pacemaker/pull/3388#discussion_r1532174530