Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[SPARK-36842][Core] TaskSchedulerImpl - stop TaskResultGetter properly #34098

Closed
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Expand Up @@ -928,13 +928,17 @@ private[spark] class TaskSchedulerImpl(
override def stop(): Unit = {
speculationScheduler.shutdown()
if (backend != null) {
backend.stop()
Utils.tryLogNonFatalError {
backend.stop()
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's the exception you encountered here?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

when deployed in yarn, org.apache.spark.scheduler.cluster.YarnSchedulerBackend#stop will call requestTotalExecutors() on stop. If the yarn application is killed already, it will receive an IOException on sending the RPC.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Checking more, what is the exception thrown in barrierCoordinator.stop ?
The should be defensive, and should not have resulted in failures.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How about wrapping the others too?

}
}
if (taskResultGetter != null) {
taskResultGetter.stop()
}
if (barrierCoordinator != null) {
barrierCoordinator.stop()
Utils.tryLogNonFatalError {
barrierCoordinator.stop()
}
}
starvationTimer.cancel()
abortTimer.cancel()
Expand Down