{"action":"created","issue":{"url":"https://api.github.com/repos/apache/spark/issues/14710","repository_url":"https://api.github.com/repos/apache/spark","labels_url":"https://api.github.com/repos/apache/spark/issues/14710/labels{/name}","comments_url":"https://api.github.com/repos/apache/spark/issues/14710/comments","events_url":"https://api.github.com/repos/apache/spark/issues/14710/events","html_url":"https://github.com/apache/spark/pull/14710","id":172053482,"number":14710,"title":"[SPARK-16533][CORE] resolve deadlocking in driver when executors die","user":{"login":"angolon","id":1421857,"avatar_url":"https://avatars.githubusercontent.com/u/1421857?v=3","gravatar_id":"","url":"https://api.github.com/users/angolon","html_url":"https://github.com/angolon","followers_url":"https://api.github.com/users/angolon/followers","following_url":"https://api.github.com/users/angolon/following{/other_user}","gists_url":"https://api.github.com/users/angolon/gists{/gist_id}","starred_url":"https://api.github.com/users/angolon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/angolon/subscriptions","organizations_url":"https://api.github.com/users/angolon/orgs","repos_url":"https://api.github.com/users/angolon/repos","events_url":"https://api.github.com/users/angolon/events{/privacy}","received_events_url":"https://api.github.com/users/angolon/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":11,"created_at":"2016-08-19T04:43:44Z","updated_at":"2016-08-25T17:50:22Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/apache/spark/pulls/14710","html_url":"https://github.com/apache/spark/pull/14710","diff_url":"https://github.com/apache/spark/pull/14710.diff","patch_url":"https://github.com/apache/spark/pull/14710.patch"},"body":"## What changes were proposed in this pull request?\r\nThis pull request reverts the changes made as a part of #14605, which simply side-steps the deadlock issue. Instead, I propose the following approach:\r\n* Use `scheduleWithFixedDelay` when calling `ExecutorAllocationManager.schedule` for scheduling executor requests. The intent of this is that if invocations are delayed beyond the default schedule interval on account of lock contention, then we avoid a situation where calls to `schedule` are made back-to-back, potentially releasing and then immediately reacquiring these locks - further exacerbating contention.\r\n* Replace a number of calls to `askWithRetry` with `ask` inside of message handling code in `CoarseGrainedSchedulerBackend` and its ilk. This allows us queue messages with the relevant endpoints, release whatever locks we might be holding, and then block whilst awaiting the response. This change is made at the cost of being able to retry should sending the message fail, as retrying outside of the lock could easily cause race conditions if other conflicting messages have been sent whilst awaiting a response. I believe this to be the lesser of two evils, as in many cases these RPC calls are to process local components, and so failures are more likely to be deterministic, and timeouts are more likely to be caused by lock contention.\r\n\r\n## How was this patch tested?\r\nExisting tests, and manual tests under yarn-client mode.\r\n"},"comment":{"url":"https://api.github.com/repos/apache/spark/issues/comments/242480165","html_url":"https://github.com/apache/spark/pull/14710#issuecomment-242480165","issue_url":"https://api.github.com/repos/apache/spark/issues/14710","id":242480165,"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-08-25T17:50:22Z","updated_at":"2016-08-25T17:50:22Z","body":"**[Test build #64429 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/64429/consoleFull)** for PR 14710 at commit [`380291b`](https://github.com/apache/spark/commit/380291b7122aaf1fab461a07d72f0c285696c967).\n * This patch **fails MiMa tests**.\n * This patch merges cleanly.\n * This patch adds no public classes."}}
{"actor":{"display_login":"SparkQA"}}