{"action":"created","issue":{"url":"https://api.github.com/repos/pika/pika/issues/577","labels_url":"https://api.github.com/repos/pika/pika/issues/577/labels{/name}","comments_url":"https://api.github.com/repos/pika/pika/issues/577/comments","events_url":"https://api.github.com/repos/pika/pika/issues/577/events","html_url":"https://github.com/pika/pika/pull/577","id":77706233,"number":577,"title":"SelectConnection - make interrupt socketpair non-blocking","user":{"login":"wjps","id":11544560,"avatar_url":"https://avatars.githubusercontent.com/u/11544560?v=3","gravatar_id":"","url":"https://api.github.com/users/wjps","html_url":"https://github.com/wjps","followers_url":"https://api.github.com/users/wjps/followers","following_url":"https://api.github.com/users/wjps/following{/other_user}","gists_url":"https://api.github.com/users/wjps/gists{/gist_id}","starred_url":"https://api.github.com/users/wjps/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wjps/subscriptions","organizations_url":"https://api.github.com/users/wjps/orgs","repos_url":"https://api.github.com/users/wjps/repos","events_url":"https://api.github.com/users/wjps/events{/privacy}","received_events_url":"https://api.github.com/users/wjps/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-05-18T15:46:48Z","updated_at":"2015-05-19T08:36:27Z","closed_at":"2015-05-18T16:36:41Z","pull_request":{"url":"https://api.github.com/repos/pika/pika/pulls/577","html_url":"https://github.com/pika/pika/pull/577","diff_url":"https://github.com/pika/pika/pull/577.diff","patch_url":"https://github.com/pika/pika/pull/577.patch"},"body":"This is a fix for issue #570.\r\n\r\nThe socketpair used for interrupting the iolop should be\r\nnon-blocking, if not it is possible for the ioloop to\r\nblock permanently if ioloop.start() is called recursively.\r\n\r\nThe issue occurs when an interrupt byte has been sent to interrupt the ioloop but, before the handler is called to perform the read, another callback causes the polling loop to be entered recursively (by calling ioloop.start()). The interrupt byte will then be read in the inner loop causing the socket to block later when a read is performed again in the outer loop.\r\n\r\nQuite a specific sequence of calls is needed to make this happen but the intention was always for these sockets to be non-blocking, the previous code was an over-site.\r\n\r\n\r\n "},"comment":{"url":"https://api.github.com/repos/pika/pika/issues/comments/103399670","html_url":"https://github.com/pika/pika/pull/577#issuecomment-103399670","issue_url":"https://api.github.com/repos/pika/pika/issues/577","id":103399670,"user":{"login":"vitaly-krugl","id":1441066,"avatar_url":"https://avatars.githubusercontent.com/u/1441066?v=3","gravatar_id":"","url":"https://api.github.com/users/vitaly-krugl","html_url":"https://github.com/vitaly-krugl","followers_url":"https://api.github.com/users/vitaly-krugl/followers","following_url":"https://api.github.com/users/vitaly-krugl/following{/other_user}","gists_url":"https://api.github.com/users/vitaly-krugl/gists{/gist_id}","starred_url":"https://api.github.com/users/vitaly-krugl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vitaly-krugl/subscriptions","organizations_url":"https://api.github.com/users/vitaly-krugl/orgs","repos_url":"https://api.github.com/users/vitaly-krugl/repos","events_url":"https://api.github.com/users/vitaly-krugl/events{/privacy}","received_events_url":"https://api.github.com/users/vitaly-krugl/received_events","type":"User","site_admin":false},"created_at":"2015-05-19T08:36:27Z","updated_at":"2015-05-19T08:36:27Z","body":"@wjps, this is ironic: the code snippet to reproduce #570 came from my performance test pika_perf.py that worked \"properly\" because of this bug. Once you fixed this bug, my test stopped working \"correctly\" :-)"}}