linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Tetsuo Handa <penguin-kernel@i-love.sakura.ne.jp>
To: Shakeel Butt <shakeelb@google.com>
Cc: "Michal Hocko" <mhocko@kernel.org>,
	syzbot <syzbot+d0fc9d3c166bc5e4a94b@syzkaller.appspotmail.com>,
	"Andrew Morton" <akpm@linux-foundation.org>,
	"Eric W. Biederman" <ebiederm@xmission.com>,
	"Roman Gushchin" <guro@fb.com>,
	"Johannes Weiner" <hannes@cmpxchg.org>,
	"Jérôme Glisse" <jglisse@redhat.com>,
	LKML <linux-kernel@vger.kernel.org>,
	"Linux MM" <linux-mm@kvack.org>,
	syzkaller-bugs <syzkaller-bugs@googlegroups.com>,
	yuzhoujian@didichuxing.com
Subject: Re: general protection fault in oom_unkillable_task
Date: Sun, 16 Jun 2019 06:33:51 +0900	[thread overview]
Message-ID: <791594c6-45a3-d78a-70b5-901aa580ed9f@i-love.sakura.ne.jp> (raw)
In-Reply-To: <CALvZod4etSv9Hv4UD=E6D7U4vyjCqhxQgq61AoTUCd+VubofFg@mail.gmail.com>

On 2019/06/16 3:50, Shakeel Butt wrote:
>> While dump_tasks() traverses only each thread group, mem_cgroup_scan_tasks()
>> traverses each thread.
> 
> I think mem_cgroup_scan_tasks() traversing threads is not intentional
> and css_task_iter_start in it should use CSS_TASK_ITER_PROCS as the
> oom killer only cares about the processes or more specifically
> mm_struct (though two different thread groups can have same mm_struct
> but that is fine).

We can't use CSS_TASK_ITER_PROCS from mem_cgroup_scan_tasks(). I've tried
CSS_TASK_ITER_PROCS in an attempt to evaluate only one thread from each
thread group, but I found that CSS_TASK_ITER_PROCS causes skipping whole
threads in a thread group (and trivially allowing "Out of memory and no
killable processes...\n" flood) if thread group leader has already exited.

If we can agree with using a flag in mm_struct in order to track whether 
each mm_struct was already evaluated for each out_of_memory() call, we can
printk() only one thread from all thread groups sharing that mm_struct...


  reply	other threads:[~2019-06-15 21:34 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-06-15  1:08 general protection fault in oom_unkillable_task syzbot
2019-06-15  1:10 ` Tetsuo Handa
2019-06-15 15:59   ` Tetsuo Handa
2019-06-15  3:15 ` Shakeel Butt
2019-06-15 13:49   ` Michal Hocko
2019-06-15 16:11     ` Shakeel Butt
2019-06-15 16:48       ` Tetsuo Handa
2019-06-15 18:50         ` Shakeel Butt
2019-06-15 21:33           ` Tetsuo Handa [this message]
2019-06-16  7:37             ` Tetsuo Handa
2019-06-16 15:13               ` Tetsuo Handa
2019-06-17  6:31                 ` Michal Hocko
2019-06-17 13:23                 ` Shakeel Butt
2019-06-18  1:45                   ` Andrew Morton
2019-06-18  4:21                     ` Shakeel Butt
2019-06-17  6:33       ` Michal Hocko
2019-06-17  9:56         ` Tetsuo Handa
2019-06-17 10:13           ` Michal Hocko
2019-06-16  5:48     ` Hillf Danton

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=791594c6-45a3-d78a-70b5-901aa580ed9f@i-love.sakura.ne.jp \
    --to=penguin-kernel@i-love.sakura.ne.jp \
    --cc=akpm@linux-foundation.org \
    --cc=ebiederm@xmission.com \
    --cc=guro@fb.com \
    --cc=hannes@cmpxchg.org \
    --cc=jglisse@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=mhocko@kernel.org \
    --cc=shakeelb@google.com \
    --cc=syzbot+d0fc9d3c166bc5e4a94b@syzkaller.appspotmail.com \
    --cc=syzkaller-bugs@googlegroups.com \
    --cc=yuzhoujian@didichuxing.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).