From 0fc847b6d1b86819de099657bcd480a901758590 Mon Sep 17 00:00:00 2001 From: Alexander Morozov Date: Tue, 10 Mar 2015 13:45:13 -0700 Subject: [PATCH] Check oom status after container stopped in lxc driver Signed-off-by: Alexander Morozov Upstream-commit: d59212e6056da0ae4434882c3048f9b8c0c27518 Component: engine --- components/engine/daemon/execdriver/lxc/driver.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/components/engine/daemon/execdriver/lxc/driver.go b/components/engine/daemon/execdriver/lxc/driver.go index 54da7160a8..9b4834b976 100644 --- a/components/engine/daemon/execdriver/lxc/driver.go +++ b/components/engine/daemon/execdriver/lxc/driver.go @@ -256,16 +256,16 @@ func (d *driver) Run(c *execdriver.Command, pipes *execdriver.Pipes, startCallba oomKill := false oomKillNotification, err := notifyOnOOM(cgroupPaths) + + <-waitLock + if err == nil { _, oomKill = <-oomKillNotification log.Debugf("oomKill error %s waitErr %s", oomKill, waitErr) - } else { log.Warnf("WARNING: Your kernel does not support OOM notifications: %s", err) } - <-waitLock - // check oom error exitCode := getExitCode(c) if oomKill {