{"action":"created","issue":{"url":"https://api.github.com/repos/dask/distributed/issues/301","repository_url":"https://api.github.com/repos/dask/distributed","labels_url":"https://api.github.com/repos/dask/distributed/issues/301/labels{/name}","comments_url":"https://api.github.com/repos/dask/distributed/issues/301/comments","events_url":"https://api.github.com/repos/dask/distributed/issues/301/events","html_url":"https://github.com/dask/distributed/issues/301","id":158245399,"number":301,"title":"Better handling of tasks that cause the worker to exit","user":{"login":"ogrisel","id":89061,"avatar_url":"https://avatars.githubusercontent.com/u/89061?v=3","gravatar_id":"","url":"https://api.github.com/users/ogrisel","html_url":"https://github.com/ogrisel","followers_url":"https://api.github.com/users/ogrisel/followers","following_url":"https://api.github.com/users/ogrisel/following{/other_user}","gists_url":"https://api.github.com/users/ogrisel/gists{/gist_id}","starred_url":"https://api.github.com/users/ogrisel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ogrisel/subscriptions","organizations_url":"https://api.github.com/users/ogrisel/orgs","repos_url":"https://api.github.com/users/ogrisel/repos","events_url":"https://api.github.com/users/ogrisel/events{/privacy}","received_events_url":"https://api.github.com/users/ogrisel/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":7,"created_at":"2016-06-02T21:36:12Z","updated_at":"2016-06-03T15:24:11Z","closed_at":null,"body":"The following seems to hang forever:\r\n\r\n```python\r\n>>> from distributed import Executor\r\n>>> import sys\r\n>>> e = Executor('localhost:8786')\r\n>>> e.submit(sys.exit, 1).result()\r\n```\r\n\r\nin the background this causes the dscheduler logs to output many errors such as:\r\n\r\n```\r\ndistributed.scheduler - ERROR - Stream is closed\r\nTraceback (most recent call last):\r\n  File \"/home/ogrisel/code/distributed/distributed/scheduler.py\", line 1545, in heartbeat\r\n    io_loop=self.loop)\r\n  File \"/home/ogrisel/.virtualenvs/py35/lib/python3.5/site-packages/tornado/gen.py\", line 1008, in run\r\n    value = future.result()\r\n  File \"/home/ogrisel/.virtualenvs/py35/lib/python3.5/site-packages/tornado/concurrent.py\", line 232, in result\r\n    raise_exc_info(self._exc_info)\r\n  File \"<string>\", line 3, in raise_exc_info\r\n  File \"/home/ogrisel/.virtualenvs/py35/lib/python3.5/site-packages/tornado/gen.py\", line 1014, in run\r\n    yielded = self.gen.throw(*exc_info)\r\n  File \"/home/ogrisel/code/distributed/distributed/core.py\", line 439, in send_recv_from_rpc\r\n    result = yield send_recv(stream=stream, op=key, **kwargs)\r\n  File \"/home/ogrisel/.virtualenvs/py35/lib/python3.5/site-packages/tornado/gen.py\", line 1008, in run\r\n    value = future.result()\r\n  File \"/home/ogrisel/.virtualenvs/py35/lib/python3.5/site-packages/tornado/concurrent.py\", line 232, in result\r\n    raise_exc_info(self._exc_info)\r\n  File \"<string>\", line 3, in raise_exc_info\r\n  File \"/home/ogrisel/.virtualenvs/py35/lib/python3.5/site-packages/tornado/gen.py\", line 1014, in run\r\n    yielded = self.gen.throw(*exc_info)\r\n  File \"/home/ogrisel/code/distributed/distributed/core.py\", line 333, in send_recv\r\n    response = yield read(stream)\r\n  File \"/home/ogrisel/.virtualenvs/py35/lib/python3.5/site-packages/tornado/gen.py\", line 1008, in run\r\n    value = future.result()\r\n  File \"/home/ogrisel/.virtualenvs/py35/lib/python3.5/site-packages/tornado/concurrent.py\", line 232, in result\r\n    raise_exc_info(self._exc_info)\r\n  File \"<string>\", line 3, in raise_exc_info\r\n  File \"/home/ogrisel/.virtualenvs/py35/lib/python3.5/site-packages/tornado/gen.py\", line 1014, in run\r\n    yielded = self.gen.throw(*exc_info)\r\n  File \"/home/ogrisel/code/distributed/distributed/core.py\", line 241, in read\r\n    n_frames = yield stream.read_bytes(8)\r\n  File \"/home/ogrisel/.virtualenvs/py35/lib/python3.5/site-packages/tornado/gen.py\", line 1008, in run\r\n    value = future.result()\r\n  File \"/home/ogrisel/.virtualenvs/py35/lib/python3.5/site-packages/tornado/concurrent.py\", line 232, in result\r\n    raise_exc_info(self._exc_info)\r\n  File \"<string>\", line 3, in raise_exc_info\r\ntornado.iostream.StreamClosedError: Stream is closed\r\n```\r\n\r\nI think each worker process should have a unique `uuid4` that is passed as a metadata to any Future object returned by those workers and the nannies should report to the scheduler the `uuid4` of any process that crashed when executing a task so that the scheduler can ban those tasks and update the Future objects to mark them as failed with an informative error message instead of hanging for ever.\r\n"},"comment":{"url":"https://api.github.com/repos/dask/distributed/issues/comments/223609659","html_url":"https://github.com/dask/distributed/issues/301#issuecomment-223609659","issue_url":"https://api.github.com/repos/dask/distributed/issues/301","id":223609659,"user":{"login":"mrocklin","id":306380,"avatar_url":"https://avatars.githubusercontent.com/u/306380?v=3","gravatar_id":"","url":"https://api.github.com/users/mrocklin","html_url":"https://github.com/mrocklin","followers_url":"https://api.github.com/users/mrocklin/followers","following_url":"https://api.github.com/users/mrocklin/following{/other_user}","gists_url":"https://api.github.com/users/mrocklin/gists{/gist_id}","starred_url":"https://api.github.com/users/mrocklin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mrocklin/subscriptions","organizations_url":"https://api.github.com/users/mrocklin/orgs","repos_url":"https://api.github.com/users/mrocklin/repos","events_url":"https://api.github.com/users/mrocklin/events{/privacy}","received_events_url":"https://api.github.com/users/mrocklin/received_events","type":"User","site_admin":false},"created_at":"2016-06-03T15:24:11Z","updated_at":"2016-06-03T15:24:11Z","body":"@minrk if retries is given and the exception is more mundane, like `ZeroDivisionError`, will IPyParallel still retry?"}}
{"actor":{"display_login":"mrocklin"}}