{"action":"created","issue":{"url":"https://api.github.com/repos/basho/riak_kv/issues/1178","labels_url":"https://api.github.com/repos/basho/riak_kv/issues/1178/labels{/name}","comments_url":"https://api.github.com/repos/basho/riak_kv/issues/1178/comments","events_url":"https://api.github.com/repos/basho/riak_kv/issues/1178/events","html_url":"https://github.com/basho/riak_kv/issues/1178","id":104553189,"number":1178,"title":"get/put FSM supervisor PID leak when overload protection is enabled [JIRA: RIAK-2157]","user":{"login":"ian-mi","id":6137994,"avatar_url":"https://avatars.githubusercontent.com/u/6137994?v=3","gravatar_id":"","url":"https://api.github.com/users/ian-mi","html_url":"https://github.com/ian-mi","followers_url":"https://api.github.com/users/ian-mi/followers","following_url":"https://api.github.com/users/ian-mi/following{/other_user}","gists_url":"https://api.github.com/users/ian-mi/gists{/gist_id}","starred_url":"https://api.github.com/users/ian-mi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ian-mi/subscriptions","organizations_url":"https://api.github.com/users/ian-mi/orgs","repos_url":"https://api.github.com/users/ian-mi/repos","events_url":"https://api.github.com/users/ian-mi/events{/privacy}","received_events_url":"https://api.github.com/users/ian-mi/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/basho/riak_kv/labels/JIRA:%20To%20Do","name":"JIRA: To Do","color":"ededed"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2015-09-02T19:16:49Z","updated_at":"2015-10-06T23:48:09Z","closed_at":null,"body":"Calls to `riak_kv_get_fsm_sup:start_get_fsm` leave abandoned PIDs in the `riak_kv_get_fsm_sup` state because FSMs are linked to a sidejob supervisor rather than the get FSM supervisor. A similar issue applies to the put FSM supervisor. This can cause extended shutdown times as the supervisor attempts to iterate through millions of dead PIDs."},"comment":{"url":"https://api.github.com/repos/basho/riak_kv/issues/comments/146036147","html_url":"https://github.com/basho/riak_kv/issues/1178#issuecomment-146036147","issue_url":"https://api.github.com/repos/basho/riak_kv/issues/1178","id":146036147,"user":{"login":"jonmeredith","id":64318,"avatar_url":"https://avatars.githubusercontent.com/u/64318?v=3","gravatar_id":"","url":"https://api.github.com/users/jonmeredith","html_url":"https://github.com/jonmeredith","followers_url":"https://api.github.com/users/jonmeredith/followers","following_url":"https://api.github.com/users/jonmeredith/following{/other_user}","gists_url":"https://api.github.com/users/jonmeredith/gists{/gist_id}","starred_url":"https://api.github.com/users/jonmeredith/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jonmeredith/subscriptions","organizations_url":"https://api.github.com/users/jonmeredith/orgs","repos_url":"https://api.github.com/users/jonmeredith/repos","events_url":"https://api.github.com/users/jonmeredith/events{/privacy}","received_events_url":"https://api.github.com/users/jonmeredith/received_events","type":"User","site_admin":false},"created_at":"2015-10-06T23:48:09Z","updated_at":"2015-10-06T23:48:09Z","body":"Probably go with the rename. You could set up a monitor instead. That\nshould return exit on an already dead pid.\nOn Mon, Oct 5, 2015 at 6:18 PM ian-mi <notifications@github.com> wrote:\n\n> It seems incorrect that riak_kv_get_fsm:start_link does not link to the\n> caller when sidejob is enabled as that breaks the expected semantics of\n> start_link. One fix I've been thinking of is to manually call link when\n> sidejob is used. However, the reason start_link has been used seems to be\n> just an artifact of avoiding the get_fsm_sup for performance reasons. Based\n> on my discussions with others in cliserv, we have not seen anyone disabling\n> the FSM limit, so I agree that the cleanest solution would be to always use\n> sidejob and perhaps rename the start function to reflect that it does not\n> link to its caller.\n>\n> —\n> Reply to this email directly or view it on GitHub\n> <https://github.com/basho/riak_kv/issues/1178#issuecomment-145704878>.\n>\n"}}