Skip to content

Commit 6322959

Browse files
committed
exit JVM process when the exception is thrown from an infinite loop
1 parent 304366c commit 6322959

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

core/src/main/scala/org/apache/spark/ContextCleaner.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ private[spark] class ContextCleaner(sc: SparkContext) extends Logging {
145145
}
146146

147147
/** Keep cleaning RDD, shuffle, and broadcast state. */
148-
private def keepCleaning(): Unit = Utils.logUncaughtExceptions {
148+
private def keepCleaning(): Unit = Utils.tryOrExit {
149149
while (!stopped) {
150150
try {
151151
val reference = Option(referenceQueue.remove(ContextCleaner.REF_QUEUE_POLL_TIMEOUT))

core/src/main/scala/org/apache/spark/deploy/history/FsHistoryProvider.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ private[history] class FsHistoryProvider(conf: SparkConf) extends ApplicationHis
9393
*/
9494
private def getRunner(operateFun: () => Unit): Runnable = {
9595
new Runnable() {
96-
override def run() = Utils.logUncaughtExceptions {
96+
override def run() = Utils.tryOrExit {
9797
operateFun()
9898
}
9999
}

core/src/main/scala/org/apache/spark/util/AsynchronousListenerBus.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ private[spark] abstract class AsynchronousListenerBus[L <: AnyRef, E](name: Stri
5757

5858
private val listenerThread = new Thread(name) {
5959
setDaemon(true)
60-
override def run(): Unit = Utils.logUncaughtExceptions {
60+
override def run(): Unit = Utils.tryOrExit {
6161
while (true) {
6262
eventLock.acquire()
6363
self.synchronized {

0 commit comments

Comments
 (0)