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/02/24 19:59:05 UTC
[jira] [Created] (MESOS-2398) Destroying PREPARING container in
Mesos containerizer is buggy
Jie Yu created MESOS-2398:
-----------------------------
Summary: Destroying PREPARING container in Mesos containerizer is buggy
Key: MESOS-2398
URL: https://issues.apache.org/jira/browse/MESOS-2398
Project: Mesos
Issue Type: Bug
Affects Versions: 0.22.0
Reporter: Jie Yu
This regression is introduced in
https://reviews.apache.org/r/28141/
{code}
923 void MesosContainerizerProcess::destroy(const ContainerID& containerId)
...
936
937 LOG(INFO) << "Destroying container '" << containerId << "'";
938
939 if (container->state == PREPARING) {
940 // We cannot simply terminate the container if it's preparing
941 // since isolator's prepare doesn't need any cleanup.
942 containerizer::Termination termination;
943 termination.set_killed(true);
944 termination.set_message("Container destroyed while preparing isolators");
945 container->promise.set(termination);
946
947 containers_.erase(containerId);
948
949 return;
950 }
...
{code}
In the PREPARING case, isolator->prepare() might be called already.
Looking at our isolators, looks like we usually create an Info struct when prepare is called and delete the Info struct in cleanup. The shortcut here could cause a leak of this data structure. This is problematic because the port mapping isolator will run out of ephemeral ports because of this.
Also, the comment is not accurate. I don't see any comments in the public header of isolator.hpp saying that prepare does not need any cleanup.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
Re: [jira] [Created] (MESOS-2398) Destroying PREPARING container in
Mesos containerizer is buggy
Posted by Benjamin Mahler <be...@gmail.com>.
Is this regression a blocker for 0.22.0?
On Tue, Feb 24, 2015 at 10:59 AM, Jie Yu (JIRA) <ji...@apache.org> wrote:
> Jie Yu created MESOS-2398:
> -----------------------------
>
> Summary: Destroying PREPARING container in Mesos
> containerizer is buggy
> Key: MESOS-2398
> URL: https://issues.apache.org/jira/browse/MESOS-2398
> Project: Mesos
> Issue Type: Bug
> Affects Versions: 0.22.0
> Reporter: Jie Yu
>
>
> This regression is introduced in
> https://reviews.apache.org/r/28141/
> {code}
> 923 void MesosContainerizerProcess::destroy(const ContainerID& containerId)
> ...
> 936
> 937 LOG(INFO) << "Destroying container '" << containerId << "'";
> 938
> 939 if (container->state == PREPARING) {
> 940 // We cannot simply terminate the container if it's preparing
> 941 // since isolator's prepare doesn't need any cleanup.
> 942 containerizer::Termination termination;
> 943 termination.set_killed(true);
> 944 termination.set_message("Container destroyed while preparing
> isolators");
> 945 container->promise.set(termination);
> 946
> 947 containers_.erase(containerId);
> 948
> 949 return;
> 950 }
> ...
> {code}
>
> In the PREPARING case, isolator->prepare() might be called already.
>
> Looking at our isolators, looks like we usually create an Info struct when
> prepare is called and delete the Info struct in cleanup. The shortcut here
> could cause a leak of this data structure. This is problematic because the
> port mapping isolator will run out of ephemeral ports because of this.
>
> Also, the comment is not accurate. I don't see any comments in the public
> header of isolator.hpp saying that prepare does not need any cleanup.
>
>
>
> --
> This message was sent by Atlassian JIRA
> (v6.3.4#6332)
>