When the test is aborted and it won't get any chance to run the
Client::unmount() and Client::shutdown() functions, so the tick
thread may still running and will access the cct->_conf when it
is destructing, which will case crash.
Fixes: https://tracker.ceph.com/issues/49725
Signed-off-by: Xiubo Li <xiubli@redhat.com>
{
ceph_assert(ceph_mutex_is_not_locked(client_lock));
+ // If the task is crashed or aborted and doesn't
+ // get any chance to run the umount and shutdow.
+ {
+ std::scoped_lock l{client_lock};
+ tick_thread_stopped = true;
+ upkeep_cond.notify_one();
+ }
+
if (upkeeper.joinable())
upkeeper.join();