You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mesos.apache.org by bm...@apache.org on 2013/06/21 01:41:33 UTC

git commit: Fixed the Freezer to ignore proceses that go away while in the FREEZING state.

Updated Branches:
  refs/heads/master b3cb1f31e -> 464192eee


Fixed the Freezer to ignore proceses that go away while in the
FREEZING state.

Review: https://reviews.apache.org/r/12019


Project: http://git-wip-us.apache.org/repos/asf/incubator-mesos/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-mesos/commit/464192ee
Tree: http://git-wip-us.apache.org/repos/asf/incubator-mesos/tree/464192ee
Diff: http://git-wip-us.apache.org/repos/asf/incubator-mesos/diff/464192ee

Branch: refs/heads/master
Commit: 464192eee6ea77932a05f8bf04166aa3023fb15e
Parents: b3cb1f3
Author: Benjamin Mahler <bm...@twitter.com>
Authored: Thu Jun 20 16:03:40 2013 -0700
Committer: Benjamin Mahler <bm...@twitter.com>
Committed: Thu Jun 20 16:41:19 2013 -0700

----------------------------------------------------------------------
 src/linux/cgroups.cpp | 13 +++++++------
 1 file changed, 7 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-mesos/blob/464192ee/src/linux/cgroups.cpp
----------------------------------------------------------------------
diff --git a/src/linux/cgroups.cpp b/src/linux/cgroups.cpp
index 8d94fe6..5d63bde 100644
--- a/src/linux/cgroups.cpp
+++ b/src/linux/cgroups.cpp
@@ -1246,15 +1246,16 @@ private:
         return;
       }
 
-      // We don't need to worry about the race condition here as it is not
-      // possible to add new processes into this cgroup or remove processes from
-      // this cgroup when freezer.state is in FREEZING state.
+      // It appears possible for processes to go away while the cgroup
+      // is in the FREEZING state. We ignore such processes.
+      // See: https://issues.apache.org/jira/browse/MESOS-461
       foreach (pid_t pid, pids.get()) {
         Try<proc::ProcessStatus> status = proc::status(pid);
+
         if (status.isError()) {
-          promise.fail("Failed to get process statistics: " + status.error());
-          terminate(self());
-          return;
+          LOG(WARNING) << "Failed to get process status for pid " << pid
+                       << ": " << status.error();
+          continue;
         }
 
         // Check whether the process is in stopped/traced state.