{"action":"created","issue":{"url":"https://api.github.com/repos/benoitc/gunicorn/issues/1044","labels_url":"https://api.github.com/repos/benoitc/gunicorn/issues/1044/labels{/name}","comments_url":"https://api.github.com/repos/benoitc/gunicorn/issues/1044/comments","events_url":"https://api.github.com/repos/benoitc/gunicorn/issues/1044/events","html_url":"https://github.com/benoitc/gunicorn/issues/1044","id":87163699,"number":1044,"title":"AssertionError on signal SIGQUIT or SIGINT using gevent worker","user":{"login":"timonwong","id":1398228,"avatar_url":"https://avatars.githubusercontent.com/u/1398228?v=3","gravatar_id":"","url":"https://api.github.com/users/timonwong","html_url":"https://github.com/timonwong","followers_url":"https://api.github.com/users/timonwong/followers","following_url":"https://api.github.com/users/timonwong/following{/other_user}","gists_url":"https://api.github.com/users/timonwong/gists{/gist_id}","starred_url":"https://api.github.com/users/timonwong/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/timonwong/subscriptions","organizations_url":"https://api.github.com/users/timonwong/orgs","repos_url":"https://api.github.com/users/timonwong/repos","events_url":"https://api.github.com/users/timonwong/events{/privacy}","received_events_url":"https://api.github.com/users/timonwong/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-06-11T01:07:34Z","updated_at":"2015-07-22T04:41:44Z","closed_at":null,"body":"Traceback\r\n\r\n```\r\n  File \"/home/vagrant/.virtualenvs/gunicorn_test/lib/python2.7/site-packages/gunicorn/workers/base.py\", line 153, in handle_quit\r\n    time.sleep(0.1)\r\n  File \"/home/vagrant/.virtualenvs/gunicorn_test/lib/python2.7/site-packages/gevent/hub.py\", line 82, in sleep\r\n    hub.wait(loop.timer(seconds, ref=ref))\r\n  File \"/home/vagrant/.virtualenvs/gunicorn_test/lib/python2.7/site-packages/gevent/hub.py\", line 348, in wait\r\n    result = waiter.get()\r\n  File \"/home/vagrant/.virtualenvs/gunicorn_test/lib/python2.7/site-packages/gevent/hub.py\", line 575, in get\r\n    return self.hub.switch()\r\n  File \"/home/vagrant/.virtualenvs/gunicorn_test/lib/python2.7/site-packages/gevent/hub.py\", line 337, in switch\r\n    switch_out()\r\n  File \"/home/vagrant/.virtualenvs/gunicorn_test/lib/python2.7/site-packages/gevent/hub.py\", line 341, in switch_out\r\n    raise AssertionError('Impossible to call blocking function in the event loop callback')\r\n```\r\n\r\nIt seems it's caused by 'time.sleep()'\r\n\r\nVersion: 19.3"},"comment":{"url":"https://api.github.com/repos/benoitc/gunicorn/issues/comments/123561478","html_url":"https://github.com/benoitc/gunicorn/issues/1044#issuecomment-123561478","issue_url":"https://api.github.com/repos/benoitc/gunicorn/issues/1044","id":123561478,"user":{"login":"benoitc","id":14498,"avatar_url":"https://avatars.githubusercontent.com/u/14498?v=3","gravatar_id":"","url":"https://api.github.com/users/benoitc","html_url":"https://github.com/benoitc","followers_url":"https://api.github.com/users/benoitc/followers","following_url":"https://api.github.com/users/benoitc/following{/other_user}","gists_url":"https://api.github.com/users/benoitc/gists{/gist_id}","starred_url":"https://api.github.com/users/benoitc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/benoitc/subscriptions","organizations_url":"https://api.github.com/users/benoitc/orgs","repos_url":"https://api.github.com/users/benoitc/repos","events_url":"https://api.github.com/users/benoitc/events{/privacy}","received_events_url":"https://api.github.com/users/benoitc/received_events","type":"User","site_admin":false},"created_at":"2015-07-22T04:41:44Z","updated_at":"2015-07-22T04:41:44Z","body":"It seems related to the use of `time.sleep` while closing a socket:\r\nhttps://github.com/benoitc/gunicorn/blob/master/gunicorn/sock.py#L60\r\n\r\nApplying #1088 should also fix it. Let me know."}}