{"action":"created","issue":{"url":"https://api.github.com/repos/ClusterLabs/pacemaker/issues/908","repository_url":"https://api.github.com/repos/ClusterLabs/pacemaker","labels_url":"https://api.github.com/repos/ClusterLabs/pacemaker/issues/908/labels{/name}","comments_url":"https://api.github.com/repos/ClusterLabs/pacemaker/issues/908/comments","events_url":"https://api.github.com/repos/ClusterLabs/pacemaker/issues/908/events","html_url":"https://github.com/ClusterLabs/pacemaker/pull/908","id":131099878,"number":908,"title":"Fix: crmd: Disconnect the relevant remote proxies as well when disconnecting a remote node","user":{"login":"gao-yan","id":1002242,"avatar_url":"https://avatars.githubusercontent.com/u/1002242?v=3","gravatar_id":"","url":"https://api.github.com/users/gao-yan","html_url":"https://github.com/gao-yan","followers_url":"https://api.github.com/users/gao-yan/followers","following_url":"https://api.github.com/users/gao-yan/following{/other_user}","gists_url":"https://api.github.com/users/gao-yan/gists{/gist_id}","starred_url":"https://api.github.com/users/gao-yan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gao-yan/subscriptions","organizations_url":"https://api.github.com/users/gao-yan/orgs","repos_url":"https://api.github.com/users/gao-yan/repos","events_url":"https://api.github.com/users/gao-yan/events{/privacy}","received_events_url":"https://api.github.com/users/gao-yan/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2016-02-03T17:42:47Z","updated_at":"2016-02-05T17:44:06Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/ClusterLabs/pacemaker/pulls/908","html_url":"https://github.com/ClusterLabs/pacemaker/pull/908","diff_url":"https://github.com/ClusterLabs/pacemaker/pull/908.diff","patch_url":"https://github.com/ClusterLabs/pacemaker/pull/908.patch"},"body":"Previously, the relevant remote proxies would still exist even if a\r\nremote node was already disconnected. So whenever there was an event, it\r\nwould still trigger remote_proxy_dispatch_internal(). Especially if the\r\nremote node was unexpectedly disconnected, lrmd_tls_send() would fail to\r\nrelay the event and call lrmd_tls_disconnect() again. It actually always\r\noccurred when reconnecting to the remote node, which basically made\r\nreconnecting impossible."},"comment":{"url":"https://api.github.com/repos/ClusterLabs/pacemaker/issues/comments/180463252","html_url":"https://github.com/ClusterLabs/pacemaker/pull/908#issuecomment-180463252","issue_url":"https://api.github.com/repos/ClusterLabs/pacemaker/issues/908","id":180463252,"user":{"login":"kgaillot","id":8730570,"avatar_url":"https://avatars.githubusercontent.com/u/8730570?v=3","gravatar_id":"","url":"https://api.github.com/users/kgaillot","html_url":"https://github.com/kgaillot","followers_url":"https://api.github.com/users/kgaillot/followers","following_url":"https://api.github.com/users/kgaillot/following{/other_user}","gists_url":"https://api.github.com/users/kgaillot/gists{/gist_id}","starred_url":"https://api.github.com/users/kgaillot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kgaillot/subscriptions","organizations_url":"https://api.github.com/users/kgaillot/orgs","repos_url":"https://api.github.com/users/kgaillot/repos","events_url":"https://api.github.com/users/kgaillot/events{/privacy}","received_events_url":"https://api.github.com/users/kgaillot/received_events","type":"User","site_admin":false},"created_at":"2016-02-05T17:44:06Z","updated_at":"2016-02-05T17:44:06Z","body":"Yep, use-after-free can wait patiently to cause trouble :) If the OS hasn't yet allocated the freed memory to some other use, the use-after-free will just silently garble unallocated memory. Then the code gets out to some busy system that recycles memory more quickly, and boom ...\r\n\r\nAll other uses of mainloop_del_ipc_client() don't free the relevant data structure, but instead set some flag like disconnected. That may be a more appropriate model, but I think we're OK now."}}