From: Dmitry Vyukov <dvyukov@google.com>
To: Michal Hocko <mhocko@kernel.org>
Cc: syzbot <syzbot+bab151e82a4e973fa325@syzkaller.appspotmail.com>,
cgroups@vger.kernel.org, Johannes Weiner <hannes@cmpxchg.org>,
LKML <linux-kernel@vger.kernel.org>,
Linux-MM <linux-mm@kvack.org>,
Tetsuo Handa <penguin-kernel@i-love.sakura.ne.jp>,
syzkaller-bugs <syzkaller-bugs@googlegroups.com>,
Vladimir Davydov <vdavydov.dev@gmail.com>
Subject: Re: WARNING in try_charge
Date: Mon, 6 Aug 2018 19:49:16 +0200 [thread overview]
Message-ID: <CACT4Y+YDTvOTrSWBU-cZ-yFAbsJP=J9Nhp9w1F2cGG7hw4P81Q@mail.gmail.com> (raw)
In-Reply-To: <20180806174410.GB10003@dhcp22.suse.cz>
On Mon, Aug 6, 2018 at 7:44 PM, Michal Hocko <mhocko@kernel.org> wrote:
> On Mon 06-08-18 08:42:02, syzbot wrote:
>> Hello,
>>
>> syzbot has tested the proposed patch but the reproducer still triggered
>> crash:
>> WARNING in try_charge
>>
>> Killed process 6410 (syz-executor5) total-vm:37708kB, anon-rss:2128kB,
>> file-rss:0kB, shmem-rss:0kB
>> oom_reaper: reaped process 6410 (syz-executor5), now anon-rss:0kB,
>> file-rss:0kB, shmem-rss:0kB
>> task=syz-executor5 pid=6410 invoked memcg oom killer. oom_victim=1
>
> Thank you. This is useful. The full oom picture is this
> : [ 65.363983] task=syz-executor5 pid=6415 invoked memcg oom killer. oom_victim=0
> [...]
> : [ 65.920355] Task in /ile0 killed as a result of limit of /ile0
> : [ 65.926389] memory: usage 0kB, limit 0kB, failcnt 20
> : [ 65.931518] memory+swap: usage 0kB, limit 9007199254740988kB, failcnt 0
> : [ 65.938296] kmem: usage 0kB, limit 9007199254740988kB, failcnt 0
> : [ 65.944467] Memory cgroup stats for /ile0: cache:0KB rss:0KB rss_huge:0KB shmem:0KB mapped_file:0KB dirty:0KB writeback:0KB swap:0KB inactive_anon:0KB active_anon:0KB inactive_file:0KB active_file:0KB unevictable:0KB
> : [ 65.963878] Tasks state (memory values in pages):
> : [ 65.968743] [ pid ] uid tgid total_vm rss pgtables_bytes swapents oom_score_adj name
> : [ 65.977615] [ 6410] 0 6410 9427 532 61440 0 0 syz-executor5
> : [ 65.986647] Memory cgroup out of memory: Kill process 6410 (syz-executor5) score 547000 or sacrifice child
> : [ 65.996474] Killed process 6410 (syz-executor5) total-vm:37708kB, anon-rss:2128kB, file-rss:0kB, shmem-rss:0kB
> : [ 66.007471] oom_reaper: reaped process 6410 (syz-executor5), now anon-rss:0kB, file-rss:0kB, shmem-rss:0kB
> : [ 66.017652] task=syz-executor5 pid=6410 invoked memcg oom killer. oom_victim=1
> : [ 66.025137] ------------[ cut here ]------------
> : [ 66.029927] Memory cgroup charge failed because of no reclaimable memory! This looks like a misconfiguration or a kernel bug.
> : [ 66.030061] WARNING: CPU: 1 PID: 6410 at mm/memcontrol.c:1707 try_charge+0x734/0x1680
>
> So we have only a single task in the memcg and it is this task which
> triggers the OOM. It gets killed and oom_reaped. This means that
> out_of_memory should return with true and so we should retry and force
> the charge as I've already mentioned. For some reason this task has
> triggered the oom killer path again and then we haven't found any
> eligible task and resulted in the warning. This shouldn't happen.
>
> I will stare to the code some more to see how the heck we get there
> without passing
> if (unlikely(tsk_is_oom_victim(current) ||
> fatal_signal_pending(current) ||
> current->flags & PF_EXITING))
> goto force;
This is the syzkaller reproducer if it will give you any hints:
mkdir(&(0x7f0000000340)='./file0\x00', 0x0)
mount(&(0x7f00000000c0)='./file0//ile0\x00',
&(0x7f0000000080)='./file0\x00', &(0x7f0000000200)='cgroup2\x00', 0x0,
0x0)
r0 = open(&(0x7f0000000040)='./file0//ile0\x00', 0x0, 0x0)
r1 = openat$cgroup_procs(r0, &(0x7f00000001c0)='cgroup.procs\x00', 0x2, 0x0)
write$cgroup_pid(r1, &(0x7f0000000100), 0x12)
syz_mount_image$xfs(&(0x7f0000000280)='xfs\x00',
&(0x7f00000002c0)='./file0//ile0\x00', 0x0, 0x0, &(0x7f0000000740),
0x0, &(0x7f0000000800))
getsockopt$sock_cred(r0, 0x1, 0x11, &(0x7f0000000180), &(0x7f0000000240)=0xc)
r2 = open(&(0x7f0000000040)='./file0//ile0\x00', 0x0, 0x0)
write$FUSE_STATFS(r2, &(0x7f0000000280)={0x60, 0xfffffffffffffffe,
0x7, {{0x401, 0x7, 0x7d, 0x1c, 0xd8, 0xb7, 0x2, 0x3}}}, 0x60)
r3 = openat$cgroup_int(r2, &(0x7f00000001c0)='memory.max\x00', 0x2, 0x0)
write$cgroup_int(r3, &(0x7f00000000c0), 0x12)
next prev parent reply other threads:[~2018-08-06 17:49 UTC|newest]
Thread overview: 53+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-08-04 13:33 WARNING in try_charge syzbot
2018-08-04 13:45 ` Tetsuo Handa
2018-08-05 11:33 ` Tetsuo Handa
2018-08-05 8:14 ` syzbot
2018-08-06 9:15 ` Michal Hocko
2018-08-06 9:30 ` Dmitry Vyukov
2018-08-06 9:48 ` Michal Hocko
2018-08-06 10:34 ` Dmitry Vyukov
2018-08-06 11:02 ` Michal Hocko
2018-08-06 11:57 ` Dmitry Vyukov
2018-08-06 14:21 ` Michal Hocko
2018-08-06 14:58 ` Dmitry Vyukov
2018-08-06 17:30 ` Michal Hocko
2018-08-06 17:53 ` Dmitry Vyukov
2018-08-06 15:07 ` Dmitry Vyukov
2018-08-06 15:31 ` Johannes Weiner
2018-08-06 10:39 ` Dmitry Vyukov
2018-08-06 10:47 ` Tetsuo Handa
2018-08-06 11:09 ` Michal Hocko
2018-08-06 11:27 ` syzbot
2018-08-06 11:32 ` Michal Hocko
2018-08-06 11:58 ` Dmitry Vyukov
2018-08-06 14:41 ` Tetsuo Handa
2018-08-06 14:58 ` Michal Hocko
2018-08-06 15:12 ` Tetsuo Handa
2018-08-06 14:54 ` David Howells
2018-08-06 15:04 ` Tetsuo Handa
2018-08-06 11:00 ` syzbot
2018-08-06 15:32 ` Tetsuo Handa
2018-08-06 15:42 ` syzbot
2018-08-06 16:02 ` Tetsuo Handa
2018-08-06 17:44 ` Michal Hocko
2018-08-06 17:49 ` Dmitry Vyukov [this message]
2018-08-06 17:56 ` Michal Hocko
2018-08-06 18:13 ` Michal Hocko
2018-08-06 18:23 ` syzbot
2018-08-06 18:55 ` Michal Hocko
2018-08-06 19:12 ` syzbot
2018-08-06 19:45 ` Michal Hocko
2018-08-06 19:46 ` Michal Hocko
2018-08-07 11:18 ` Dmitry Vyukov
2018-08-07 11:25 ` Michal Hocko
2018-08-06 18:39 ` Michal Hocko
2018-08-06 20:26 ` Tetsuo Handa
2018-08-06 20:34 ` Michal Hocko
2018-08-06 20:46 ` Tetsuo Handa
2018-08-06 20:55 ` Michal Hocko
2018-08-06 21:50 ` Tetsuo Handa
2018-08-07 10:19 ` Tetsuo Handa
2018-08-09 13:57 ` Tetsuo Handa
2018-08-09 15:07 ` Michal Hocko
2018-08-09 21:05 ` Tetsuo Handa
2018-08-09 15:34 ` Johannes Weiner
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='CACT4Y+YDTvOTrSWBU-cZ-yFAbsJP=J9Nhp9w1F2cGG7hw4P81Q@mail.gmail.com' \
--to=dvyukov@google.com \
--cc=cgroups@vger.kernel.org \
--cc=hannes@cmpxchg.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mhocko@kernel.org \
--cc=penguin-kernel@i-love.sakura.ne.jp \
--cc=syzbot+bab151e82a4e973fa325@syzkaller.appspotmail.com \
--cc=syzkaller-bugs@googlegroups.com \
--cc=vdavydov.dev@gmail.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).