{"action":"created","comment":{"url":"https://api.github.com/repos/ceph/ceph/pulls/comments/63688726","id":63688726,"diff_hunk":"@@ -704,6 +703,7 @@ void ImageReplayer<I>::on_stop_local_image_close_finish(int r)\n     std::swap(m_on_stop_finish, on_finish);\n   }\n \n+  update_mirror_image_status(true, STATE_STOPPED);","path":"src/tools/rbd_mirror/ImageReplayer.cc","position":null,"original_position":89,"commit_id":"2fa6bf7193d525be64c8cfa3a5f1b641d0b39782","original_commit_id":"2fa6bf7193d525be64c8cfa3a5f1b641d0b39782","user":{"login":"trociny","id":1517222,"avatar_url":"https://avatars.githubusercontent.com/u/1517222?v=3","gravatar_id":"","url":"https://api.github.com/users/trociny","html_url":"https://github.com/trociny","followers_url":"https://api.github.com/users/trociny/followers","following_url":"https://api.github.com/users/trociny/following{/other_user}","gists_url":"https://api.github.com/users/trociny/gists{/gist_id}","starred_url":"https://api.github.com/users/trociny/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/trociny/subscriptions","organizations_url":"https://api.github.com/users/trociny/orgs","repos_url":"https://api.github.com/users/trociny/repos","events_url":"https://api.github.com/users/trociny/events{/privacy}","received_events_url":"https://api.github.com/users/trociny/received_events","type":"User","site_admin":false},"body":"At this stage m_state_desc is not cleared (it is cleared in handle_stop), so I observe after stop:\r\n\r\n```\r\nzhuzha:/tmp/tmp.rbd_mirror% ceph --admin-daemon /tmp/tmp.rbd_mirror/rbd-mirror.cluster1_daemon.cluster1.asok rbd mirror stop\r\nzhuzha:/tmp/tmp.rbd_mirror% rbd --cluster cluster1 -p mirror mirror pool status --verbose\r\nhealth: OK\r\nimages: 2 total\r\n    2 stopped\r\n\r\ntest:\r\n  global_id:   8490718b-edf5-4e7a-89d0-1760e7171b6b\r\n  state:       up+stopped\r\n  description: bootstrapping, CLOSE_REMOTE_IMAGE\r\n  last_update: 2016-05-18 14:41:03\r\n\r\ntest1:\r\n  global_id:   0acf3ba3-7305-4405-9efd-872246344624\r\n  state:       up+stopped\r\n  description: bootstrapping, CLOSE_REMOTE_IMAGE\r\n  last_update: 2016-05-18 14:41:03\r\n```","created_at":"2016-05-18T11:49:54Z","updated_at":"2016-05-18T11:49:54Z","html_url":"https://github.com/ceph/ceph/pull/9173#discussion_r63688726","pull_request_url":"https://api.github.com/repos/ceph/ceph/pulls/9173","_links":{"self":{"href":"https://api.github.com/repos/ceph/ceph/pulls/comments/63688726"},"html":{"href":"https://github.com/ceph/ceph/pull/9173#discussion_r63688726"},"pull_request":{"href":"https://api.github.com/repos/ceph/ceph/pulls/9173"}}},"pull_request":{"url":"https://api.github.com/repos/ceph/ceph/pulls/9173","id":70470684,"html_url":"https://github.com/ceph/ceph/pull/9173","diff_url":"https://github.com/ceph/ceph/pull/9173.diff","patch_url":"https://github.com/ceph/ceph/pull/9173.patch","issue_url":"https://api.github.com/repos/ceph/ceph/issues/9173","number":9173,"state":"open","locked":false,"title":"rbd-mirror: potential crash during image status update","user":{"login":"dillaman","id":4739042,"avatar_url":"https://avatars.githubusercontent.com/u/4739042?v=3","gravatar_id":"","url":"https://api.github.com/users/dillaman","html_url":"https://github.com/dillaman","followers_url":"https://api.github.com/users/dillaman/followers","following_url":"https://api.github.com/users/dillaman/following{/other_user}","gists_url":"https://api.github.com/users/dillaman/gists{/gist_id}","starred_url":"https://api.github.com/users/dillaman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dillaman/subscriptions","organizations_url":"https://api.github.com/users/dillaman/orgs","repos_url":"https://api.github.com/users/dillaman/repos","events_url":"https://api.github.com/users/dillaman/events{/privacy}","received_events_url":"https://api.github.com/users/dillaman/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-05-18T05:24:23Z","updated_at":"2016-05-18T11:49:54Z","closed_at":null,"merged_at":null,"merge_commit_sha":"5e739db9f5d9bfe27e8000c6c91bd0c4d6e1ffcc","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/ceph/ceph/pulls/9173/commits","review_comments_url":"https://api.github.com/repos/ceph/ceph/pulls/9173/comments","review_comment_url":"https://api.github.com/repos/ceph/ceph/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ceph/ceph/issues/9173/comments","statuses_url":"https://api.github.com/repos/ceph/ceph/statuses/2fa6bf7193d525be64c8cfa3a5f1b641d0b39782","head":{"label":"dillaman:wip-15909","ref":"wip-15909","sha":"2fa6bf7193d525be64c8cfa3a5f1b641d0b39782","user":{"login":"dillaman","id":4739042,"avatar_url":"https://avatars.githubusercontent.com/u/4739042?v=3","gravatar_id":"","url":"https://api.github.com/users/dillaman","html_url":"https://github.com/dillaman","followers_url":"https://api.github.com/users/dillaman/followers","following_url":"https://api.github.com/users/dillaman/following{/other_user}","gists_url":"https://api.github.com/users/dillaman/gists{/gist_id}","starred_url":"https://api.github.com/users/dillaman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dillaman/subscriptions","organizations_url":"https://api.github.com/users/dillaman/orgs","repos_url":"https://api.github.com/users/dillaman/repos","events_url":"https://api.github.com/users/dillaman/events{/privacy}","received_events_url":"https://api.github.com/users/dillaman/received_events","type":"User","site_admin":false},"repo":{"id":22644788,"name":"ceph","full_name":"dillaman/ceph","owner":{"login":"dillaman","id":4739042,"avatar_url":"https://avatars.githubusercontent.com/u/4739042?v=3","gravatar_id":"","url":"https://api.github.com/users/dillaman","html_url":"https://github.com/dillaman","followers_url":"https://api.github.com/users/dillaman/followers","following_url":"https://api.github.com/users/dillaman/following{/other_user}","gists_url":"https://api.github.com/users/dillaman/gists{/gist_id}","starred_url":"https://api.github.com/users/dillaman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dillaman/subscriptions","organizations_url":"https://api.github.com/users/dillaman/orgs","repos_url":"https://api.github.com/users/dillaman/repos","events_url":"https://api.github.com/users/dillaman/events{/privacy}","received_events_url":"https://api.github.com/users/dillaman/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/dillaman/ceph","description":"Ceph is a distributed object, block, and file storage platform ","fork":true,"url":"https://api.github.com/repos/dillaman/ceph","forks_url":"https://api.github.com/repos/dillaman/ceph/forks","keys_url":"https://api.github.com/repos/dillaman/ceph/keys{/key_id}","collaborators_url":"https://api.github.com/repos/dillaman/ceph/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/dillaman/ceph/teams","hooks_url":"https://api.github.com/repos/dillaman/ceph/hooks","issue_events_url":"https://api.github.com/repos/dillaman/ceph/issues/events{/number}","events_url":"https://api.github.com/repos/dillaman/ceph/events","assignees_url":"https://api.github.com/repos/dillaman/ceph/assignees{/user}","branches_url":"https://api.github.com/repos/dillaman/ceph/branches{/branch}","tags_url":"https://api.github.com/repos/dillaman/ceph/tags","blobs_url":"https://api.github.com/repos/dillaman/ceph/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/dillaman/ceph/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/dillaman/ceph/git/refs{/sha}","trees_url":"https://api.github.com/repos/dillaman/ceph/git/trees{/sha}","statuses_url":"https://api.github.com/repos/dillaman/ceph/statuses/{sha}","languages_url":"https://api.github.com/repos/dillaman/ceph/languages","stargazers_url":"https://api.github.com/repos/dillaman/ceph/stargazers","contributors_url":"https://api.github.com/repos/dillaman/ceph/contributors","subscribers_url":"https://api.github.com/repos/dillaman/ceph/subscribers","subscription_url":"https://api.github.com/repos/dillaman/ceph/subscription","commits_url":"https://api.github.com/repos/dillaman/ceph/commits{/sha}","git_commits_url":"https://api.github.com/repos/dillaman/ceph/git/commits{/sha}","comments_url":"https://api.github.com/repos/dillaman/ceph/comments{/number}","issue_comment_url":"https://api.github.com/repos/dillaman/ceph/issues/comments{/number}","contents_url":"https://api.github.com/repos/dillaman/ceph/contents/{+path}","compare_url":"https://api.github.com/repos/dillaman/ceph/compare/{base}...{head}","merges_url":"https://api.github.com/repos/dillaman/ceph/merges","archive_url":"https://api.github.com/repos/dillaman/ceph/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/dillaman/ceph/downloads","issues_url":"https://api.github.com/repos/dillaman/ceph/issues{/number}","pulls_url":"https://api.github.com/repos/dillaman/ceph/pulls{/number}","milestones_url":"https://api.github.com/repos/dillaman/ceph/milestones{/number}","notifications_url":"https://api.github.com/repos/dillaman/ceph/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/dillaman/ceph/labels{/name}","releases_url":"https://api.github.com/repos/dillaman/ceph/releases{/id}","deployments_url":"https://api.github.com/repos/dillaman/ceph/deployments","created_at":"2014-08-05T13:37:10Z","updated_at":"2016-05-16T06:08:31Z","pushed_at":"2016-05-18T05:23:40Z","git_url":"git://github.com/dillaman/ceph.git","ssh_url":"git@github.com:dillaman/ceph.git","clone_url":"https://github.com/dillaman/ceph.git","svn_url":"https://github.com/dillaman/ceph","homepage":"http://ceph.com","size":152783,"stargazers_count":1,"watchers_count":1,"language":"C++","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":1,"default_branch":"master"}},"base":{"label":"ceph:master","ref":"master","sha":"acac4bcbcc88ce29049b84e76bcdcff76f509dc7","user":{"login":"ceph","id":1015767,"avatar_url":"https://avatars.githubusercontent.com/u/1015767?v=3","gravatar_id":"","url":"https://api.github.com/users/ceph","html_url":"https://github.com/ceph","followers_url":"https://api.github.com/users/ceph/followers","following_url":"https://api.github.com/users/ceph/following{/other_user}","gists_url":"https://api.github.com/users/ceph/gists{/gist_id}","starred_url":"https://api.github.com/users/ceph/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ceph/subscriptions","organizations_url":"https://api.github.com/users/ceph/orgs","repos_url":"https://api.github.com/users/ceph/repos","events_url":"https://api.github.com/users/ceph/events{/privacy}","received_events_url":"https://api.github.com/users/ceph/received_events","type":"Organization","site_admin":false},"repo":{"id":2310495,"name":"ceph","full_name":"ceph/ceph","owner":{"login":"ceph","id":1015767,"avatar_url":"https://avatars.githubusercontent.com/u/1015767?v=3","gravatar_id":"","url":"https://api.github.com/users/ceph","html_url":"https://github.com/ceph","followers_url":"https://api.github.com/users/ceph/followers","following_url":"https://api.github.com/users/ceph/following{/other_user}","gists_url":"https://api.github.com/users/ceph/gists{/gist_id}","starred_url":"https://api.github.com/users/ceph/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ceph/subscriptions","organizations_url":"https://api.github.com/users/ceph/orgs","repos_url":"https://api.github.com/users/ceph/repos","events_url":"https://api.github.com/users/ceph/events{/privacy}","received_events_url":"https://api.github.com/users/ceph/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ceph/ceph","description":"Ceph is a distributed object, block, and file storage platform ","fork":false,"url":"https://api.github.com/repos/ceph/ceph","forks_url":"https://api.github.com/repos/ceph/ceph/forks","keys_url":"https://api.github.com/repos/ceph/ceph/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ceph/ceph/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ceph/ceph/teams","hooks_url":"https://api.github.com/repos/ceph/ceph/hooks","issue_events_url":"https://api.github.com/repos/ceph/ceph/issues/events{/number}","events_url":"https://api.github.com/repos/ceph/ceph/events","assignees_url":"https://api.github.com/repos/ceph/ceph/assignees{/user}","branches_url":"https://api.github.com/repos/ceph/ceph/branches{/branch}","tags_url":"https://api.github.com/repos/ceph/ceph/tags","blobs_url":"https://api.github.com/repos/ceph/ceph/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ceph/ceph/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ceph/ceph/git/refs{/sha}","trees_url":"https://api.github.com/repos/ceph/ceph/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ceph/ceph/statuses/{sha}","languages_url":"https://api.github.com/repos/ceph/ceph/languages","stargazers_url":"https://api.github.com/repos/ceph/ceph/stargazers","contributors_url":"https://api.github.com/repos/ceph/ceph/contributors","subscribers_url":"https://api.github.com/repos/ceph/ceph/subscribers","subscription_url":"https://api.github.com/repos/ceph/ceph/subscription","commits_url":"https://api.github.com/repos/ceph/ceph/commits{/sha}","git_commits_url":"https://api.github.com/repos/ceph/ceph/git/commits{/sha}","comments_url":"https://api.github.com/repos/ceph/ceph/comments{/number}","issue_comment_url":"https://api.github.com/repos/ceph/ceph/issues/comments{/number}","contents_url":"https://api.github.com/repos/ceph/ceph/contents/{+path}","compare_url":"https://api.github.com/repos/ceph/ceph/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ceph/ceph/merges","archive_url":"https://api.github.com/repos/ceph/ceph/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ceph/ceph/downloads","issues_url":"https://api.github.com/repos/ceph/ceph/issues{/number}","pulls_url":"https://api.github.com/repos/ceph/ceph/pulls{/number}","milestones_url":"https://api.github.com/repos/ceph/ceph/milestones{/number}","notifications_url":"https://api.github.com/repos/ceph/ceph/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ceph/ceph/labels{/name}","releases_url":"https://api.github.com/repos/ceph/ceph/releases{/id}","deployments_url":"https://api.github.com/repos/ceph/ceph/deployments","created_at":"2011-09-01T21:41:26Z","updated_at":"2016-05-18T03:15:09Z","pushed_at":"2016-05-18T11:32:24Z","git_url":"git://github.com/ceph/ceph.git","ssh_url":"git@github.com:ceph/ceph.git","clone_url":"https://github.com/ceph/ceph.git","svn_url":"https://github.com/ceph/ceph","homepage":"http://ceph.com","size":212953,"stargazers_count":2154,"watchers_count":2154,"language":"C++","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":1273,"mirror_url":null,"open_issues_count":353,"forks":1273,"open_issues":353,"watchers":2154,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/ceph/ceph/pulls/9173"},"html":{"href":"https://github.com/ceph/ceph/pull/9173"},"issue":{"href":"https://api.github.com/repos/ceph/ceph/issues/9173"},"comments":{"href":"https://api.github.com/repos/ceph/ceph/issues/9173/comments"},"review_comments":{"href":"https://api.github.com/repos/ceph/ceph/pulls/9173/comments"},"review_comment":{"href":"https://api.github.com/repos/ceph/ceph/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ceph/ceph/pulls/9173/commits"},"statuses":{"href":"https://api.github.com/repos/ceph/ceph/statuses/2fa6bf7193d525be64c8cfa3a5f1b641d0b39782"}}}}