]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
Merge pull request #10500 from Abhishekvrshny/wip-16620-jewel
authorLoic Dachary <loic@dachary.org>
Tue, 23 Aug 2016 06:46:38 +0000 (08:46 +0200)
committerGitHub <noreply@github.com>
Tue, 23 Aug 2016 06:46:38 +0000 (08:46 +0200)
jewel: Fix shutting down mds timed-out due to deadlock

Reviewed-by: Greg Farnum <gfarnum@redhat.com>
1  2 
src/mds/MDSRank.cc

index 62dc54dc9375101e06992acfb19d185e45a8dcbb,9c5def15a94880f51c0347a59df604db7d546f67..1e67833cdb949ae1a5155aa176af8be5673f7856
@@@ -234,17 -236,13 +234,21 @@@ void MDSRankDispatcher::shutdown(
  
    progress_thread.shutdown();
  
 +  // release mds_lock for finisher/messenger threads (e.g.
 +  // MDSDaemon::ms_handle_reset called from Messenger).
 +  mds_lock.Unlock();
 +
 +  finisher->stop(); // no flushing
 +
    // shut down messenger
+   // release mds_lock first because messenger thread might call 
+   // MDSDaemon::ms_handle_reset which will try to hold mds_lock
+   mds_lock.Unlock();
    messenger->shutdown();
+   mds_lock.Lock();
  
 +  mds_lock.Lock();
 +
    // Workaround unclean shutdown: HeartbeatMap will assert if
    // worker is not removed (as we do in ~MDS), but ~MDS is not
    // always called after suicide.