You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2020/09/17 15:33:07 UTC

[GitHub] [spark] Ngone51 opened a new pull request #29789: [SPARK-32898][CORE] Fix wrong executorRunTime when task killed before real start

Ngone51 opened a new pull request #29789:
URL: https://github.com/apache/spark/pull/29789


   <!--
   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'.
   -->
   
   ### 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.
   -->
   
   Only calculate the executorRunTime when taskStartTimeNs > 0. Otherwise, set executorRunTime to 0.
   
   ### 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.
   -->
   
   bug fix.
   
   It's possible that a task be killed (e.g., by another successful attempt) before it reaches "taskStartTimeNs = System.nanoTime()". In this case, taskStartTimeNs is still 0 since it hasn't been really initialized. And we will get the wrong executorRunTime by calculating System.nanoTime() - taskStartTimeNs.
   
   
   ### 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, users will see the correct executorRunTime.
   
   ### 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.
   -->
   
   I'm still trying to find a way to reproduce the issue but seems hard.
   


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

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


[GitHub] [spark] AmplabJenkins removed a comment on pull request #29789: [SPARK-32898][CORE] Fix wrong executorRunTime when task killed before real start

Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on pull request #29789:
URL: https://github.com/apache/spark/pull/29789#issuecomment-694620254






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

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


[GitHub] [spark] SparkQA commented on pull request #29789: [SPARK-32898][CORE] Fix wrong executorRunTime when task killed before real start

Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #29789:
URL: https://github.com/apache/spark/pull/29789#issuecomment-694619794


   **[Test build #128846 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/128846/testReport)** for PR 29789 at commit [`91623a7`](https://github.com/apache/spark/commit/91623a750755704af7575df577d2e32851e81954).


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

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


[GitHub] [spark] AmplabJenkins commented on pull request #29789: [SPARK-32898][CORE] Fix wrong executorRunTime when task killed before real start

Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on pull request #29789:
URL: https://github.com/apache/spark/pull/29789#issuecomment-694690436






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

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


[GitHub] [spark] dongjoon-hyun commented on pull request #29789: [SPARK-32898][CORE] Fix wrong executorRunTime when task killed before real start

Posted by GitBox <gi...@apache.org>.
dongjoon-hyun commented on pull request #29789:
URL: https://github.com/apache/spark/pull/29789#issuecomment-695086068


   Merged to master/3.0. 
   
   @Ngone51 . Could you make a backport to `branch-2.4`, please?


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

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


[GitHub] [spark] AmplabJenkins commented on pull request #29789: [SPARK-32898][CORE] Fix wrong executorRunTime when task killed before real start

Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on pull request #29789:
URL: https://github.com/apache/spark/pull/29789#issuecomment-694316327






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

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


[GitHub] [spark] AmplabJenkins removed a comment on pull request #29789: [SPARK-32898][CORE] Fix wrong executorRunTime when task killed before real start

Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on pull request #29789:
URL: https://github.com/apache/spark/pull/29789#issuecomment-694447095


   Test FAILed.
   Refer to this link for build results (access rights to CI server needed): 
   https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/128832/
   Test FAILed.


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

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


[GitHub] [spark] AmplabJenkins commented on pull request #29789: [SPARK-32898][CORE] Fix wrong executorRunTime when task killed before real start

Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on pull request #29789:
URL: https://github.com/apache/spark/pull/29789#issuecomment-694630959






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

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


[GitHub] [spark] SparkQA removed a comment on pull request #29789: [SPARK-32898][CORE] Fix wrong executorRunTime when task killed before real start

Posted by GitBox <gi...@apache.org>.
SparkQA removed a comment on pull request #29789:
URL: https://github.com/apache/spark/pull/29789#issuecomment-694319966


   **[Test build #128832 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/128832/testReport)** for PR 29789 at commit [`91623a7`](https://github.com/apache/spark/commit/91623a750755704af7575df577d2e32851e81954).


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

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


[GitHub] [spark] AmplabJenkins removed a comment on pull request #29789: [SPARK-32898][CORE] Fix wrong executorRunTime when task killed before real start

Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on pull request #29789:
URL: https://github.com/apache/spark/pull/29789#issuecomment-694630959






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

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


[GitHub] [spark] SparkQA commented on pull request #29789: [SPARK-32898][CORE] Fix wrong executorRunTime when task killed before real start

Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #29789:
URL: https://github.com/apache/spark/pull/29789#issuecomment-694444008


   **[Test build #128832 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/128832/testReport)** for PR 29789 at commit [`91623a7`](https://github.com/apache/spark/commit/91623a750755704af7575df577d2e32851e81954).
    * This patch **fails PySpark unit tests**.
    * This patch merges cleanly.
    * This patch adds no public classes.


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

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


[GitHub] [spark] dongjoon-hyun commented on a change in pull request #29789: [SPARK-32898][CORE] Fix wrong executorRunTime when task killed before real start

Posted by GitBox <gi...@apache.org>.
dongjoon-hyun commented on a change in pull request #29789:
URL: https://github.com/apache/spark/pull/29789#discussion_r490677550



##########
File path: core/src/main/scala/org/apache/spark/executor/Executor.scala
##########
@@ -400,7 +400,10 @@ private[spark] class Executor(
       // Report executor runtime and JVM gc time
       Option(task).foreach(t => {
         t.metrics.setExecutorRunTime(TimeUnit.NANOSECONDS.toMillis(
-          System.nanoTime() - taskStartTimeNs))
+          // SPARK-32898: it's possible that a task be killed before it reaches
+          // "taskStartTimeNs = System.nanoTime()". In this case, the executorRunTime

Review comment:
       `before it reaches "taskStartTimeNs = System.nanoTime()"` might be a little misleading because this looks like equality. If we want to pointing [line 470](https://github.com/apache/spark/blob/master/core/src/main/scala/org/apache/spark/executor/Executor.scala#L470), can we use a different wording? For example, something like, `it's possible that a task is killed when taskStartTimeNs has the initial value(=0) still`.




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

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


[GitHub] [spark] SparkQA commented on pull request #29789: [SPARK-32898][CORE] Fix wrong executorRunTime when task killed before real start

Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #29789:
URL: https://github.com/apache/spark/pull/29789#issuecomment-694319966


   **[Test build #128832 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/128832/testReport)** for PR 29789 at commit [`91623a7`](https://github.com/apache/spark/commit/91623a750755704af7575df577d2e32851e81954).


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

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


[GitHub] [spark] Ngone51 commented on pull request #29789: [SPARK-32898][CORE] Fix wrong executorRunTime when task killed before real start

Posted by GitBox <gi...@apache.org>.
Ngone51 commented on pull request #29789:
URL: https://github.com/apache/spark/pull/29789#issuecomment-696520839


   Thanks! Sure, I'll backport it @dongjoon-hyun 


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

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


[GitHub] [spark] SparkQA commented on pull request #29789: [SPARK-32898][CORE] Fix wrong executorRunTime when task killed before real start

Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #29789:
URL: https://github.com/apache/spark/pull/29789#issuecomment-694696471


   **[Test build #128849 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/128849/testReport)** for PR 29789 at commit [`d1ef396`](https://github.com/apache/spark/commit/d1ef396289d7a952843a5ae5f246a1bee60ac056).
    * This patch **fails due to an unknown error code, -9**.
    * This patch merges cleanly.
    * This patch adds no public classes.


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

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


[GitHub] [spark] Ngone51 commented on pull request #29789: [SPARK-32898][CORE] Fix wrong executorRunTime when task killed before real start

Posted by GitBox <gi...@apache.org>.
Ngone51 commented on pull request #29789:
URL: https://github.com/apache/spark/pull/29789#issuecomment-694315885


   @tgravescs @linhongliu-db Please take a look, thanks!


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

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


[GitHub] [spark] SparkQA removed a comment on pull request #29789: [SPARK-32898][CORE] Fix wrong executorRunTime when task killed before real start

Posted by GitBox <gi...@apache.org>.
SparkQA removed a comment on pull request #29789:
URL: https://github.com/apache/spark/pull/29789#issuecomment-694630611


   **[Test build #128849 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/128849/testReport)** for PR 29789 at commit [`d1ef396`](https://github.com/apache/spark/commit/d1ef396289d7a952843a5ae5f246a1bee60ac056).


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

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


[GitHub] [spark] Ngone51 commented on a change in pull request #29789: [SPARK-32898][CORE] Fix wrong executorRunTime when task killed before real start

Posted by GitBox <gi...@apache.org>.
Ngone51 commented on a change in pull request #29789:
URL: https://github.com/apache/spark/pull/29789#discussion_r490682482



##########
File path: core/src/main/scala/org/apache/spark/executor/Executor.scala
##########
@@ -400,7 +400,10 @@ private[spark] class Executor(
       // Report executor runtime and JVM gc time
       Option(task).foreach(t => {
         t.metrics.setExecutorRunTime(TimeUnit.NANOSECONDS.toMillis(
-          System.nanoTime() - taskStartTimeNs))
+          // SPARK-32898: it's possible that a task be killed before it reaches
+          // "taskStartTimeNs = System.nanoTime()". In this case, the executorRunTime

Review comment:
       Thanks, addressed.




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

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


[GitHub] [spark] AmplabJenkins removed a comment on pull request #29789: [SPARK-32898][CORE] Fix wrong executorRunTime when task killed before real start

Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on pull request #29789:
URL: https://github.com/apache/spark/pull/29789#issuecomment-694316327






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

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


[GitHub] [spark] SparkQA removed a comment on pull request #29789: [SPARK-32898][CORE] Fix wrong executorRunTime when task killed before real start

Posted by GitBox <gi...@apache.org>.
SparkQA removed a comment on pull request #29789:
URL: https://github.com/apache/spark/pull/29789#issuecomment-694619794


   **[Test build #128846 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/128846/testReport)** for PR 29789 at commit [`91623a7`](https://github.com/apache/spark/commit/91623a750755704af7575df577d2e32851e81954).


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

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


[GitHub] [spark] AmplabJenkins removed a comment on pull request #29789: [SPARK-32898][CORE] Fix wrong executorRunTime when task killed before real start

Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on pull request #29789:
URL: https://github.com/apache/spark/pull/29789#issuecomment-694690436






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

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


[GitHub] [spark] HyukjinKwon commented on pull request #29789: [SPARK-32898][CORE] Fix wrong executorRunTime when task killed before real start

Posted by GitBox <gi...@apache.org>.
HyukjinKwon commented on pull request #29789:
URL: https://github.com/apache/spark/pull/29789#issuecomment-694618522


   retest this please


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

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


[GitHub] [spark] AmplabJenkins removed a comment on pull request #29789: [SPARK-32898][CORE] Fix wrong executorRunTime when task killed before real start

Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on pull request #29789:
URL: https://github.com/apache/spark/pull/29789#issuecomment-694697686


   Merged build finished. Test FAILed.


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

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


[GitHub] [spark] AmplabJenkins commented on pull request #29789: [SPARK-32898][CORE] Fix wrong executorRunTime when task killed before real start

Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on pull request #29789:
URL: https://github.com/apache/spark/pull/29789#issuecomment-694620254






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

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


[GitHub] [spark] AmplabJenkins commented on pull request #29789: [SPARK-32898][CORE] Fix wrong executorRunTime when task killed before real start

Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on pull request #29789:
URL: https://github.com/apache/spark/pull/29789#issuecomment-694447089






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

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


[GitHub] [spark] SparkQA commented on pull request #29789: [SPARK-32898][CORE] Fix wrong executorRunTime when task killed before real start

Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #29789:
URL: https://github.com/apache/spark/pull/29789#issuecomment-694630611


   **[Test build #128849 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/128849/testReport)** for PR 29789 at commit [`d1ef396`](https://github.com/apache/spark/commit/d1ef396289d7a952843a5ae5f246a1bee60ac056).


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

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


[GitHub] [spark] Ngone51 commented on pull request #29789: [SPARK-32898][CORE] Fix wrong executorRunTime when task killed before real start

Posted by GitBox <gi...@apache.org>.
Ngone51 commented on pull request #29789:
URL: https://github.com/apache/spark/pull/29789#issuecomment-696520839


   Thanks! Sure, I'll backport it @dongjoon-hyun 


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

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


[GitHub] [spark] dongjoon-hyun commented on a change in pull request #29789: [SPARK-32898][CORE] Fix wrong executorRunTime when task killed before real start

Posted by GitBox <gi...@apache.org>.
dongjoon-hyun commented on a change in pull request #29789:
URL: https://github.com/apache/spark/pull/29789#discussion_r490677550



##########
File path: core/src/main/scala/org/apache/spark/executor/Executor.scala
##########
@@ -400,7 +400,10 @@ private[spark] class Executor(
       // Report executor runtime and JVM gc time
       Option(task).foreach(t => {
         t.metrics.setExecutorRunTime(TimeUnit.NANOSECONDS.toMillis(
-          System.nanoTime() - taskStartTimeNs))
+          // SPARK-32898: it's possible that a task be killed before it reaches
+          // "taskStartTimeNs = System.nanoTime()". In this case, the executorRunTime

Review comment:
       `before it reaches "taskStartTimeNs = System.nanoTime()"` might be a little misleading because this looks like equality. If we want to pointing [line 473](https://github.com/apache/spark/pull/29789/files#diff-5a0de266c82b95adb47d9bca714e1f1bR473), can we use a different wording?




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

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


[GitHub] [spark] AmplabJenkins removed a comment on pull request #29789: [SPARK-32898][CORE] Fix wrong executorRunTime when task killed before real start

Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on pull request #29789:
URL: https://github.com/apache/spark/pull/29789#issuecomment-694447089


   Merged build finished. Test FAILed.


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

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


[GitHub] [spark] dongjoon-hyun commented on a change in pull request #29789: [SPARK-32898][CORE] Fix wrong executorRunTime when task killed before real start

Posted by GitBox <gi...@apache.org>.
dongjoon-hyun commented on a change in pull request #29789:
URL: https://github.com/apache/spark/pull/29789#discussion_r490677550



##########
File path: core/src/main/scala/org/apache/spark/executor/Executor.scala
##########
@@ -400,7 +400,10 @@ private[spark] class Executor(
       // Report executor runtime and JVM gc time
       Option(task).foreach(t => {
         t.metrics.setExecutorRunTime(TimeUnit.NANOSECONDS.toMillis(
-          System.nanoTime() - taskStartTimeNs))
+          // SPARK-32898: it's possible that a task be killed before it reaches
+          // "taskStartTimeNs = System.nanoTime()". In this case, the executorRunTime

Review comment:
       `before it reaches "taskStartTimeNs = System.nanoTime()"` might be a little misleading because this looks like equality. If we want to pointing [line 470](https://github.com/apache/spark/blob/master/core/src/main/scala/org/apache/spark/executor/Executor.scala#L470), can we use a different wording?




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

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


[GitHub] [spark] dongjoon-hyun closed pull request #29789: [SPARK-32898][CORE] Fix wrong executorRunTime when task killed before real start

Posted by GitBox <gi...@apache.org>.
dongjoon-hyun closed pull request #29789:
URL: https://github.com/apache/spark/pull/29789


   


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

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


[GitHub] [spark] AmplabJenkins commented on pull request #29789: [SPARK-32898][CORE] Fix wrong executorRunTime when task killed before real start

Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on pull request #29789:
URL: https://github.com/apache/spark/pull/29789#issuecomment-694697686






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

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


[GitHub] [spark] SparkQA commented on pull request #29789: [SPARK-32898][CORE] Fix wrong executorRunTime when task killed before real start

Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #29789:
URL: https://github.com/apache/spark/pull/29789#issuecomment-694688035


   **[Test build #128846 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/128846/testReport)** for PR 29789 at commit [`91623a7`](https://github.com/apache/spark/commit/91623a750755704af7575df577d2e32851e81954).
    * This patch passes all tests.
    * This patch merges cleanly.
    * This patch adds no public classes.


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

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


[GitHub] [spark] AmplabJenkins removed a comment on pull request #29789: [SPARK-32898][CORE] Fix wrong executorRunTime when task killed before real start

Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on pull request #29789:
URL: https://github.com/apache/spark/pull/29789#issuecomment-694697697


   Test FAILed.
   Refer to this link for build results (access rights to CI server needed): 
   https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/128849/
   Test FAILed.


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

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