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 2026/07/09 01:57:00 UTC

[jira] [Resolved] (SPARK-49479) Non-daemon timer thread prevents Spark driver JVM from stopping

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

Hyukjin Kwon resolved SPARK-49479.
----------------------------------
    Resolution: Fixed

Resolving as Fixed: this change was merged to master. Implementing commit: 940a62c3f36a [SPARK-49479][CORE] Cancel the Timer non-daemon thread on stopping the BarrierCoordinator. (Triaged as a stranded ticket — the fix landed but the JIRA was left unresolved. Verified present on current master and not reverted.)

> Non-daemon timer thread prevents Spark driver JVM from stopping
> ---------------------------------------------------------------
>
>                 Key: SPARK-49479
>                 URL: https://issues.apache.org/jira/browse/SPARK-49479
>             Project: Spark
>          Issue Type: Bug
>          Components: Spark Core
>    Affects Versions: 3.5.2, 4.0.0
>            Reporter: Xi Chen
>            Priority: Major
>              Labels: pull-request-available
>             Fix For: 4.0.0
>
>
> It is observed that when using [Spark Torch Distributor|https://spark.apache.org/docs/latest/api/python/reference/api/pyspark.ml.torch.distributor.TorchDistributor.html], Spark driver pod could hang around after calling {_}spark.stop(){_}. Although the Spark Context was shutdown, the JVM was still running.
> The reason was that there is a non-daemon timer thread named {_}BarrierCoordinator barrier epoch increment timer{_}, which prevented the driver JVM from stopping. In SPARK-46895 we replaced the timer with non-daemon single thread scheduled executor, but the issue still exists.
> We should use daemon single thread scheduled executor instead.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

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