You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Sergey (Jira)" <ji...@apache.org> on 2021/03/17 11:17:00 UTC

[jira] [Commented] (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=17303304#comment-17303304 ] 

Sergey commented on SPARK-27812:
--------------------------------

It seems, I have reproduced this bug in Spark 3.1.1.

If I don't call sparkContext.stop() explicitly, then a Spark driver process doesn't terminate even after its Main method has been completed.
There are two non-daemon threads, if I don't call sparkContext.stop():
{code:java}
Thread[OkHttp kubernetes.default.svc,5,main]
Thread[OkHttp kubernetes.default.svc Writer,5,main]{code}
It looks like, it prevents the driver jvm process from terminating.

Spark app is started on Amazon EKS (Kubernetes version - 1.17) by [spark-on-k8s-operator: v1beta2-1.2.0-3.0.0|[https://github.com/GoogleCloudPlatform/spark-on-k8s-operator].]

Spark docker image is built from the official release of spark-3.1.1 hadoop3.2.

> 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, Spark Core
>    Affects Versions: 2.4.3, 2.4.4
>            Reporter: Henry Yu
>            Assignee: Igor Calabria
>            Priority: Major
>             Fix For: 2.4.5, 3.0.0
>
>
> 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
(v8.3.4#803005)

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