You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by "pan3793 (via GitHub)" <gi...@apache.org> on 2024/01/30 12:28:30 UTC

[PR] [SPARK-46920][YARN] Improve executor exit error message on YARN [spark]

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

   <!--
   Thanks for sending a pull request!  Here are some tips for you:
     1. If this is your first time, please read our contributor guidelines: https://spark.apache.org/contributing.html
     2. Ensure you have added or run the appropriate tests for your PR: https://spark.apache.org/developer-tools.html
     3. If the PR is unfinished, add '[WIP]' in your PR title, e.g., '[WIP][SPARK-XXXX] Your PR title ...'.
     4. Be sure to keep the PR description updated to reflect all changes.
     5. Please write your PR title to summarize what this PR proposes.
     6. If possible, provide a concise example to reproduce the issue for a faster review.
     7. If you want to add a new configuration, please read the guideline first for naming configurations in
        'core/src/main/scala/org/apache/spark/internal/config/ConfigEntry.scala'.
     8. If you want to add or modify an error type or message, please read the guideline first in
        'common/utils/src/main/resources/error/README.md'.
   -->
   
   ### What changes were proposed in this pull request?
   <!--
   Please clarify what changes you are proposing. The purpose of this section is to outline the changes and how this PR fixes the issue. 
   If possible, please consider writing useful notes for better and faster reviews in your PR. See the examples below.
     1. If you refactor some codes with changing classes, showing the class hierarchy will help reviewers.
     2. If you fix some SQL features, you can provide some references of other DBMSes.
     3. If there is design documentation, please add the link.
     4. If there is a discussion in the mailing list, please add the link.
   -->
   Improve executor exit error message on YARN, with additional explanation of exit code defined by Spark.
   
   ### Why are the changes needed?
   <!--
   Please clarify why the changes are needed. For instance,
     1. If you propose a new API, clarify the use case for a new API.
     2. If you fix a bug, you can clarify why it is a bug.
   -->
   Spark defines its own exit codes, which have overlap with exit codes defined by YARN, thus diagnostics reported by YARN may be misleading. For example, exit code 56 is defined as `HEARTBEAT_FAILURE` in Spark, but `INVALID_DOCKER_IMAGE_NAME` in Hadoop, thus the error message displayed in UI is misleading.
   
   <img width="714" alt="image" src="https://github.com/apache/spark/assets/26535726/b8cf7834-2958-467f-8851-e47ad0f61833">
   
   ### Does this PR introduce _any_ user-facing change?
   <!--
   Note that it means *any* user-facing change including all aspects such as the documentation fix.
   If yes, please clarify the previous behavior and the change this PR proposes - provide the console output, description and/or an example to show the behavior difference if possible.
   If possible, please also clarify if this is a user-facing change compared to the released Spark versions or within the unreleased branches such as master.
   If no, write 'No'.
   -->
   Yes, the UI displays more information when the executor runs on YARN exits without zero code.
   
   ### How was this patch tested?
   <!--
   If tests were added, say they were added here. Please make sure to add some test cases that check the changes thoroughly including negative and positive cases if possible.
   If it was tested in a way different from regular unit tests, please clarify how you tested step by step, ideally copy and paste-able, so that other reviewers can test and check, and descendants can verify in the future.
   If tests were not added, please describe why they were not added and/or why it was difficult to add.
   If benchmark tests were added, please run the benchmarks in GitHub Actions for the consistent environment, and the instructions could accord to: https://spark.apache.org/developer-tools.html#github-workflow-benchmarks.
   -->
   TODO
   
   ### Was this patch authored or co-authored using generative AI tooling?
   <!--
   If generative AI tooling has been used in the process of authoring this patch, please include the
   phrase: 'Generated-by: ' followed by the name of the tool and its version.
   If no, write 'No'.
   Please refer to the [ASF Generative Tooling Guidance](https://www.apache.org/legal/generative-tooling.html) for details.
   -->
   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-46920][YARN] Improve executor exit error message on YARN [spark]

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

   Merged into master for Spark 4.0. Thanks @pan3793 @srowen @tgravescs @mridulm 


-- 
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-46920][YARN] Improve executor exit error message on YARN [spark]

Posted by "pan3793 (via GitHub)" <gi...@apache.org>.
pan3793 commented on code in PR #44951:
URL: https://github.com/apache/spark/pull/44951#discussion_r1478096145


##########
core/src/main/scala/org/apache/spark/executor/ExecutorExitCode.scala:
##########
@@ -47,8 +47,8 @@ object ExecutorExitCode {
 
   def explainExitCode(exitCode: Int): String = {
     exitCode match {
-      case UNCAUGHT_EXCEPTION => "Uncaught exception"
-      case UNCAUGHT_EXCEPTION_TWICE => "Uncaught exception, and logging the exception failed"
+      case UNCAUGHT_EXCEPTION => "Uncaught exception."
+      case UNCAUGHT_EXCEPTION_TWICE => "Uncaught exception, and logging the exception failed."

Review Comment:
   Okay, let me revert changes in this function, just keep it as-is.



-- 
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-46920][YARN] Improve executor exit error message on YARN [spark]

Posted by "pan3793 (via GitHub)" <gi...@apache.org>.
pan3793 commented on code in PR #44951:
URL: https://github.com/apache/spark/pull/44951#discussion_r1471331396


##########
core/src/main/scala/org/apache/spark/executor/ExecutorExitCode.scala:
##########
@@ -47,9 +47,9 @@ object ExecutorExitCode {
 
   def explainExitCode(exitCode: Int): String = {
     exitCode match {
-      case UNCAUGHT_EXCEPTION => "Uncaught exception"
-      case UNCAUGHT_EXCEPTION_TWICE => "Uncaught exception, and logging the exception failed"
-      case OOM => "OutOfMemoryError"
+      case UNCAUGHT_EXCEPTION => "Uncaught exception."
+      case UNCAUGHT_EXCEPTION_TWICE => "Uncaught exception, and logging the exception failed."
+      case OOM => "OutOfMemoryError."

Review Comment:
   thanks for review, removed.



-- 
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-46920][YARN] Improve executor exit error message on YARN [spark]

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

   kindly ping @tgravescs and @yaooqinn, would you please 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-46920][YARN] Improve executor exit error message on YARN [spark]

Posted by "srowen (via GitHub)" <gi...@apache.org>.
srowen commented on code in PR #44951:
URL: https://github.com/apache/spark/pull/44951#discussion_r1478093113


##########
core/src/main/scala/org/apache/spark/executor/ExecutorExitCode.scala:
##########
@@ -47,8 +47,8 @@ object ExecutorExitCode {
 
   def explainExitCode(exitCode: Int): String = {
     exitCode match {
-      case UNCAUGHT_EXCEPTION => "Uncaught exception"
-      case UNCAUGHT_EXCEPTION_TWICE => "Uncaught exception, and logging the exception failed"
+      case UNCAUGHT_EXCEPTION => "Uncaught exception."
+      case UNCAUGHT_EXCEPTION_TWICE => "Uncaught exception, and logging the exception failed."

Review Comment:
   I don't think they're needed at all. Separate stuff with spaces. But it doesn't matter



-- 
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-46920][YARN] Improve executor exit error message on YARN [spark]

Posted by "LuciferYang (via GitHub)" <gi...@apache.org>.
LuciferYang closed pull request #44951: [SPARK-46920][YARN] Improve executor exit error message on YARN
URL: https://github.com/apache/spark/pull/44951


-- 
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-46920][YARN] Improve executor exit error message on YARN [spark]

Posted by "srowen (via GitHub)" <gi...@apache.org>.
srowen commented on code in PR #44951:
URL: https://github.com/apache/spark/pull/44951#discussion_r1471325443


##########
core/src/main/scala/org/apache/spark/executor/ExecutorExitCode.scala:
##########
@@ -47,9 +47,9 @@ object ExecutorExitCode {
 
   def explainExitCode(exitCode: Int): String = {
     exitCode match {
-      case UNCAUGHT_EXCEPTION => "Uncaught exception"
-      case UNCAUGHT_EXCEPTION_TWICE => "Uncaught exception, and logging the exception failed"
-      case OOM => "OutOfMemoryError"
+      case UNCAUGHT_EXCEPTION => "Uncaught exception."
+      case UNCAUGHT_EXCEPTION_TWICE => "Uncaught exception, and logging the exception failed."
+      case OOM => "OutOfMemoryError."

Review Comment:
   Total nit but do we need these changes? they're not sentences.
   Otherwise fine.



-- 
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-46920][YARN] Improve executor exit error message on YARN [spark]

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

   ok, changes seem fine to me


-- 
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-46920][YARN] Improve executor exit error message on YARN [spark]

Posted by "pan3793 (via GitHub)" <gi...@apache.org>.
pan3793 commented on code in PR #44951:
URL: https://github.com/apache/spark/pull/44951#discussion_r1478089597


##########
core/src/main/scala/org/apache/spark/executor/ExecutorExitCode.scala:
##########
@@ -47,8 +47,8 @@ object ExecutorExitCode {
 
   def explainExitCode(exitCode: Int): String = {
     exitCode match {
-      case UNCAUGHT_EXCEPTION => "Uncaught exception"
-      case UNCAUGHT_EXCEPTION_TWICE => "Uncaught exception, and logging the exception failed"
+      case UNCAUGHT_EXCEPTION => "Uncaught exception."
+      case UNCAUGHT_EXCEPTION_TWICE => "Uncaught exception, and logging the exception failed."

Review Comment:
   Emm... So you mean we should remove all tailing dots in this function, and do appending on the caller side if necessary?



-- 
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-46920][YARN] Improve executor exit error message on YARN [spark]

Posted by "srowen (via GitHub)" <gi...@apache.org>.
srowen commented on code in PR #44951:
URL: https://github.com/apache/spark/pull/44951#discussion_r1478086125


##########
core/src/main/scala/org/apache/spark/executor/ExecutorExitCode.scala:
##########
@@ -47,8 +47,8 @@ object ExecutorExitCode {
 
   def explainExitCode(exitCode: Int): String = {
     exitCode match {
-      case UNCAUGHT_EXCEPTION => "Uncaught exception"
-      case UNCAUGHT_EXCEPTION_TWICE => "Uncaught exception, and logging the exception failed"
+      case UNCAUGHT_EXCEPTION => "Uncaught exception."
+      case UNCAUGHT_EXCEPTION_TWICE => "Uncaught exception, and logging the exception failed."

Review Comment:
   Still trivial but these are not sentences. Here and below there is no reason to end with a period.



-- 
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-46920][YARN] Improve executor exit error message on YARN [spark]

Posted by "pan3793 (via GitHub)" <gi...@apache.org>.
pan3793 commented on code in PR #44951:
URL: https://github.com/apache/spark/pull/44951#discussion_r1478096145


##########
core/src/main/scala/org/apache/spark/executor/ExecutorExitCode.scala:
##########
@@ -47,8 +47,8 @@ object ExecutorExitCode {
 
   def explainExitCode(exitCode: Int): String = {
     exitCode match {
-      case UNCAUGHT_EXCEPTION => "Uncaught exception"
-      case UNCAUGHT_EXCEPTION_TWICE => "Uncaught exception, and logging the exception failed"
+      case UNCAUGHT_EXCEPTION => "Uncaught exception."
+      case UNCAUGHT_EXCEPTION_TWICE => "Uncaught exception, and logging the exception failed."

Review Comment:
   Okay, let me revert changes in this function, just keeping it as-is.



-- 
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-46920][YARN] Improve executor exit error message on YARN [spark]

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

   @tgravescs Thanks for checking, I replaced the verified result image.
   
   Previous test based on a test Hadoop cluster, which sets `yarn.nodemanager.container-executor.class=org.apache.hadoop.yarn.server.nodemanager.DefaultContainerExecutor`, and our production Hadoop cluster sets `org.apache.hadoop.yarn.server.nodemanager.LinuxContainerExecutor`, thus the diagnostics message is quite different.
   


-- 
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-46920][YARN] Improve executor exit error message on YARN [spark]

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

   kindly ping @tgravescs


-- 
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-46920][YARN] Improve executor exit error message on YARN [spark]

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

   its a little unclear to me exactly what the user changes. The screen shots in the description don't make sense with the code changes made.  From what I can tell you are adding in another field:
   
   `  s"Possible causes: $sparkExitCodeReason " `
   
   which is the  ExecutorExitCode.explainExitCode(exitStatus). This seems fine to me.
   But the screen shots above look like output is quite different with the shell error output, are those screen shots correct for a before and after this change?  can you please explain if I'm missing something or how this is changing a 56 error code from invalid docker to unable to send heartbeat


-- 
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-46920][YARN] Improve executor exit error message on YARN [spark]

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

   cc @yaooqinn @srowen please take a look when you have time.


-- 
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-46920][YARN] Improve executor exit error message on YARN [spark]

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

   +CC @tgravescs 


-- 
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