[Devel] Re: Cgroup OOM bug

Daisuke Nishimura nishimura at mxp.nes.nec.co.jp
Sun May 9 17:43:05 PDT 2010


On Mon, 10 May 2010 09:01:31 +0900, KAMEZAWA Hiroyuki <kamezawa.hiroyu at jp.fujitsu.com> wrote:
> On Fri, 7 May 2010 14:30:21 -0700
> Jeremy Hanmer <jeremy at hq.newdream.net> wrote:
> 
> > I've found a reproducible case where you can create an infinite loop inside the oom killer if you create a cgroup with a single process that has oom_adj=-17 and trigger an OOM situation inside that cgroup.
> > 
> > It seems that oom_adj should probably be ignored in the case where it makes the OOM situation unsolvable.  Here's an excerpt from the console output when the bug is triggered:
> > 
> > Memory cgroup out of memory: kill process 25306 (memeater) score 0 or a child
> > Memory cgroup out of memory: kill process 25306 (memeater) score 0 or a child
> > Memory cgroup out of memory: kill process 25306 (memeater) score 0 or a child
> > Memory cgroup out of memory: kill process 25306 (memeater) score 0 or a child
> > Memory cgroup out of memory: kill process 25306 (memeater) score 0 or a child
> > Memory cgroup out of memory: kill process 25306 (memeater) score 0 or a child
> > Memory cgroup out of memory: kill process 25306 (memeater) score 0 or a child
> > Memory cgroup out of memory: kill process 25306 (memeater) score 0 or a child
> > Memory cgroup out of memory: kill process 25306 (memeater) score 0 or a child
> > Memory cgroup out of memory: kill process 25306 (memeater) score 0 or a child
> > Memory cgroup out of memory: kill process 25306 (memeater) score 0 or a child
> > Memory cgroup out of memory: kill process 25306 (memeater) score 0 or a child
> > 
> 
> Now, In -mm tree, 2 options are supproted and it's under test.
> 
>   1. oom_notifier ... an event notifier which notifies OOM.
> 
>   2. oom_disable  ... disable OOM-Killer. All threads will wait for the end of
>      OOM. No cpu consumption.
> 
> By 1+2, an user(user-land deamon) can implement its own OOM handler.
> Please wait it.
> 
And, you also need memcg-make-oom-killer-a-no-op-when-no-killable-task-can-be-found.patch.
IIUC, we will be stuck at the infinite loop inside mem_cgroup_out_of_memory() otherwise.

Thanks,
Daisuke Nishimura.
_______________________________________________
Containers mailing list
Containers at lists.linux-foundation.org
https://lists.linux-foundation.org/mailman/listinfo/containers




More information about the Devel mailing list