You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Henry Yu (JIRA)" <ji...@apache.org> on 2019/06/10 05:56:00 UTC

[jira] [Comment Edited] (SPARK-27812) kubernetes client import non-daemon thread which block jvm exit.

    [ https://issues.apache.org/jira/browse/SPARK-27812?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16859710#comment-16859710 ] 

Henry Yu edited comment on SPARK-27812 at 6/10/19 5:55 AM:
-----------------------------------------------------------

In our private branch, I fix this and potential non-daemon thread introduced by other third party lib by adding SparkUncaughtExceptionHandler to KubernetesClusterSchedulerBackend

. [~dongjoon]

Driver Pod doesn't exit because there is a uncaught exception, kubernetes-client failed to call close method , and non-daemon thread block shutdownhook to get executed. With SparkUncaughtExceptionHandler, we can catch user/spark uncaught exception and Call System.exit which triggers shutdownhook to make things better.

How about this solution?

 


was (Author: andrew huali):
In our private branch, I fix this and potential non-daemon thread introduced by other third party lib by adding SparkUncaughtExceptionHandler to KubernetesClusterSchedulerBackend

. [~dongjoon]

Driver Pod doesn't exit because there is a uncaught exception in user code, and non-daemon thread block shutdownhook to get executed. With SparkUncaughtExceptionHandler, we can catch user code exception and Call System.exit which triggers shutdownhook to make things better.

How about this solution?

 

> kubernetes client import non-daemon thread which block jvm exit.
> ----------------------------------------------------------------
>
>                 Key: SPARK-27812
>                 URL: https://issues.apache.org/jira/browse/SPARK-27812
>             Project: Spark
>          Issue Type: Bug
>          Components: Kubernetes
>    Affects Versions: 2.4.3
>            Reporter: Henry Yu
>            Priority: Major
>
> I try spark-submit to k8s with cluster mode. Driver pod failed to exit with An Okhttp Websocket Non-Daemon Thread.
>  



--
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