ueshin commented on code in PR #53055:
URL: https://github.com/apache/spark/pull/53055#discussion_r2525681498


##########
python/pyspark/daemon.py:
##########
@@ -85,7 +86,12 @@ def worker(sock, authenticated):
         try:
             outfile.flush()
         except Exception:
-            pass
+            faulthandler_log_path = os.environ.get("PYTHON_FAULTHANDLER_DIR", 
None)
+            if faulthandler_log_path:
+                faulthandler_log_path = os.path.join(faulthandler_log_path, 
str(os.getpid()))
+                with open(faulthandler_log_path, "w") as faulthandler_log_file:
+                    faulthandler.dump_traceback(file=faulthandler_log_file)
+            raise

Review Comment:
   It may be good enough to just write out the exception to see whether this 
actually happens or not, without this behavior change, for now.



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to