mesos-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jiang Yan Xu <...@jxu.me>
Subject Re: Review Request 56730: Kill stray tasks when tearing down test cgroups.
Date Wed, 08 Mar 2017 00:38:54 GMT


> On March 2, 2017, 4:40 p.m., Jiang Yan Xu wrote:
> > Did you run into issues without this patch? cgroups::destroy() *should* kill all
tasks in it.
> 
> James Peach wrote:
>     On my reading of `cgroups::destroy`, processes would only be killed when destroying
the `freezer` cgroup, since that is the only one with the `freezer.state` control that would
trigger the `internal::Destroyer` to run.
>     
>     The linked bug [MESO-7049](https://issues.apache.org/jira/browse/MESOS-7049) shows
test output where the cgroup teardown fails.
> 
> Jiang Yan Xu wrote:
>     Your are right. But `cgroups::kill` is asynchronous and we are not waiting on it.
It seems we should improve `cgroups::destroy` to optionally not require the freezer for this
to be reliable?

Discussed with @jpeach, seems like `cgroups::remove()` should succeed after `cgroups::kill`
returns sccessfully in normal cases (at least in the tests) because zombie processes don't
prevent removal of cgroups nor do they show up in `cgroup.procs`: http://man7.org/training/download/cgroups_slides.pdf

This should therefore be sufficient for test teardown. Adding such an option to general `cgroups::destroy`
would be overkill.

We could improve documentation to make this more clear.


- Jiang Yan


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/56730/#review167773
-----------------------------------------------------------


On March 7, 2017, 2:27 p.m., James Peach wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/56730/
> -----------------------------------------------------------
> 
> (Updated March 7, 2017, 2:27 p.m.)
> 
> 
> Review request for mesos, haosdent huang, Jie Yu, and Jiang Yan Xu.
> 
> 
> Bugs: MESOS-7049
>     https://issues.apache.org/jira/browse/MESOS-7049
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> If a test case fails, it may leave stray tasks in the cgroup which keeps
> us from tearing it down when the test completes. Kill any stray tasks
> before destroying the cgroup.
> 
> 
> Diffs
> -----
> 
>   src/tests/containerizer/cgroups_tests.cpp 76fabce4530ccc0a1d685cd48d932ced5a64bc58

>   src/tests/mesos.cpp 6a96fa51dfc2a62063c3154b256bdac707b009bb 
> 
> 
> Diff: https://reviews.apache.org/r/56730/diff/1/
> 
> 
> Testing
> -------
> 
> sudo make check (Fedora 25)
> 
> 
> Thanks,
> 
> James Peach
> 
>


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message