You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "lifulong (Jira)" <ji...@apache.org> on 2023/10/18 10:23:00 UTC

[jira] [Commented] (SPARK-45570) Spark job hangs due to task launch thread failed to create

    [ https://issues.apache.org/jira/browse/SPARK-45570?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17776595#comment-17776595 ] 

lifulong commented on SPARK-45570:
----------------------------------

!image-2023-10-18-18-18-36-132.png!
catch thread create exception from line "threadPool.execute(tr)", and do
execBackend.statusUpdate(taskDescription.taskId, TaskState.FAILED, EMPTY_BYTE_BUFFER)
after get exception can fix this problem in theory
is this solution ok?

> Spark job hangs due to task launch thread failed to create
> ----------------------------------------------------------
>
>                 Key: SPARK-45570
>                 URL: https://issues.apache.org/jira/browse/SPARK-45570
>             Project: Spark
>          Issue Type: Bug
>          Components: Spark Core
>    Affects Versions: 3.1.2, 3.5.0
>         Environment: spark.speculation is use default value false
> spark version 3.1.2
>  
>            Reporter: lifulong
>            Priority: Major
>         Attachments: image-2023-10-18-18-18-36-132.png
>
>
> spark job hangs while web ui show there is one task in running stage keep running for multi hours, while other tasks finished in a few minutes 
> executor will never report task launch failed info to driver
>  
> Below is spark task execute thread launch log:
> 23/10/17 04:45:42 ERROR Inbox: An error happened while processing message in the inbox for Executor
> java.lang.OutOfMemoryError: unable to create new native thread
>         at java.lang.Thread.start0(Native Method)
>         at java.lang.Thread.start(Thread.java:717)
>         at java.util.concurrent.ThreadPoolExecutor.addWorker(ThreadPoolExecutor.java:957)
>         at java.util.concurrent.ThreadPoolExecutor.execute(ThreadPoolExecutor.java:1378)
>         at org.apache.spark.executor.Executor.launchTask(Executor.scala:270)
>         at org.apache.spark.executor.CoarseGrainedExecutorBackend$$anonfun$receive$1.applyOrElse(CoarseGrainedExecutorBackend.scala:173)
>         at org.apache.spark.rpc.netty.Inbox.$anonfun$process$1(Inbox.scala:115)
>         at org.apache.spark.rpc.netty.Inbox.safelyCall(Inbox.scala:213)
>         at org.apache.spark.rpc.netty.Inbox.process(Inbox.scala:100)
>         at org.apache.spark.rpc.netty.MessageLoop.org$apache$spark$rpc$netty$MessageLoop$$receiveLoop(MessageLoop.scala:75)
>         at org.apache.spark.rpc.netty.MessageLoop$$anon$1.run(MessageLoop.scala:41)
>         at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
>         at java.util.concurrent.FutureTask.run(FutureTask.java:266)
>         at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
>         at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
>         at java.lang.Thread.run(Thread.java:748)



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