HI Jan, Now we have run all memcg testcases , they need mainly two things: 1) echo -16 > /proc/$pid/oom_adj 2) and a long sleep ( 30 seconds) so that after OOM , it get killed, normally it takes some time, so After increasing the sleep time, mem_process get killed. Thanks for your support.
------- Original Message ------- Sender : Jan Stancek<jstan...@redhat.com> Date : Jul 29, 2015 15:48 (GMT+09:00) Title : Re: [LTP] Regarding memcg control testcase (mem_process.c) ----- Original Message ----- > From: "Manjeet Pawar" > To: "Jan Stancek" , ltp-list@lists.sourceforge.net > Cc: "AJEET YADAV" , "PANKAJ MISHRA" > Sent: Wednesday, 29 July, 2015 5:54:55 AM > Subject: Re: Re: [LTP] Regarding memcg control testcase (mem_process.c) > > Hello Jan, > After doing analysis, I found that When memory hog process (mem_process) > tries to mmap double the memory of the cgroup limit which is 4096 . I am > getting OOM in that situation and send kill signal to process (which is > expected behaviour) . But it could not kill the process and > it sets the process state to uninterrupted sleep state. > > To get this OOM , i need to change oom_adj value of the process '208' from > -17 to -16. If i dont do this, I dont get OOM and process always stuck at > mmap and try to allocate 8192 Bytes of memory. That explains it, -17 means OOM is disabled: #define OOM_DISABLE (-17) > logs:- > [2-74.5749] Memory cgroup out of memory: Kill process 208 (mem_process) score > 147000 or sacrifice child > [2-74.5840] Killed process 208 (mem_process) total-vm:2704kB, anon-rss:80kB, > file-rss:484kB > by mmap is -1237753856 > Warning: bad syntax, perhaps a bogus '-'? See /usr/share/doc/procps-3.2.8/FAQ > root 208 39.6 0.0 2704 564 ? D 00:01 0:02 mem_process > -m 8192 // D - means uninterrupted sleep > root 215 0.0 0.0 2412 584 ? S 00:01 0:00 grep -r 208 No idea why it's getting stuck though. I'd try with oom_adj == 0. If that makes no difference, /proc//stack might give some additional clues. Do you see similar behaviour with other OOM testcases? Regards, Jan > > I am using 3.10.84 kernel. LTP is of latest version (ltp-full-20150420) > > Regards > Manjeet > > ------- Original Message ------- > Sender : Jan Stancek > Date : Jul 27, 2015 17:32 (GMT+09:00) > Title : Re: [LTP] Regarding memcg control testcase (mem_process.c) > > > > ------------------------------------------------------------------------------ _______________________________________________ Ltp-list mailing list Ltp-list@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/ltp-list