Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

jewel: mds: Fix shutting down mds timed-out due to deadlock #10500

Merged
2 commits merged into from Aug 23, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 4 additions & 0 deletions src/mds/MDSRank.cc
Expand Up @@ -237,7 +237,11 @@ void MDSRankDispatcher::shutdown()
progress_thread.shutdown();

// 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();

// Workaround unclean shutdown: HeartbeatMap will assert if
// worker is not removed (as we do in ~MDS), but ~MDS is not
Expand Down
4 changes: 2 additions & 2 deletions src/msg/async/Event.cc
Expand Up @@ -262,15 +262,15 @@ void EventCenter::delete_time_event(uint64_t id)

void EventCenter::wakeup()
{
if (already_wakeup.compare_and_swap(0, 1)) {
ldout(cct, 1) << __func__ << dendl;
already_wakeup.compare_and_swap(0, 1);

char buf[1];
buf[0] = 'c';
// wake up "event_wait"
int n = write(notify_send_fd, buf, 1);
// FIXME ?
assert(n == 1);
}
}

int EventCenter::process_time_events()
Expand Down