mesos-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andrei Budnik <>
Subject Review Request 70609: Added missing onDiscard handler in timeout case for `cgroups::destroy`.
Date Wed, 08 May 2019 13:28:38 GMT

This is an automatically generated e-mail. To reply, visit:

Review request for mesos, Gilbert Song, Jie Yu, and Qian Zhang.

Bugs: MESOS-9306

Repository: mesos


Previously, when cgroup destruction took longer than the given timeout,
we called discard on the future. However, only `onAny` callback was
subscribed on this future, so DISCARDED state was not handled.
This patch adds missing `onDiscarded` handler.


  src/linux/cgroups.cpp 73646c9eb39948192acedb67e3d2fb13acb14b30 



1. In order to imitate hanging `cgroups::destroy`, the following code have been added to the
beggining of the `destroy()` function:
Future<Nothing> destroy(const string& hierarchy, const string& cgroup)
  Owned<Promise<Nothing>> promise(new Promise<Nothing>());
  return promise->future()

Observed behaviour _without_ this patch applied:
 Container is stuck in `DESTROING` state, the last message in logs is:
I0508 09:12:29.141111 21426 linux_launcher.cpp:618] Destroying cgroup '/sys/fs/cgroup/freezer/mesos/e2066055-69b4-4272-8b8d-352e308aaaca'

Observed behaviour _with_ this patch applied:
 Container finishes deinitialization after 1 minute timeout:
E0508 09:13:29.143476 21423 slave.cpp:6591] Termination of executor 'a' of framework f7d6437a-beae-45eb-80ab-ef92e839f352-0000
failed: Failed to kill all processes in the container: Timed out after 1mins

2. sudo make check


Andrei Budnik

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