You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@mesos.apache.org by "Benjamin Mahler (JIRA)" <ji...@apache.org> on 2013/03/12 23:45:13 UTC
[jira] [Created] (MESOS-387) Command executor does not issue a
killtree / killpg on the shell command.
Benjamin Mahler created MESOS-387:
-------------------------------------
Summary: Command executor does not issue a killtree / killpg on the shell command.
Key: MESOS-387
URL: https://issues.apache.org/jira/browse/MESOS-387
Project: Mesos
Issue Type: Bug
Reporter: Benjamin Mahler
Assignee: Benjamin Mahler
This manifested from my new Isolator tests that are now testing the Isolators. Using the command executor to kill the task left an orphaned child process, since it only issues a kill to the parent pid.
Relevant code in executor.cpp:
virtual void killTask(ExecutorDriver* driver, const TaskID& taskId)
{
// TODO(benh): Do kill escalation (i.e., after n seconds, kill -9).
if (pid > 0) {
kill(pid, SIGTERM);
}
}
virtual void shutdown(ExecutorDriver* driver)
{
// TODO(benh): Do kill escalation (i.e., after n seconds, kill -9).
if (pid > 0) {
kill(pid, SIGTERM);
}
}
This is non-trivial to fix, since it's unclear with who the responsibility lies for kill escalation. With a shell invocation of:
"top -b -d 0 -n 30000 2>&1 > /dev/null & sleep 60"
The sleep command will be killed immediately and the executor appears to exit, so kill escalation in the slave will not occur AFAICT. Thus, the command executor needs to:
1. Issue killtree() and killpg() calls instead of direct kill() calls.
2. Perform kill escalation (as indicated in the benh TODO above).
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira