spark-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Apache Spark (JIRA)" <j...@apache.org>
Subject [jira] [Assigned] (SPARK-18981) The last job hung when speculation is on
Date Fri, 23 Dec 2016 17:11:58 GMT

     [ https://issues.apache.org/jira/browse/SPARK-18981?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Apache Spark reassigned SPARK-18981:
------------------------------------

    Assignee: Apache Spark

> The last job hung when speculation is on
> ----------------------------------------
>
>                 Key: SPARK-18981
>                 URL: https://issues.apache.org/jira/browse/SPARK-18981
>             Project: Spark
>          Issue Type: Bug
>          Components: Spark Core
>    Affects Versions: 2.0.2
>         Environment: spark2.0.2
> hadoop2.5.0
>            Reporter: roncenzhao
>            Assignee: Apache Spark
>            Priority: Critical
>         Attachments: Test.scala, job_hang.png, run_scala.sh
>
>
> CONF:
> spark.speculation   true
> spark.dynamicAllocation.minExecutors    0
> spark.executor.cores   2
> When I run the follow app, the bug will trigger.
> ```
> sc.runJob(job1)
> sleep(100s)
> sc.runJob(job2) // the job2 will hang and never be scheduled
> ```
> The triggering condition is described as follows:
> condition1: During the sleeping time, the executors will be released and the # of the
executor will be zero some seconds later. The #numExecutorsTarget in 'ExecutorAllocationManager'
will be 0.
> condition2: In 'ExecutorAllocationListener.onTaskEnd()', the numRunningTasks will be
negative during the ending of job1's tasks. 
> condition3: The job2 only hava one task.
> result:
> In the method 'ExecutorAllocationManager.updateAndSyncNumExecutorsTarget()', we will
calculate #maxNeeded in 'maxNumExecutorsNeeded()'. Obviously, #numRunningOrPendingTasks will
be negative and the #maxNeeded will be 0 or negative. So the 'ExecutorAllocationManager' will
not request container from yarn. The app will hang.
> In the attachments, submitting the app by 'run_scala.sh' will lead to the 'hang' problem
as the 'job_hang.png' shows.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

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


Mime
View raw message