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
msg/async: reset fd to -1 after closing it #21296
Conversation
77855e1
to
cc41395
Compare
@shangfufei please summarize the change in the title of your commit message, see https://github.com/ceph/ceph/blob/master/SubmittingPatches.rst#title-of-pull-requests-and-title-of-commits, and use the notation of "Fixes: " in the commit message, see https://github.com/ceph/ceph/blob/master/SubmittingPatches.rst#tag-the-commit |
when listen_socket abort, the socket will be reset. what happen if server_socket exists and fd==-1? |
cc41395
to
5c1a8bb
Compare
this time will run the Processor::stop function,just delete listen socket fd from epoll event. |
5c1a8bb
to
783e0e8
Compare
af49a40
to
8d57552
Compare
…the start() process magically. so I think we should make '_fd = -1' when listen_socket was closed. And in the start process, determine the value of listen_socket, if it equal to -1, return the process Fixes: https://tracker.ceph.com/issues/23600 Signed-off-by: shangfufei <shangfufei@inspur.com>
8d57552
to
609c4cd
Compare
@shangfufei again, please summarize the change in the title of your commit message. and please remove "bug fix 23600" from the title. |
I'm definitely on board with setting fd to -1 on close; not doing so can lead to all kinds of problems with data written to the wrong socket or file (!!!), and writing to -1 at least will error out instead of causing more damage. |
This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. |
@shangfufei please note the commit message and title of the PR are different. also please rebase. modulo these nits, lgtm. |
get it, i'm doing now, |
@shangfufei please remove the merge commit from the PR. you might want to rebase onto the master or just cherry-pick your change. |
This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. |
Signed-off-by: shangfufei <shangfufei@inspur.com>
@shangfufei can you rebase this on top of current master so it is a single git commit? |
Do you mean I need to submit it directly in the master branch? |
This modification is currently in the wip-async-bugfix-23600 branch, which needs to be merged into the master trunk branch if detection is not a problem with conventional operations. |
@shangfufei I think what @liewegas is asking for is to squash the three commits in this PR [1] (using [1] https://github.com/ceph/ceph/pull/21296/commits (Note, you may need to do a simple |
This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. |
This pull request has been automatically closed because there has been no activity for 90 days. Please feel free to reopen this pull request (or open a new one) if the proposed change is still appropriate. Thank you for your contribution! |
After listen_socket was closed, it entered the start() process magically. so I think we should make '_fd = -1' when listen_socket was closed. And in the start process, determine the value of listen_socket, if it equal to -1, return the process.
Fixes: https://tracker.ceph.com/issues/23600
Signed-off-by: shangfufei shangfufei@inspur.com