You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by "jjayadeep06 (via GitHub)" <gi...@apache.org> on 2025/03/10 05:34:13 UTC

[PR] [SPARK-51450][CORE] BarrierCoordinator thread not exiting in Spark standalone mode [spark]

jjayadeep06 opened a new pull request, #50223:
URL: https://github.com/apache/spark/pull/50223

   What changes were proposed in this pull request?
   Cancel the timer class when onStop method is called
   
   Why are the changes needed?
   This change is needed to successfully exit the spark application else it hangs on completion.
   
   Does this PR introduce any user-facing change?
   No
   
   How was this patch tested?
   Run the following scripts locally using spark-submit.
   Without this change, the JVM would hang there and not exit.
   With this change it would exit successfully.
   Code samples to simulate the problem and the corresponding fix is attached below:-
   
   [barrier_example.py](https://gist.github.com/jshmchenxi/5d7e7c61e1eedd03cd6d676699059e9b#file-barrier_example-py)
   [xgboost-test.py](https://gist.github.com/bcheena/510230e19120eb9ae631dcafa804409f).
   
   Was this patch authored or co-authored using generative AI tooling?
   No
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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


Re: [PR] [SPARK-51450][CORE] BarrierCoordinator thread not exiting in Spark standalone mode [spark]

Posted by "beliefer (via GitHub)" <gi...@apache.org>.
beliefer commented on PR #50223:
URL: https://github.com/apache/spark/pull/50223#issuecomment-2720399615

   At that time, https://issues.apache.org/jira/browse/SPARK-46895 is an improvement, not a bug fix.
   You means JVM will not exit even if the branch-3.5 uses `Timer`?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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


Re: [PR] [SPARK-51450][CORE] BarrierCoordinator thread not exiting in Spark standalone mode [spark]

Posted by "beliefer (via GitHub)" <gi...@apache.org>.
beliefer commented on PR #50223:
URL: https://github.com/apache/spark/pull/50223#issuecomment-2719643055

   @jjayadeep06 I'm sorry for the suggestion at https://github.com/apache/spark/pull/50020#issuecomment-2705780937
   I want you create a backport PR for branch-3.5, since I read the issue with 3.5.
   Since 3.5 hasn't replaced Timer with thread pool yet, I think we can close this PR.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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


Re: [PR] [SPARK-51450][CORE] BarrierCoordinator thread not exiting in Spark standalone mode [spark]

Posted by "jjayadeep06 (via GitHub)" <gi...@apache.org>.
jjayadeep06 commented on PR #50223:
URL: https://github.com/apache/spark/pull/50223#issuecomment-2709483996

   @beliefer - pls take a look


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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


Re: [PR] [SPARK-51450][CORE] BarrierCoordinator thread not exiting in Spark standalone mode [spark]

Posted by "cnauroth (via GitHub)" <gi...@apache.org>.
cnauroth commented on PR #50223:
URL: https://github.com/apache/spark/pull/50223#issuecomment-2723329648

   Thank you for the reviews and commit everyone.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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


Re: [PR] [SPARK-51450][CORE] BarrierCoordinator thread not exiting in Spark standalone mode [spark]

Posted by "beliefer (via GitHub)" <gi...@apache.org>.
beliefer commented on PR #50223:
URL: https://github.com/apache/spark/pull/50223#issuecomment-2720555409

   cc @srowen 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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


Re: [PR] [SPARK-51450][CORE] BarrierCoordinator thread not exiting in Spark standalone mode [spark]

Posted by "jjayadeep06 (via GitHub)" <gi...@apache.org>.
jjayadeep06 commented on PR #50223:
URL: https://github.com/apache/spark/pull/50223#issuecomment-2719772362

   > @jjayadeep06 I'm sorry for the suggestion at [#50020 (comment)](https://github.com/apache/spark/pull/50020#issuecomment-2705780937) I want you create a backport PR for branch-3.5, since I read the issue with 3.5. Since 3.5 hasn't replaced Timer with thread pool yet, I think we can close this PR.
   
   Hi @beliefer - the issue is present in 3.5 as well as `Timer` is not cancelled and is running in a non-daemon fashion, therefore this fix will solve the problem in 3.5 as well


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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


Re: [PR] [SPARK-51450][CORE] BarrierCoordinator thread not exiting in Spark standalone mode [spark]

Posted by "jjayadeep06 (via GitHub)" <gi...@apache.org>.
jjayadeep06 commented on PR #50223:
URL: https://github.com/apache/spark/pull/50223#issuecomment-2712735092

   > Hello @jjayadeep06 . I saw how #50020 on master switched to a daemon thread. Do you think we should construct the `Timer` here on branch-3.5 with a daemon thread too for extra safety?
   
   Ack
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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


Re: [PR] [SPARK-51450][CORE] BarrierCoordinator thread not exiting in Spark standalone mode [spark]

Posted by "beliefer (via GitHub)" <gi...@apache.org>.
beliefer closed pull request #50223: [SPARK-51450][CORE] BarrierCoordinator thread not exiting in Spark standalone mode
URL: https://github.com/apache/spark/pull/50223


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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


Re: [PR] [SPARK-51450][CORE] BarrierCoordinator thread not exiting in Spark standalone mode [spark]

Posted by "beliefer (via GitHub)" <gi...@apache.org>.
beliefer commented on PR #50223:
URL: https://github.com/apache/spark/pull/50223#issuecomment-2721323484

   @jjayadeep06 @srowen @cnauroth Thank you !
   Merged into branch-3.5


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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


Re: [PR] [SPARK-51450][CORE] BarrierCoordinator thread not exiting in Spark standalone mode [spark]

Posted by "jjayadeep06 (via GitHub)" <gi...@apache.org>.
jjayadeep06 commented on PR #50223:
URL: https://github.com/apache/spark/pull/50223#issuecomment-2720538216

   > At that time, https://issues.apache.org/jira/browse/SPARK-46895 is an improvement, not a bug fix. You means JVM will not exit even if the branch-3.5 uses `Timer`?
   
   yes, and if you look at the changes, it is fixing the existing `Timer` implementation. 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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