You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@dolphinscheduler.apache.org by GitBox <gi...@apache.org> on 2021/04/02 09:04:57 UTC
[GitHub] [incubator-dolphinscheduler] xingchun-chen opened a new issue #5199: [Bug][api] When sleep is included in a shell task, cannot kill the task
xingchun-chen opened a new issue #5199:
URL: https://github.com/apache/incubator-dolphinscheduler/issues/5199


**Which version of Dolphin Scheduler:**
-[1.3.6-prepare]
--
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
[GitHub] [incubator-dolphinscheduler] ruanwenjun edited a comment on issue #5199: [Bug][api] When sleep is included in a shell task, cannot kill the task
Posted by GitBox <gi...@apache.org>.
ruanwenjun edited a comment on issue #5199:
URL: https://github.com/apache/incubator-dolphinscheduler/issues/5199#issuecomment-812814507
I can kill the task, after install the `pstree` on my environment.
And the task can be killed successfully.

But there is still an error, that I don't have permission to kill the parent process, but I can kill the subprocess, so the task is still be killed.
```
-+- 20788 root sudo -u ruanwenjun sh /tmp/dolphinscheduler/exec/process/1/4/73/76/4_73_76.command
\-+- 20789 ruanwenjun sh /tmp/dolphinscheduler/exec/process/1/4/73/76/4_73_76.command
\-+- 20795 ruanwenjun sh /tmp/dolphinscheduler/exec/process/1/4/73/76/4_73_76.command
\--- 20796 ruanwenjun sleep 20
```
```java
org.apache.dolphinscheduler.server.worker.processor.TaskKillProcessor:[131] - process id:20788, cmd:sudo -u ruanwenjun kill -9 20788 20789 20795 20796
org.apache.dolphinscheduler.common.shell.AbstractShell$ExitCodeException: kill: 20788: Operation not permitted
```
--
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
[GitHub] [incubator-dolphinscheduler] CalvinKirs closed issue #5199: [Bug][api] When sleep is included in a shell task, cannot kill the task
Posted by GitBox <gi...@apache.org>.
CalvinKirs closed issue #5199:
URL: https://github.com/apache/incubator-dolphinscheduler/issues/5199
--
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
[GitHub] [incubator-dolphinscheduler] ruanwenjun commented on issue #5199: [Bug][api] When sleep is included in a shell task, cannot kill the task
Posted by GitBox <gi...@apache.org>.
ruanwenjun commented on issue #5199:
URL: https://github.com/apache/incubator-dolphinscheduler/issues/5199#issuecomment-812814507
I also have the problem, but my problem is due to no permission.
When I run a shell task by a specific tenant.
```
[INFO] 2021-04-03 13:17:27.347 - [taskAppId=TASK-4-62-65]:[327] - task run command:
sudo -u ruanwenjun sh /tmp/dolphinscheduler/exec/process/1/4/62/65/4_62_65.command
[INFO] 2021-04-03 13:17:27.348 - [taskAppId=TASK-4-62-65]:[202] - process start, process id is: 7191
```
And I find that the task is running by root.

And when I stop the task, it tells me that I don't have permission.
```java
[INFO] 2021-04-03 13:17:38.941 org.apache.dolphinscheduler.server.worker.processor.TaskKillProcessor:[95] - received kill command : TaskKillRequestCommand{taskInstanceId=65}
[INFO] 2021-04-03 13:17:38.941 org.apache.dolphinscheduler.server.worker.processor.TaskKillProcessor:[131] - process id:7191, cmd:sudo -u ruanwenjun kill -9 7191
[ERROR] 2021-04-03 13:17:38.979 org.apache.dolphinscheduler.server.worker.processor.TaskKillProcessor:[137] - kill task error
org.apache.dolphinscheduler.common.shell.AbstractShell$ExitCodeException: kill: 7191: Operation not permitted
```
So my task can run successful, but can not stop.
--
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