-
Notifications
You must be signed in to change notification settings - Fork 5.9k
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
common: ignore SIGHUP prior to fork #35844
Conversation
src/ceph_fuse.cc
Outdated
@@ -161,6 +161,7 @@ int main(int argc, const char **argv, const char *envp[]) { | |||
return r; | |||
} | |||
if (forker.is_parent()) { | |||
signal(SIGHUP, SIG_IGN); |
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.
Instead of fixing it here we'd better fix it in the forker.prefork(), not only the ceph-fuse have the problem.
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.
Instead of fixing it here we'd better fix it in the forker.prefork(), not only the ceph-fuse have the problem.
Thank you for your review and reply, I have modified it.
782d0ee
to
f978f22
Compare
jenkins test make check |
f978f22
to
05b85fb
Compare
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.
This is fixing a bug in ceph-fuse
but the commit title prefix should be common:
.
Otherwise LGTM. |
05b85fb
to
2256c8f
Compare
@tchaikov hi, kefu. Can you help to have a review?Thank you. |
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.
One small nit regarding the commit title. It's be better to use an imperative style like:
common: ignore SIGHUP prior to fork
Otherwise, the ceph-fuse process is terminated by the logratote task and will produce one Uninterruptible Sleep process.
Here's my usual copy-paste information on that:
Please title your commits according to the conventions of this project. This is required for your PR to be merged.
See this article on GitHub on how to amend commits and update your pull request.
2256c8f
to
f8cf3e9
Compare
Thank you for your advice, It's very important to me. I have got it. |
f7c0e1d
to
7ea22ef
Compare
Otherwise, the ceph-fuse process is terminated by the logratote task and will produce one Uninterruptible Sleep process. Fixes: http://tracker.ceph.com/issues/46269 Signed-off-by: hzwuhongsong <hzwuhongsong@corp.netease.com>
7ea22ef
to
385efa7
Compare
Since it does use functions declared by signal.h /home/jenkins/workspace/ceph-master/src/common/Preforker.h:50:5: error: use of undeclared identifier 'sigemptyset' sigemptyset(&sa.sa_mask); ^ /home/jenkins/workspace/ceph-master/src/common/Preforker.h:52:9: error: no matching constructor for initialization of 'sigaction' if (sigaction(SIGHUP, &sa, nullptr) != 0) { ^ ~~~~~~~~~~~~~~~~~~~~ /usr/include/sys/signal.h:366:8: note: candidate constructor (the implicit copy constructor) not via ble: requires 1 argument, but 3 were provided struct sigaction { ^ /usr/include/sys/signal.h:366:8: note: candidate constructor (the implicit move constructor) not via ble: requires 1 argument, but 3 were provided /usr/include/sys/signal.h:366:8: note: candidate constructor (the implicit default constructor) not viable: requires 0 arguments, but 3 were provided 2 errors generated. fixes: ceph#35844 Signed-off-by: Willem Jan Withagen <wjw@digiware.nl>
Since it does use functions declared by signal.h /home/jenkins/workspace/ceph-master/src/common/Preforker.h:50:5: error: use of undeclared identifier 'sigemptyset' sigemptyset(&sa.sa_mask); ^ /home/jenkins/workspace/ceph-master/src/common/Preforker.h:52:9: error: no matching constructor for initialization of 'sigaction' if (sigaction(SIGHUP, &sa, nullptr) != 0) { ^ ~~~~~~~~~~~~~~~~~~~~ /usr/include/sys/signal.h:366:8: note: candidate constructor (the implicit copy constructor) not via ble: requires 1 argument, but 3 were provided struct sigaction { ^ /usr/include/sys/signal.h:366:8: note: candidate constructor (the implicit move constructor) not via ble: requires 1 argument, but 3 were provided /usr/include/sys/signal.h:366:8: note: candidate constructor (the implicit default constructor) not viable: requires 0 arguments, but 3 were provided 2 errors generated. fixes: ceph#35844 Signed-off-by: Willem Jan Withagen <wjw@digiware.nl>
Since it does use functions declared by signal.h /home/jenkins/workspace/ceph-master/src/common/Preforker.h:50:5: error: use of undeclared identifier 'sigemptyset' sigemptyset(&sa.sa_mask); ^ /home/jenkins/workspace/ceph-master/src/common/Preforker.h:52:9: error: no matching constructor for initialization of 'sigaction' if (sigaction(SIGHUP, &sa, nullptr) != 0) { ^ ~~~~~~~~~~~~~~~~~~~~ /usr/include/sys/signal.h:366:8: note: candidate constructor (the implicit copy constructor) not via ble: requires 1 argument, but 3 were provided struct sigaction { ^ /usr/include/sys/signal.h:366:8: note: candidate constructor (the implicit move constructor) not via ble: requires 1 argument, but 3 were provided /usr/include/sys/signal.h:366:8: note: candidate constructor (the implicit default constructor) not viable: requires 0 arguments, but 3 were provided 2 errors generated. fixes: ceph#35844 Signed-off-by: Willem Jan Withagen <wjw@digiware.nl> (cherry picked from commit 93e2ad6)
Since it does use functions declared by signal.h /home/jenkins/workspace/ceph-master/src/common/Preforker.h:50:5: error: use of undeclared identifier 'sigemptyset' sigemptyset(&sa.sa_mask); ^ /home/jenkins/workspace/ceph-master/src/common/Preforker.h:52:9: error: no matching constructor for initialization of 'sigaction' if (sigaction(SIGHUP, &sa, nullptr) != 0) { ^ ~~~~~~~~~~~~~~~~~~~~ /usr/include/sys/signal.h:366:8: note: candidate constructor (the implicit copy constructor) not via ble: requires 1 argument, but 3 were provided struct sigaction { ^ /usr/include/sys/signal.h:366:8: note: candidate constructor (the implicit move constructor) not via ble: requires 1 argument, but 3 were provided /usr/include/sys/signal.h:366:8: note: candidate constructor (the implicit default constructor) not viable: requires 0 arguments, but 3 were provided 2 errors generated. fixes: ceph#35844 Signed-off-by: Willem Jan Withagen <wjw@digiware.nl> (cherry picked from commit 93e2ad6)
Since it does use functions declared by signal.h /home/jenkins/workspace/ceph-master/src/common/Preforker.h:50:5: error: use of undeclared identifier 'sigemptyset' sigemptyset(&sa.sa_mask); ^ /home/jenkins/workspace/ceph-master/src/common/Preforker.h:52:9: error: no matching constructor for initialization of 'sigaction' if (sigaction(SIGHUP, &sa, nullptr) != 0) { ^ ~~~~~~~~~~~~~~~~~~~~ /usr/include/sys/signal.h:366:8: note: candidate constructor (the implicit copy constructor) not via ble: requires 1 argument, but 3 were provided struct sigaction { ^ /usr/include/sys/signal.h:366:8: note: candidate constructor (the implicit move constructor) not via ble: requires 1 argument, but 3 were provided /usr/include/sys/signal.h:366:8: note: candidate constructor (the implicit default constructor) not viable: requires 0 arguments, but 3 were provided 2 errors generated. fixes: ceph/ceph#35844 Signed-off-by: Willem Jan Withagen <wjw@digiware.nl>
ceph-fuse process is terminated by the logratote task and what is more serious is that one Uninterruptible Sleep process will be produced
Fixes: http://tracker.ceph.com/issues/46269
Signed-off-by: hzwuhongsong wojiaowugen@163.com
Checklist
Show available Jenkins commands
jenkins retest this please
jenkins test classic perf
jenkins test crimson perf
jenkins test signed
jenkins test make check
jenkins test make check arm64
jenkins test submodules
jenkins test dashboard
jenkins test dashboard backend
jenkins test docs
jenkins render docs
jenkins test ceph-volume all
jenkins test ceph-volume tox