> On Jan. 3, 2014, 10:09 p.m., Jie Yu wrote: > > src/linux/cgroups.cpp, line 1776 > > <https://reviews.apache.org/r/16625/diff/1/?file=414975#file414975line1776> > > > > The while loop here could potentially block a worker thread. In worst > > case, say there is a kernel bug, the thread could be blocked forever. > > > > Given that cgroups::cleanup returns a Future, the caller would expect > > its semantics to be non-blocking. Maybe we should make it non-blocking? > > Maybe a process that waits for a subsystem to be ready (detached)? > > Jiang Yan Xu wrote: > In general I think this is the right thing to do but in this case I found > cleanup() is only used by test (SetUp/TearDown)s which call > AWAIT_READY(cgroups::cleanup(...)) to make sure it doesn't take forever to > clean up. Thus it's probably OK here since AWAIT_READY will kill the process > anyway if it's blocking for too long.
In that case, what about do the busy wait in test? - Jie ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/16625/#review31171 ----------------------------------------------------------- On Jan. 3, 2014, 9:51 p.m., Jiang Yan Xu wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/16625/ > ----------------------------------------------------------- > > (Updated Jan. 3, 2014, 9:51 p.m.) > > > Review request for mesos, Benjamin Hindman, Ben Mahler, and Vinod Kone. > > > Bugs: MESOS-891 > https://issues.apache.org/jira/browse/MESOS-891 > > > Repository: mesos-git > > > Description > ------- > > - Otherwise the subsystems could still be attached when cleanup() exits and > subsequent mount can fail. > > > Diffs > ----- > > src/linux/cgroups.cpp 19ab1f348191ab0315271477b206aa8c6456fd5a > > Diff: https://reviews.apache.org/r/16625/diff/ > > > Testing > ------- > > make check > ./bin/mesos-tests.sh -j --gtest_filter=SlaveRecoveryTest/1.SchedulerFailover > --gtest_repeat=100 > > > Thanks, > > Jiang Yan Xu > >
