From: huanwen ren Date: Wed, 20 Mar 2019 15:46:08 +0000 (+0800) Subject: mds: there is an assertion when calling Beacon::shutdown() X-Git-Tag: v12.2.13~233^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F28438%2Fhead;p=ceph.git mds: there is an assertion when calling Beacon::shutdown() If you run MDSDaemon::init(), an exception occurs that causes MDSDaemon::suicide()--->Beacon::shutdown()--->sender.join(); this problem occurs because sender is just Default-constructed is in Beacon.h(std::thread sender;), there is no call to Beacon::init() to construct the sender, so the sender has no "joinable" Fixes: http://tracker.ceph.com/issues/38822 Signed-off-by: huanwen ren (cherry picked from commit 526bbda6f68873a500c78685a7c39a129d8531e5) --- diff --git a/src/mds/Beacon.cc b/src/mds/Beacon.cc index 0cf8e86eb48..1f205512206 100644 --- a/src/mds/Beacon.cc +++ b/src/mds/Beacon.cc @@ -56,7 +56,8 @@ void Beacon::shutdown() if (!finished) { finished = true; lock.unlock(); - sender.join(); + if (sender.joinable()) + sender.join(); } }