{"action":"created","issue":{"url":"https://api.github.com/repos/apache/spark/issues/13685","repository_url":"https://api.github.com/repos/apache/spark","labels_url":"https://api.github.com/repos/apache/spark/issues/13685/labels{/name}","comments_url":"https://api.github.com/repos/apache/spark/issues/13685/comments","events_url":"https://api.github.com/repos/apache/spark/issues/13685/events","html_url":"https://github.com/apache/spark/pull/13685","id":160436987,"number":13685,"title":"[SPARK-15963][CORE] Catch `TaskKilledException` correctly in Executor.TaskRunner","user":{"login":"lw-lin","id":15843379,"avatar_url":"https://avatars.githubusercontent.com/u/15843379?v=3","gravatar_id":"","url":"https://api.github.com/users/lw-lin","html_url":"https://github.com/lw-lin","followers_url":"https://api.github.com/users/lw-lin/followers","following_url":"https://api.github.com/users/lw-lin/following{/other_user}","gists_url":"https://api.github.com/users/lw-lin/gists{/gist_id}","starred_url":"https://api.github.com/users/lw-lin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lw-lin/subscriptions","organizations_url":"https://api.github.com/users/lw-lin/orgs","repos_url":"https://api.github.com/users/lw-lin/repos","events_url":"https://api.github.com/users/lw-lin/events{/privacy}","received_events_url":"https://api.github.com/users/lw-lin/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":9,"created_at":"2016-06-15T14:31:03Z","updated_at":"2016-06-22T16:09:46Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/apache/spark/pulls/13685","html_url":"https://github.com/apache/spark/pull/13685","diff_url":"https://github.com/apache/spark/pull/13685.diff","patch_url":"https://github.com/apache/spark/pull/13685.patch"},"body":"## What changes were proposed in this pull request?\r\n\r\nCurrently in [Executor.TaskRunner](https://github.com/apache/spark/blob/master/core/src/main/scala/org/apache/spark/executor/Executor.scala#L362), we:\r\n``` scala\r\ntry {...}\r\ncatch {\r\n  case _: TaskKilledException | _: InterruptedException if task.killed =>\r\n  ...\r\n}\r\n```\r\nWhat we intended to do was:\r\n- `TaskKilledException` **OR** **(**`InterruptedException` **AND** `task.killed`**)**\r\n\r\nBut fact is:\r\n- **(**`TaskKilledException` **OR** `InterruptedException`**)** **AND** `task.killed`\r\n\r\nAs a consequence, sometimes we fail to catch `TaskKilledException` when it's thrown, and will thus incorrectly report our task status as `FAILED` (which should really be `KILLED`).\r\n\r\nThis patch fixes this.\r\n\r\n## How was this patch tested?\r\n\r\nThis should be easy to reason about (also we don't have any test case for TaskRunner yet?)\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/apache/spark/issues/comments/227794232","html_url":"https://github.com/apache/spark/pull/13685#issuecomment-227794232","issue_url":"https://api.github.com/repos/apache/spark/issues/13685","id":227794232,"user":{"login":"SparkQA","id":8108735,"avatar_url":"https://avatars.githubusercontent.com/u/8108735?v=3","gravatar_id":"","url":"https://api.github.com/users/SparkQA","html_url":"https://github.com/SparkQA","followers_url":"https://api.github.com/users/SparkQA/followers","following_url":"https://api.github.com/users/SparkQA/following{/other_user}","gists_url":"https://api.github.com/users/SparkQA/gists{/gist_id}","starred_url":"https://api.github.com/users/SparkQA/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SparkQA/subscriptions","organizations_url":"https://api.github.com/users/SparkQA/orgs","repos_url":"https://api.github.com/users/SparkQA/repos","events_url":"https://api.github.com/users/SparkQA/events{/privacy}","received_events_url":"https://api.github.com/users/SparkQA/received_events","type":"User","site_admin":false},"created_at":"2016-06-22T16:09:46Z","updated_at":"2016-06-22T16:09:46Z","body":"**[Test build #61034 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/61034/consoleFull)** for PR 13685 at commit [`fd2638e`](https://github.com/apache/spark/commit/fd2638e29cf52a75f9927e106added67b28a1658).\n * This patch passes all tests.\n * This patch merges cleanly.\n * This patch adds the following public classes _(experimental)_:\n  * `class ExecutorSuite extends SparkFunSuite `"}}
{"actor":{"display_login":"SparkQA"}}