You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "wuyi (Jira)" <ji...@apache.org> on 2025/12/29 07:53:00 UTC

[jira] [Created] (SPARK-54861) Unset task thread name when the task completes

wuyi created SPARK-54861:
----------------------------

             Summary: Unset task thread name when the task completes
                 Key: SPARK-54861
                 URL: https://issues.apache.org/jira/browse/SPARK-54861
             Project: Spark
          Issue Type: Task
          Components: Spark Core
    Affects Versions: 3.5.7, 4.0.1, 4.1.0
            Reporter: wuyi


Currently, when a task completes, the [task thread name|https://github.com/apache/spark/blob/master/core/src/main/scala/org/apache/spark/executor/Executor.scala#L642] remains unchanged until a new task launched overrides the original name. And this can be misleading when we look into the task stacktrace for the completed task as the task thread is actually idle for the new task rather than running for some active task.
{code:java}
Executor task launch worker for task 0.0 in stage 0.0 (TID 0)" #64 TIMED_WAITING
java.base@17.0.14/jdk.internal.misc.Unsafe.park(Native Method)
	-  waiting on java.util.concurrent.SynchronousQueue$TransferStack@4958b5c2
java.base@17.0.14/java.util.concurrent.locks.LockSupport.parkNanos(LockSupport.java:252)
java.base@17.0.14/java.util.concurrent.SynchronousQueue$TransferStack.transfer(SynchronousQueue.java:401)
java.base@17.0.14/java.util.concurrent.SynchronousQueue.poll(SynchronousQueue.java:903)
java.base@17.0.14/java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1061)
java.base@17.0.14/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1122)
java.base@17.0.14/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
java.base@17.0.14/java.lang.Thread.run(Thread.java:840) {code}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@spark.apache.org
For additional commands, e-mail: issues-help@spark.apache.org