Updated Branches:
  refs/heads/master 91d233218 -> 063376d3a

Fixed a race condition in the Cgroups Isolator.


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

Branch: refs/heads/master
Commit: 063376d3abb3e37e4a1e12fe8290049c4d1ac35b
Parents: 91d2332
Author: Benjamin Mahler <bmah...@twitter.com>
Authored: Tue Nov 5 12:48:53 2013 -0800
Committer: Benjamin Mahler <bmah...@twitter.com>
Committed: Tue Nov 5 12:58:20 2013 -0800

----------------------------------------------------------------------
 src/slave/cgroups_isolator.cpp | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mesos/blob/063376d3/src/slave/cgroups_isolator.cpp
----------------------------------------------------------------------
diff --git a/src/slave/cgroups_isolator.cpp b/src/slave/cgroups_isolator.cpp
index 591d286..a1cf26e 100644
--- a/src/slave/cgroups_isolator.cpp
+++ b/src/slave/cgroups_isolator.cpp
@@ -1203,9 +1203,12 @@ void CgroupsIsolator::oom(
     return;
   }
 
-  // If killed is set, the OOM notifier will be discarded in oomWaited.
-  // Therefore, we should not be able to reach this point.
-  CHECK(!info->killed) << "OOM detected for an already killed executor";
+  // It's possible for an executor to OOM right as it was being
+  // killed, ignore this case.
+  if (info->killed) {
+    LOG(INFO) << "OOM detected for an already killed executor";
+    return;
+  }
 
   LOG(INFO) << "OOM detected for executor " << executorId
             << " of framework " << frameworkId

Reply via email to