Check oom status after container stopped in lxc driver
| ... | ... |
@@ -256,16 +256,16 @@ func (d *driver) Run(c *execdriver.Command, pipes *execdriver.Pipes, startCallba |
| 256 | 256 |
|
| 257 | 257 |
oomKill := false |
| 258 | 258 |
oomKillNotification, err := notifyOnOOM(cgroupPaths) |
| 259 |
+ |
|
| 260 |
+ <-waitLock |
|
| 261 |
+ |
|
| 259 | 262 |
if err == nil {
|
| 260 | 263 |
_, oomKill = <-oomKillNotification |
| 261 | 264 |
log.Debugf("oomKill error %s waitErr %s", oomKill, waitErr)
|
| 262 |
- |
|
| 263 | 265 |
} else {
|
| 264 | 266 |
log.Warnf("Your kernel does not support OOM notifications: %s", err)
|
| 265 | 267 |
} |
| 266 | 268 |
|
| 267 |
- <-waitLock |
|
| 268 |
- |
|
| 269 | 269 |
// check oom error |
| 270 | 270 |
exitCode := getExitCode(c) |
| 271 | 271 |
if oomKill {
|