You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Hyukjin Kwon (JIRA)" <ji...@apache.org> on 2019/05/21 04:21:30 UTC

[jira] [Updated] (SPARK-14180) Deadlock in CoarseGrainedExecutorBackend Shutdown

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

Hyukjin Kwon updated SPARK-14180:
---------------------------------
    Labels: bulk-closed  (was: )

> Deadlock in CoarseGrainedExecutorBackend Shutdown
> -------------------------------------------------
>
>                 Key: SPARK-14180
>                 URL: https://issues.apache.org/jira/browse/SPARK-14180
>             Project: Spark
>          Issue Type: Bug
>         Environment: master branch.  commit d6dc12ef0146ae409834c78737c116050961f350
>            Reporter: Michael Gummelt
>            Priority: Critical
>              Labels: bulk-closed
>
> I'm fairly certain that https://github.com/apache/spark/pull/11031 introduced a deadlock in executor shutdown.  The result is executor shutdown hangs indefinitely.  In Mesos at least, this lasts until {{spark.mesos.coarse.shutdownTimeout}} (default 10s), at which point the driver stops, which force kills the executors.
> The deadlock is as follows:
> - CoarseGrainedExecutorBackend receives a Shutdown message, which now blocks on rpcEnv.awaitTermination() https://github.com/apache/spark/blob/master/core/src/main/scala/org/apache/spark/SparkEnv.scala#L95
> - rpcEnv.awaitTermination() blocks on dispatcher.awaitTermination(), which blocks until all dispatcher threads (MessageLoop threads) terminate
> - However, the initial Shutdown message handling is itself handled by a Dispatcher MessageLoop thread.  This mutual dependence results in a deadlock. https://github.com/apache/spark/blob/master/core/src/main/scala/org/apache/spark/rpc/netty/Dispatcher.scala#L216



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

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