[LTP] [RFC] enable OOM protection for the library and test process?

Li Wang liwang@redhat.com
Tue Dec 14 07:46:21 CET 2021


On Tue, Dec 14, 2021 at 12:59 AM Martin Doucha <mdoucha@suse.cz> wrote:

> On 13. 12. 21 17:15, Cyril Hrubis wrote:
> > Hi!
> >> I'm afraid it won't be that easy. The main cause of OOM killer going
> >> postal and killing processes with tiny memory footprint is that a
> >> process executing the mlock() syscall cannot be targeted by OOM killer
> >> at all. That's a known issue in the kernel with no easy fix.
> >
> > This is only single test out of at least 10 that can trigger OOM, right?
>
> All 5 oom* tests in the mm runfile have mlock() subtest. All of them can
> end up killing the whole userspace by accident. And all of them
> regularly do so in our automated test system.
>

It is possible, but avoid enabling the OOM protection on lib-process
can miss this panic? I guess no, because lib-process is not eaten
too much memory and there are many other processes that still have
the big potential to be killed.

So we might shouldn't believe protect main or lib process will add the
possibility to kill PID 1, in other words, do protection or not, the
panic/bug
can't be perfectly avoided, so why not do it? Or I have something
that misunderstands you here.

-- 
Regards,
Li Wang
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.linux.it/pipermail/ltp/attachments/20211214/f7d42a76/attachment-0001.htm>


More information about the ltp mailing list