Skip to content

Commit 5589d40

Browse files
committed
do not attempt to kill a process which never started
it's difficult to trigger such an error, but if taskCmd.Start() actually fails, it never sets taskCmd.Process, so trying to use the PID there is a nil access and causes executor to crash.
1 parent 232fc21 commit 5589d40

1 file changed

Lines changed: 0 additions & 2 deletions

File tree

executor/executable/controllabletask.go

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -147,8 +147,6 @@ func (t *ControllableTask) doLaunchTask(taskCmd *exec.Cmd, launchStartTime time.
147147
Error("failed to run task")
148148

149149
t.sendStatus(t.knownEnvironmentId, mesos.TASK_FAILED, err.Error())
150-
// fixme: i confirmed on staging, that's a nil access! taskCmd.Process is not set if Start() fails
151-
_ = t.doTermIntKill(-taskCmd.Process.Pid)
152150
// fixme: shouldn't we also close pipes, as we do in some other error cases later?
153151
return
154152
}

0 commit comments

Comments
 (0)