Skip to content

Commit 98e4f86

Browse files
committed
Merge PR ceph#60326 into main
* refs/pull/60326/head: Reviewed-by: Venky Shankar <[email protected]> Reviewed-by: Patrick Donnelly <[email protected]>
2 parents abd4ec6 + c0fedb5 commit 98e4f86

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

src/mds/MDSDaemon.cc

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -923,6 +923,13 @@ void MDSDaemon::suicide()
923923
// to wait for us to go laggy. Only do this if we're actually in the MDSMap,
924924
// because otherwise the MDSMonitor will drop our message.
925925
beacon.set_want_state(*mdsmap, MDSMap::STATE_DNE);
926+
927+
/* Unlock the mds_lock while waiting for beacon ACK to avoid a
928+
* deadlock with the dispatcher thread which may try to acquire
929+
* mds_lock, preventing it from receiving the beacon ACK.
930+
*/
931+
mds_lock.unlock();
932+
926933
if (!mdsmap->is_dne_gid(mds_gid_t(monc->get_global_id()))) {
927934
beacon.send_and_wait(1);
928935
}
@@ -931,6 +938,8 @@ void MDSDaemon::suicide()
931938
if (mgrc.is_initialized())
932939
mgrc.shutdown();
933940

941+
mds_lock.lock();
942+
934943
if (mds_rank) {
935944
mds_rank->shutdown();
936945
} else {

0 commit comments

Comments
 (0)