You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@dolphinscheduler.apache.org by "rickchengx (via GitHub)" <gi...@apache.org> on 2023/07/12 02:20:46 UTC

[GitHub] [dolphinscheduler] rickchengx commented on a diff in pull request #14504: [Fix-14503][Worker] Fix the problem of subprocess cannot be killed

rickchengx commented on code in PR #14504:
URL: https://github.com/apache/dolphinscheduler/pull/14504#discussion_r1260482673


##########
dolphinscheduler-worker/src/main/java/org/apache/dolphinscheduler/server/worker/processor/WorkerTaskKillProcessor.java:
##########
@@ -98,6 +96,7 @@ public void process(Channel channel, Message message) {
             }
 
             boolean result = doKill(taskExecutionContext);
+            this.cancelApplication(taskInstanceId);

Review Comment:
   Do u mean that all the system process (include subprocess) and the remote process (like yarn) should be killed in `cancelApplication` in each task plugin ?
   * but the `process.destroy()` cannot kill the subprocess. like `sleep 300` in the shell task. the `sleep 300`
    is still running after we stop the workflow instance.
   <img width="438" alt="截屏2023-07-11 14 31 07" src="https://github.com/apache/dolphinscheduler/assets/38122586/5462dd75-4686-4f11-b075-953330e1594a">
   
   * And also the remote process now is killed in `doKill()`, not in each task plugin.
   



##########
dolphinscheduler-worker/src/main/java/org/apache/dolphinscheduler/server/worker/processor/WorkerTaskKillProcessor.java:
##########
@@ -98,6 +96,7 @@ public void process(Channel channel, Message message) {
             }
 
             boolean result = doKill(taskExecutionContext);
+            this.cancelApplication(taskInstanceId);

Review Comment:
   Do u mean that all the system process (include subprocess) and the remote process (like yarn) should be killed in `cancelApplication` in each task plugin ?
   * but the `process.destroy()` cannot kill the subprocess. like `sleep 300` in the shell task. the `sleep 300`
    is still running after we stop the workflow instance.
   <img width="438" alt="截屏2023-07-11 14 31 07" src="https://github.com/apache/dolphinscheduler/assets/38122586/5462dd75-4686-4f11-b075-953330e1594a">
   
   * And also the remote process now is killed in `doKill()`, not in each task plugin.
   



-- 
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: commits-unsubscribe@dolphinscheduler.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org