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

mds: we should wait messenger when MDSDaemon suicide #6996

Merged
merged 1 commit into from Dec 23, 2015
Merged

mds: we should wait messenger when MDSDaemon suicide #6996

merged 1 commit into from Dec 23, 2015

Conversation

flywayway
Copy link

Signed-off-by: Wei Feng feng.wei@h3c.com

@smithfarm smithfarm added the cephfs Ceph File System label Dec 21, 2015
@jcsp
Copy link
Contributor

jcsp commented Dec 21, 2015

msgr->wait() is called from ceph_mds.cc -- I don't think you can wait() in suicide() because you might call suicide() while handling a message (i.e. you are inside the messenger handling code, so would deadlock). Unless I'm missing something? What case is this meant to handle?

@flywayway
Copy link
Author

MonClient will failed to authenticate when mds miss keying, then MDSDaemon will suicide and MDSDaemon::init will return (r < 0), ceph_mds.cc will goto shutdown, msgr->wait() is't called before delete.

@jcsp
Copy link
Contributor

jcsp commented Dec 22, 2015

OK, so the correct thing in that case is probably to call msgr->wait() from the error handling branch in main()

@flywayway
Copy link
Author

Can you review this? I add msgr->wait() in main() before msgr be deleted.

@@ -244,6 +244,7 @@ int main(int argc, const char **argv)
// detection, etc.). don't bother if it was a suicide.
if (mds->is_clean_shutdown()) {
delete mds;
msgr->wait();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For the case you're dealing with, you would want to add the msgr->wait() up at line 216, before "goto shutdown". Adding it here doesn't work (is_clean_shutdown is something completely different)

Signed-off-by: Wei Feng <feng.wei@h3c.com>
@flywayway
Copy link
Author

Can you review this?

jcsp pushed a commit that referenced this pull request Dec 23, 2015
mds: we should wait messenger when MDSDaemon suicide

Reviewed-by: John Spray <john.spray@redhat.com>
@jcsp jcsp merged commit 0c17b61 into ceph:master Dec 23, 2015
@jcsp jcsp added the bug-fix label Dec 23, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug-fix cephfs Ceph File System
Projects
None yet
4 participants