itskals commented on code in PR #52091:
URL: https://github.com/apache/spark/pull/52091#discussion_r2297230535


##########
core/src/main/scala/org/apache/spark/deploy/SparkSubmit.scala:
##########
@@ -1037,6 +1045,12 @@ private[spark] class SparkSubmit extends Logging {
           case e: Throwable => logError("Failed to close SparkContext", e)
         }
       }
+      if (sparkConf.get(SUBMIT_CALL_SYSTEM_EXIT_ON_MAIN_EXIT)) {
+        logInfo(
+          log"Calling System.exit() with exit code ${MDC(LogKeys.EXIT_CODE, 
exitCode)} " +
+          log"because main ${MDC(LogKeys.CONFIG, 
SUBMIT_CALL_SYSTEM_EXIT_ON_MAIN_EXIT.key)}=true")
+        exitFn(exitCode)

Review Comment:
   In one of our internal implementations, we initiated a timer that permitted 
certain slow non-demon threads to complete their tasks, such as updating 
external metrics and reporting states. Upon the timer's expiration, the system 
logs a message, records thread dumps of all active threads (this can be used 
for triaging the cause of the condition), and subsequently exits. Can you 
extend this patch to do these?
   



-- 
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-unsubscr...@spark.apache.org

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


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

Reply via email to