You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@mesos.apache.org by "Jie Yu (JIRA)" <ji...@apache.org> on 2015/03/20 01:57:38 UTC
[jira] [Commented] (MESOS-2367) Improve slave resiliency in the
face of orphan containers
[ https://issues.apache.org/jira/browse/MESOS-2367?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14370472#comment-14370472 ]
Jie Yu commented on MESOS-2367:
-------------------------------
This is not a trivial task. See my comments below:
This is the code in recover() in linux launcher:
{code}
177 foreach (const string& orphan, orphans.get()) {
178 if (!cgroups.contains(orphan)) {
179 LOG(INFO) << "Removing orphaned cgroup"
180 << " '" << path::join("freezer", orphan) << "'";
181 // We must wait for all cgroups to be destroyed; isolators
182 // assume all processes have been terminated for any orphaned
183 // containers before Isolator::recover() is called.
184 futures.push_back(
185 cgroups::destroy(hierarchy, orphan, cgroups::DESTROY_TIMEOUT));
186 }
187 }
{code}
So this is the contact between launcher and isolator. If we every want to change that contract (which I believe we can), we need to carefully check the impl. of each isolator and make sure they don't remove orphan containers if launcher hasn't killed them yet.
> Improve slave resiliency in the face of orphan containers
> ----------------------------------------------------------
>
> Key: MESOS-2367
> URL: https://issues.apache.org/jira/browse/MESOS-2367
> Project: Mesos
> Issue Type: Bug
> Components: slave
> Reporter: Joe Smith
> Priority: Critical
>
> Right now there's a case where a misbehaving executor can cause a slave process to flap:
> {panel:title=Quote From [~jieyu]}
> {quote}
> 1) User tries to kill an instance
> 2) Slave sends {{KillTaskMessage}} to executor
> 3) Executor sends kill signals to task processes
> 4) Executor sends {{TASK_KILLED}} to slave
> 5) Slave updates container cpu limit to be 0.01 cpus
> 6) A user-process is still processing the kill signal
> 7) the task process cannot exit since it has too little cpu share and is throttled
> 8) Executor itself terminates
> 9) Slave tries to destroy the container, but cannot because the user-process is stuck in the exit path.
> 10) Slave restarts, and is constantly flapping because it cannot kill orphan containers
> {quote}
> {panel}
> The slave's orphan container handling should be improved to deal with this case despite ill-behaved users (framework writers).
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)