You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by kayousterhout <gi...@git.apache.org> on 2015/10/26 00:59:23 UTC

[GitHub] spark pull request: [SPARK-11306] Fix hang when JVM exits.

GitHub user kayousterhout opened a pull request:

    https://github.com/apache/spark/pull/9273

    [SPARK-11306] Fix hang when JVM exits.

    This commit fixes a bug where, in Standalone mode, if a task fails and crashes the JVM, the
    failure is considered a "normal failure" (meaning it's considered unrelated to the task), so
    the failure isn't counted against the task's maximum number of failures:
    https://github.com/apache/spark/commit/af3bc59d1f5d9d952c2d7ad1af599c49f1dbdaf0#diff-a755f3d892ff2506a7aa7db52022d77cL138.
    As a result, if a task fails in a way that results in it crashing the JVM, it will continuously be
    re-launched, resulting in a hang. This commit fixes that problem.
    
    This bug was introduced by #8007; @andrewor14 @mcchea @vanzin can you take a look at this?
    
    This error is hard to trigger because we handle executor losses through 2 code paths (the second is via Akka, where Akka notices that the executor endpoint is disconnected).  In my setup, the Akka code path completes first, and doesn't have this bug, so things work fine (see my recent email to the dev list about this).  If I manually disable the Akka code path, I can see the hang (and this commit fixes the issue).

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/kayousterhout/spark-1 SPARK-11306

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/spark/pull/9273.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #9273
    
----
commit 42a1defca0b2f0c9558b6ad8d24c6b1eb389ea10
Author: Kay Ousterhout <ka...@gmail.com>
Date:   2015-10-25T23:46:20Z

    [SPARK-11306] Fix hang when JVM exits.
    
    This commit fixes a bug where, in Standalone mode, if a task fails and crashes the JVM, the
    failure is considered a "normal failure" (meaning it's considered unrelated to the task), so
    the failure isn't counted against the task's maximum number of failures:
    https://github.com/apache/spark/commit/af3bc59d1f5d9d952c2d7ad1af599c49f1dbdaf0#diff-a755f3d892ff2506a7aa7db52022d77cL138.
    As a result, if a task fails in a way that results in it crashing the JVM, it will continuously be
    re-launched, resulting in a hang. This commit fixes that problem.

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark pull request: [SPARK-11306] Fix hang when JVM exits.

Posted by kayousterhout <gi...@git.apache.org>.
Github user kayousterhout commented on a diff in the pull request:

    https://github.com/apache/spark/pull/9273#discussion_r43032139
  
    --- Diff: core/src/main/scala/org/apache/spark/scheduler/cluster/SparkDeploySchedulerBackend.scala ---
    @@ -137,7 +137,7 @@ private[spark] class SparkDeploySchedulerBackend(
     
       override def executorRemoved(fullId: String, message: String, exitStatus: Option[Int]) {
         val reason: ExecutorLossReason = exitStatus match {
    -      case Some(code) => ExecutorExited(code, isNormalExit = true, message)
    +      case Some(code) => ExecutorExited(code, isNormalExit = false, message)
    --- End diff --
    
    Also, in any case, I'd like to keep this simple, to just restore the behavior from before commit https://github.com/apache/spark/commit/af3bc59d1f5d9d952c2d7ad1af599c49f1dbdaf0#diff-a755f3d892ff2506a7aa7db52022d77cL138


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark pull request: [SPARK-11306] Fix hang when JVM exits.

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the pull request:

    https://github.com/apache/spark/pull/9273#issuecomment-151001763
  
    Merged build finished. Test PASSed.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark pull request: [SPARK-11306] Fix hang when JVM exits.

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the pull request:

    https://github.com/apache/spark/pull/9273#issuecomment-151001765
  
    Test PASSed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/44321/
    Test PASSed.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark pull request: [SPARK-11306] Fix hang when JVM exits.

Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:

    https://github.com/apache/spark/pull/9273


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark pull request: [SPARK-11306] Fix hang when JVM exits.

Posted by vanzin <gi...@git.apache.org>.
Github user vanzin commented on a diff in the pull request:

    https://github.com/apache/spark/pull/9273#discussion_r43012950
  
    --- Diff: core/src/main/scala/org/apache/spark/scheduler/cluster/SparkDeploySchedulerBackend.scala ---
    @@ -137,7 +137,7 @@ private[spark] class SparkDeploySchedulerBackend(
     
       override def executorRemoved(fullId: String, message: String, exitStatus: Option[Int]) {
         val reason: ExecutorLossReason = exitStatus match {
    -      case Some(code) => ExecutorExited(code, isNormalExit = true, message)
    +      case Some(code) => ExecutorExited(code, isNormalExit = false, message)
    --- End diff --
    
    I don't think that's a good idea. The user's code could then `System.exit(0)` and mess up accounting of failed tasks.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark pull request: [SPARK-11306] Fix hang when JVM exits.

Posted by vanzin <gi...@git.apache.org>.
Github user vanzin commented on the pull request:

    https://github.com/apache/spark/pull/9273#issuecomment-150995282
  
    LGTM.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark pull request: [SPARK-11306] Fix hang when JVM exits.

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the pull request:

    https://github.com/apache/spark/pull/9273#issuecomment-150989277
  
     Merged build triggered.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark pull request: [SPARK-11306] Fix hang when JVM exits.

Posted by viirya <gi...@git.apache.org>.
Github user viirya commented on a diff in the pull request:

    https://github.com/apache/spark/pull/9273#discussion_r42971434
  
    --- Diff: core/src/main/scala/org/apache/spark/scheduler/cluster/SparkDeploySchedulerBackend.scala ---
    @@ -137,7 +137,7 @@ private[spark] class SparkDeploySchedulerBackend(
     
       override def executorRemoved(fullId: String, message: String, exitStatus: Option[Int]) {
         val reason: ExecutorLossReason = exitStatus match {
    -      case Some(code) => ExecutorExited(code, isNormalExit = true, message)
    +      case Some(code) => ExecutorExited(code, isNormalExit = false, message)
    --- End diff --
    
    Can we decide if it is normal exit by examining the value of exitStatus?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark pull request: [SPARK-11306] Fix hang when JVM exits.

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the pull request:

    https://github.com/apache/spark/pull/9273#issuecomment-150989285
  
    Merged build started.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark pull request: [SPARK-11306] Fix hang when JVM exits.

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the pull request:

    https://github.com/apache/spark/pull/9273#issuecomment-151001717
  
    **[Test build #44321 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/44321/consoleFull)** for PR 9273 at commit [`42a1def`](https://github.com/apache/spark/commit/42a1defca0b2f0c9558b6ad8d24c6b1eb389ea10).
     * This patch passes all tests.
     * This patch merges cleanly.
     * This patch adds no public classes.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark pull request: [SPARK-11306] Fix hang when JVM exits.

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the pull request:

    https://github.com/apache/spark/pull/9273#issuecomment-150989990
  
    **[Test build #44321 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/44321/consoleFull)** for PR 9273 at commit [`42a1def`](https://github.com/apache/spark/commit/42a1defca0b2f0c9558b6ad8d24c6b1eb389ea10).


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org