GitHub PullRequestEvent at 2014-09-26 17:43:48
Repository: kazoo
Actor: jacksontj
Payload: {"action":"closed","number":250,"pull_request":{"url":"https://api.github.com/repos/python-zk/kazoo/pulls/250","id":21820838,"html_url":"https://github.com/python-zk/kazoo/pull/250","diff_url":"https://github.com/python-zk/kazoo/pull/250.diff","patch_url":"https://github.com/python-zk/kazoo/pull/250.patch","issue_url":"https://api.github.com/repos/python-zk/kazoo/issues/250","number":250,"state":"closed","locked":false,"title":"Catch interrupted signals (on select, specificall) in the connect loop","user":{"login":"jacksontj","id":1619869,"avatar_url":"https://avatars.githubusercontent.com/u/1619869?v=2","gravatar_id":"","url":"https://api.github.com/users/jacksontj","html_url":"https://github.com/jacksontj","followers_url":"https://api.github.com/users/jacksontj/followers","following_url":"https://api.github.com/users/jacksontj/following{/other_user}","gists_url":"https://api.github.com/users/jacksontj/gists{/gist_id}","starred_url":"https://api.github.com/users/jacksontj/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jacksontj/subscriptions","organizations_url":"https://api.github.com/users/jacksontj/orgs","repos_url":"https://api.github.com/users/jacksontj/repos","events_url":"https://api.github.com/users/jacksontj/events{/privacy}","received_events_url":"https://api.github.com/users/jacksontj/received_events","type":"User","site_admin":false},"body":"In the current build if the process gets a signal you get a backtrace like:\r\n\r\n```\r\n[ERROR   ] Unhandled exception in connection loop\r\nTraceback (most recent call last):\r\n  File \"/usr/lib/python2.6/site-packages/kazoo/protocol/connection.py\", line 522, in _connect_attempt\r\n    [], [], timeout)[0]\r\n  File \"/usr/lib/python2.6/site-packages/kazoo/handlers/threading.py\", line 250, in select\r\n    return select.select(*args, **kwargs)\r\nerror: (4, 'Interrupted system call')\r\nException in thread Thread-3:\r\nTraceback (most recent call last):\r\n  File \"/usr/lib64/python2.6/threading.py\", line 532, in __bootstrap_inner\r\n    self.run()\r\n  File \"/usr/lib64/python2.6/threading.py\", line 484, in run\r\n    self.__target(*self.__args, **self.__kwargs)\r\n  File \"/usr/lib/python2.6/site-packages/kazoo/protocol/connection.py\", line 466, in zk_loop\r\n    if retry(self._connect_loop, retry) is STOP_CONNECTING:\r\n  File \"/usr/lib/python2.6/site-packages/kazoo/retry.py\", line 123, in __call__\r\n    return func(*args, **kwargs)\r\n  File \"/usr/lib/python2.6/site-packages/kazoo/protocol/connection.py\", line 483, in _connect_loop\r\n    status = self._connect_attempt(host, port, retry)\r\n  File \"/usr/lib/python2.6/site-packages/kazoo/protocol/connection.py\", line 522, in _connect_attempt\r\n    [], [], timeout)[0]\r\n  File \"/usr/lib/python2.6/site-packages/kazoo/handlers/threading.py\", line 250, in select\r\n    return select.select(*args, **kwargs)\r\nerror: (4, 'Interrupted system call')\r\n```\r\n\r\nThis is due to the kazoo connection thread getting the signal and not handling the system call interrupt. It seems that your _socket_error_handling contextmanager covers that case, and with local testing it seems to have fixed the issue.","created_at":"2014-09-25T23:53:13Z","updated_at":"2014-09-26T17:43:48Z","closed_at":"2014-09-26T17:43:48Z","merged_at":null,"merge_commit_sha":"2332c9204c48b8fc02d2f757271f7c70eff3463f","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/python-zk/kazoo/pulls/250/commits","review_comments_url":"https://api.github.com/repos/python-zk/kazoo/pulls/250/comments","review_comment_url":"https://api.github.com/repos/python-zk/kazoo/pulls/comments/{number}","comments_url":"https://api.github.com/repos/python-zk/kazoo/issues/250/comments","statuses_url":"https://api.github.com/repos/python-zk/kazoo/statuses/6cfb013737b2f94c4b83fdde4d96cdd199616763","head":{"label":"jacksontj:signal_interrupt","ref":"signal_interrupt","sha":"6cfb013737b2f94c4b83fdde4d96cdd199616763","user":{"login":"jacksontj","id":1619869,"avatar_url":"https://avatars.githubusercontent.com/u/1619869?v=2","gravatar_id":"","url":"https://api.github.com/users/jacksontj","html_url":"https://github.com/jacksontj","followers_url":"https://api.github.com/users/jacksontj/followers","following_url":"https://api.github.com/users/jacksontj/following{/other_user}","gists_url":"https://api.github.com/users/jacksontj/gists{/gist_id}","starred_url":"https://api.github.com/users/jacksontj/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jacksontj/subscriptions","organizations_url":"https://api.github.com/users/jacksontj/orgs","repos_url":"https://api.github.com/users/jacksontj/repos","events_url":"https://api.github.com/users/jacksontj/events{/privacy}","received_events_url":"https://api.github.com/users/jacksontj/received_events","type":"User","site_admin":false},"repo":{"id":20025671,"name":"kazoo","full_name":"jacksontj/kazoo","owner":{"login":"jacksontj","id":1619869,"avatar_url":"https://avatars.githubusercontent.com/u/1619869?v=2","gravatar_id":"","url":"https://api.github.com/users/jacksontj","html_url":"https://github.com/jacksontj","followers_url":"https://api.github.com/users/jacksontj/followers","following_url":"https://api.github.com/users/jacksontj/following{/other_user}","gists_url":"https://api.github.com/users/jacksontj/gists{/gist_id}","starred_url":"https://api.github.com/users/jacksontj/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jacksontj/subscriptions","organizations_url":"https://api.github.com/users/jacksontj/orgs","repos_url":"https://api.github.com/users/jacksontj/repos","events_url":"https://api.github.com/users/jacksontj/events{/privacy}","received_events_url":"https://api.github.com/users/jacksontj/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/jacksontj/kazoo","description":"Kazoo is a high-level Python library that makes it easier to use Apache Zookeeper.","fork":true,"url":"https://api.github.com/repos/jacksontj/kazoo","forks_url":"https://api.github.com/repos/jacksontj/kazoo/forks","keys_url":"https://api.github.com/repos/jacksontj/kazoo/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jacksontj/kazoo/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jacksontj/kazoo/teams","hooks_url":"https://api.github.com/repos/jacksontj/kazoo/hooks","issue_events_url":"https://api.github.com/repos/jacksontj/kazoo/issues/events{/number}","events_url":"https://api.github.com/repos/jacksontj/kazoo/events","assignees_url":"https://api.github.com/repos/jacksontj/kazoo/assignees{/user}","branches_url":"https://api.github.com/repos/jacksontj/kazoo/branches{/branch}","tags_url":"https://api.github.com/repos/jacksontj/kazoo/tags","blobs_url":"https://api.github.com/repos/jacksontj/kazoo/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jacksontj/kazoo/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jacksontj/kazoo/git/refs{/sha}","trees_url":"https://api.github.com/repos/jacksontj/kazoo/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jacksontj/kazoo/statuses/{sha}","languages_url":"https://api.github.com/repos/jacksontj/kazoo/languages","stargazers_url":"https://api.github.com/repos/jacksontj/kazoo/stargazers","contributors_url":"https://api.github.com/repos/jacksontj/kazoo/contributors","subscribers_url":"https://api.github.com/repos/jacksontj/kazoo/subscribers","subscription_url":"https://api.github.com/repos/jacksontj/kazoo/subscription","commits_url":"https://api.github.com/repos/jacksontj/kazoo/commits{/sha}","git_commits_url":"https://api.github.com/repos/jacksontj/kazoo/git/commits{/sha}","comments_url":"https://api.github.com/repos/jacksontj/kazoo/comments{/number}","issue_comment_url":"https://api.github.com/repos/jacksontj/kazoo/issues/comments/{number}","contents_url":"https://api.github.com/repos/jacksontj/kazoo/contents/{+path}","compare_url":"https://api.github.com/repos/jacksontj/kazoo/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jacksontj/kazoo/merges","archive_url":"https://api.github.com/repos/jacksontj/kazoo/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jacksontj/kazoo/downloads","issues_url":"https://api.github.com/repos/jacksontj/kazoo/issues{/number}","pulls_url":"https://api.github.com/repos/jacksontj/kazoo/pulls{/number}","milestones_url":"https://api.github.com/repos/jacksontj/kazoo/milestones{/number}","notifications_url":"https://api.github.com/repos/jacksontj/kazoo/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jacksontj/kazoo/labels{/name}","releases_url":"https://api.github.com/repos/jacksontj/kazoo/releases{/id}","created_at":"2014-05-21T15:08:02Z","updated_at":"2014-09-25T22:16:48Z","pushed_at":"2014-09-26T02:11:48Z","git_url":"git://github.com/jacksontj/kazoo.git","ssh_url":"git@github.com:jacksontj/kazoo.git","clone_url":"https://github.com/jacksontj/kazoo.git","svn_url":"https://github.com/jacksontj/kazoo","homepage":"https://kazoo.readthedocs.org","size":3589,"stargazers_count":0,"watchers_count":0,"language":"Python","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":0,"default_branch":"master"}},"base":{"label":"python-zk:master","ref":"master","sha":"35f28e0534290fc3df12cc0e927ce10e7eec49f1","user":{"login":"python-zk","id":1731709,"avatar_url":"https://avatars.githubusercontent.com/u/1731709?v=2","gravatar_id":"","url":"https://api.github.com/users/python-zk","html_url":"https://github.com/python-zk","followers_url":"https://api.github.com/users/python-zk/followers","following_url":"https://api.github.com/users/python-zk/following{/other_user}","gists_url":"https://api.github.com/users/python-zk/gists{/gist_id}","starred_url":"https://api.github.com/users/python-zk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/python-zk/subscriptions","organizations_url":"https://api.github.com/users/python-zk/orgs","repos_url":"https://api.github.com/users/python-zk/repos","events_url":"https://api.github.com/users/python-zk/events{/privacy}","received_events_url":"https://api.github.com/users/python-zk/received_events","type":"Organization","site_admin":false},"repo":{"id":4426689,"name":"kazoo","full_name":"python-zk/kazoo","owner":{"login":"python-zk","id":1731709,"avatar_url":"https://avatars.githubusercontent.com/u/1731709?v=2","gravatar_id":"","url":"https://api.github.com/users/python-zk","html_url":"https://github.com/python-zk","followers_url":"https://api.github.com/users/python-zk/followers","following_url":"https://api.github.com/users/python-zk/following{/other_user}","gists_url":"https://api.github.com/users/python-zk/gists{/gist_id}","starred_url":"https://api.github.com/users/python-zk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/python-zk/subscriptions","organizations_url":"https://api.github.com/users/python-zk/orgs","repos_url":"https://api.github.com/users/python-zk/repos","events_url":"https://api.github.com/users/python-zk/events{/privacy}","received_events_url":"https://api.github.com/users/python-zk/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/python-zk/kazoo","description":"Kazoo is a high-level Python library that makes it easier to use Apache Zookeeper.","fork":false,"url":"https://api.github.com/repos/python-zk/kazoo","forks_url":"https://api.github.com/repos/python-zk/kazoo/forks","keys_url":"https://api.github.com/repos/python-zk/kazoo/keys{/key_id}","collaborators_url":"https://api.github.com/repos/python-zk/kazoo/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/python-zk/kazoo/teams","hooks_url":"https://api.github.com/repos/python-zk/kazoo/hooks","issue_events_url":"https://api.github.com/repos/python-zk/kazoo/issues/events{/number}","events_url":"https://api.github.com/repos/python-zk/kazoo/events","assignees_url":"https://api.github.com/repos/python-zk/kazoo/assignees{/user}","branches_url":"https://api.github.com/repos/python-zk/kazoo/branches{/branch}","tags_url":"https://api.github.com/repos/python-zk/kazoo/tags","blobs_url":"https://api.github.com/repos/python-zk/kazoo/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/python-zk/kazoo/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/python-zk/kazoo/git/refs{/sha}","trees_url":"https://api.github.com/repos/python-zk/kazoo/git/trees{/sha}","statuses_url":"https://api.github.com/repos/python-zk/kazoo/statuses/{sha}","languages_url":"https://api.github.com/repos/python-zk/kazoo/languages","stargazers_url":"https://api.github.com/repos/python-zk/kazoo/stargazers","contributors_url":"https://api.github.com/repos/python-zk/kazoo/contributors","subscribers_url":"https://api.github.com/repos/python-zk/kazoo/subscribers","subscription_url":"https://api.github.com/repos/python-zk/kazoo/subscription","commits_url":"https://api.github.com/repos/python-zk/kazoo/commits{/sha}","git_commits_url":"https://api.github.com/repos/python-zk/kazoo/git/commits{/sha}","comments_url":"https://api.github.com/repos/python-zk/kazoo/comments{/number}","issue_comment_url":"https://api.github.com/repos/python-zk/kazoo/issues/comments/{number}","contents_url":"https://api.github.com/repos/python-zk/kazoo/contents/{+path}","compare_url":"https://api.github.com/repos/python-zk/kazoo/compare/{base}...{head}","merges_url":"https://api.github.com/repos/python-zk/kazoo/merges","archive_url":"https://api.github.com/repos/python-zk/kazoo/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/python-zk/kazoo/downloads","issues_url":"https://api.github.com/repos/python-zk/kazoo/issues{/number}","pulls_url":"https://api.github.com/repos/python-zk/kazoo/pulls{/number}","milestones_url":"https://api.github.com/repos/python-zk/kazoo/milestones{/number}","notifications_url":"https://api.github.com/repos/python-zk/kazoo/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/python-zk/kazoo/labels{/name}","releases_url":"https://api.github.com/repos/python-zk/kazoo/releases{/id}","created_at":"2012-05-23T23:46:42Z","updated_at":"2014-09-25T21:13:06Z","pushed_at":"2014-09-23T20:30:12Z","git_url":"git://github.com/python-zk/kazoo.git","ssh_url":"git@github.com:python-zk/kazoo.git","clone_url":"https://github.com/python-zk/kazoo.git","svn_url":"https://github.com/python-zk/kazoo","homepage":"https://kazoo.readthedocs.org","size":6262,"stargazers_count":267,"watchers_count":267,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":117,"mirror_url":null,"open_issues_count":37,"forks":117,"open_issues":37,"watchers":267,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/python-zk/kazoo/pulls/250"},"html":{"href":"https://github.com/python-zk/kazoo/pull/250"},"issue":{"href":"https://api.github.com/repos/python-zk/kazoo/issues/250"},"comments":{"href":"https://api.github.com/repos/python-zk/kazoo/issues/250/comments"},"review_comments":{"href":"https://api.github.com/repos/python-zk/kazoo/pulls/250/comments"},"review_comment":{"href":"https://api.github.com/repos/python-zk/kazoo/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/python-zk/kazoo/pulls/250/commits"},"statuses":{"href":"https://api.github.com/repos/python-zk/kazoo/statuses/6cfb013737b2f94c4b83fdde4d96cdd199616763"}},"merged":false,"mergeable":true,"mergeable_state":"unstable","merged_by":null,"comments":0,"review_comments":0,"commits":2,"additions":50,"deletions":20,"changed_files":3}}