Re: [patch] mm, oom: dump stack of victim when reaping failed

From: Tetsuo Handa
Date: Wed Jan 15 2020 - 16:10:20 EST


On 2020/01/16 5:27, David Rientjes wrote:
> I'm
> currently tracking a stall in oom reaping where the victim doesn't always
> have a lock held so we don't know where it's at in the kernel; I'm hoping
> that a stack for the thread group leader will at least shed some light on
> it.
>

This change was already proposed at
https://lore.kernel.org/linux-mm/20180320122818.GL23100@xxxxxxxxxxxxxx/ .

And according to that proposal, it is likely i_mmap_lock_write() in dup_mmap()
in copy_process(). We tried to make that lock killable but we gave it up
because nobody knows whether it is safe to do make it killable.