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
ceph-fuse: start up log on parent process before shutdown #12347
Conversation
Otherwise, we hit an assert in the Ceph context and logging teardown. Fixes: http://tracker.ceph.com/issues/18157 Signed-off-by: Greg Farnum <gfarnum@redhat.com>
This is the obvious quick fix — we stop the logging, fork, and then the parent shuts down without restarting the log, then asserts. I'm missing some context here, though. Why do we stop the log @liewegas? |
@tchaikov, this is from one of your PRs, any comments? |
I tested this by, you know, running ceph-fuse and observing no more crashes. ;) |
It's a bit silly to open the log again before shutdown, but I think it's safe. We don't log anything from the parent thread. |
@@ -295,6 +295,8 @@ int main(int argc, const char **argv, const char *envp[]) { | |||
//cout << "child done" << std::endl; | |||
return r; | |||
} else { | |||
if (restart_log) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe we'd better use global_init_prefork()
before the fork()
and call global_init_postfork_start()
and global_init_postfork_finish()
after fork()
. also, why don't we use the Preforker
here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you want to try and put together something better that'd be welcome. But I think we need a fix pretty much now and I'm not familiar enough with the init code to make those kinds of changes, @tchaikov.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@gregsfortytwo sure, i am on it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
see #12358
ceph-fuse's fork hackery predates Preforker
|
Otherwise, we hit an assert in the Ceph context and logging teardown.
Fixes: http://tracker.ceph.com/issues/18157
Signed-off-by: Greg Farnum gfarnum@redhat.com