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

objecter shutdown races with msg dispatch #4096

Merged
2 commits merged into from Mar 22, 2015
Merged

objecter shutdown races with msg dispatch #4096

2 commits merged into from Mar 22, 2015

Conversation

ghost
Copy link

@ghost ghost commented Mar 19, 2015

Just a tiny cleanup.

Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
(cherry picked from commit 1feba20)
shutdown() resets initialized to 0, but we can still receive messages
after this point, so fix message handlers to skip messages in this
case instead of asserting.

Also read initialized while holding Objecter::rwlock to avoid races
where e.g. handle_osd_map() checks initialized -> 1, continues,
shutdown() is called, sets initialized to 0, then handle_osd_map()
goes about its business and calls op_submit(), which would fail the
assert(initialized.read()) check. Similar races existed in other
message handlers which change Objecter state.

The Objecter is not destroyed until after its Messenger in
the MDS, OSD, and librados, so this should be safe.

Fixes: #9617
Backport: giant
Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
(cherry picked from commit e506f89)

Conflicts:
	src/osdc/Objecter.cc
        context changed: Objecter::tick() did not have
        assert(initialized.read())
@ghost ghost self-assigned this Mar 19, 2015
@ghost ghost added this to the giant milestone Mar 19, 2015
@ghost ghost added bug-fix core labels Mar 19, 2015
@loic-bot
Copy link

SUCCESS: the output of run-make-check.sh on centos-7 for 3b35c5d is http://paste2.org/OegU15UB

:octocat: Sent from GH.

ghost pushed a commit that referenced this pull request Mar 22, 2015
objecter shutdown races with msg dispatch

Reviewed-by: Abhishek Lekshmanan <abhishek.lekshmanan@ril.com>
@ghost ghost merged commit 83bcc51 into ceph:giant Mar 22, 2015
rzarzynski added a commit to rzarzynski/ceph that referenced this pull request May 25, 2015
Fixes: ceph#4096
Signed-off-by: Radoslaw Zarzynski <rzarzynski@mirantis.com>
rzarzynski added a commit to rzarzynski/ceph that referenced this pull request Jun 15, 2015
Fixes: ceph#4096
Signed-off-by: Radoslaw Zarzynski <rzarzynski@mirantis.com>
rzarzynski added a commit to rzarzynski/ceph that referenced this pull request Jun 23, 2015
Fixes: ceph#4096
Signed-off-by: Radoslaw Zarzynski <rzarzynski@mirantis.com>
rzarzynski added a commit to rzarzynski/ceph that referenced this pull request Aug 18, 2015
Fixes: ceph#4096
Signed-off-by: Radoslaw Zarzynski <rzarzynski@mirantis.com>
rzarzynski added a commit to rzarzynski/ceph that referenced this pull request Aug 20, 2015
Fixes: ceph#4096
Signed-off-by: Radoslaw Zarzynski <rzarzynski@mirantis.com>
yehudasa pushed a commit that referenced this pull request Aug 27, 2015
Fixes: #4096
Signed-off-by: Radoslaw Zarzynski <rzarzynski@mirantis.com>
branch-predictor pushed a commit to branch-predictor/ceph that referenced this pull request Sep 30, 2015
Fixes: ceph#4096
Signed-off-by: Radoslaw Zarzynski <rzarzynski@mirantis.com>
This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants