Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp3408140imm; Mon, 6 Aug 2018 04:23:01 -0700 (PDT) X-Google-Smtp-Source: AAOMgpduSsff4JZBcGxLGMVEVtLg1VdnZIMYQxF50x5z/PyRzHclTV1pwqUvpGURlxjF2yPUxb3r X-Received: by 2002:a65:448a:: with SMTP id l10-v6mr14293227pgq.382.1533554581481; Mon, 06 Aug 2018 04:23:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1533554581; cv=none; d=google.com; s=arc-20160816; b=KoMecay8z80d6xkEjAPNKqHXP6AucFBGvHHWhBOgi4eueZDmV7ofsb97FLbDXHrM60 Fj9Xvlx3zDMhLVt5EwVJQeIJwkPhjv8xSJrqF31V7J8FkruSiGep06FugyqKHsnPJW+1 QXvZ1F8VXzEXvsBVEljVN4Cjx/7lfrWy8JwnvaQCrTLgJgiGdGsqoD9MFmTpzROL4yRm aZkTM/bY+rIMinafnkok+pDSG6YeKW5Qqame6cTXv0m/fFqkqAFei2O6mU/1IYIIJuNX sVbkOiWdlrnPhZq0Q73sKXEbJ5UHQa6558RaS6pBPsjRTI686rzZCxGcHAsBNxLMBujh GqpA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:arc-authentication-results; bh=fM9DjT9qSZbRpn4wxw9XQbF9LEre5PQ0ZySYSEpgCoc=; b=bLozo2nAbKcb0vjFhefX1SAgrsGiBhNqrab8ZBKlVzTjJewTAdoTx1OusNLrxKpC+8 x1PtZ71jJM73rOZhkj3+qmuiGHhmDKe1FGJpkXt62Cvj3aRQZM6KLg/molNYDpAJRaMV HRDsCgkKfKRv6m59j3qMwzYafcImLcY+HEK7Tc9S6J1BsjTHjkPlow68BkgE0OD0NAyy JFu+EZ9kkrzgzSYw6f6rCwix3l3ZuigigfF4dIatf5Glnjl9xUWknegyjWkxgf2hyZap dSmFyiZIBn29drF2M62/L8bAtQvNihaSoLzWIk0jGLZINfoyZP1L15gzDhxaVQb2JylT kVZg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 62-v6si9888902ply.520.2018.08.06.04.22.46; Mon, 06 Aug 2018 04:23:01 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730281AbeHFNSL (ORCPT + 99 others); Mon, 6 Aug 2018 09:18:11 -0400 Received: from mx2.suse.de ([195.135.220.15]:51630 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727009AbeHFNSK (ORCPT ); Mon, 6 Aug 2018 09:18:10 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay1.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id 83F10AF70; Mon, 6 Aug 2018 11:09:35 +0000 (UTC) Date: Mon, 6 Aug 2018 13:09:34 +0200 From: Michal Hocko To: Tetsuo Handa Cc: Dmitry Vyukov , syzbot , cgroups@vger.kernel.org, Johannes Weiner , LKML , Linux-MM , syzkaller-bugs , Vladimir Davydov Subject: Re: WARNING in try_charge Message-ID: <20180806110934.GJ19540@dhcp22.suse.cz> References: <0000000000005e979605729c1564@google.com> <20180806091552.GE19540@dhcp22.suse.cz> <20180806094827.GH19540@dhcp22.suse.cz> <884de816-671a-44d4-a6a1-2ad7eff53715@I-love.SAKURA.ne.jp> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <884de816-671a-44d4-a6a1-2ad7eff53715@I-love.SAKURA.ne.jp> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon 06-08-18 19:47:00, Tetsuo Handa wrote: > On 2018/08/06 19:39, Dmitry Vyukov wrote: > > On Mon, Aug 6, 2018 at 11:48 AM, Michal Hocko wrote: > >> Btw. running with the above diff on top might help us to ideantify > >> whether this is a pre-mature warning or a valid one. Still useful to > >> find out. > > Since syzbot already found a syz reproducer, you can ask syzbot to test it. > > > > > The bug report has a reproducer, so you can run it with the patch. Or > > ask syzbot to test your patch: > > https://github.com/google/syzkaller/blob/master/docs/syzbot.md#testing-patches > > Which basically boils down to saying: > > > > #syz test: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git > > master > > Excuse me, but this is linux-next only problem. Therefore, If this really is a linux-next only problem then please retest with the current linux-next which has dropped the and replaced the group oom code. > #syz test: git://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master > > diff --git a/mm/memcontrol.c b/mm/memcontrol.c > index 4603ad75c9a9..852cd3dbdcd9 100644 > --- a/mm/memcontrol.c > +++ b/mm/memcontrol.c > @@ -1388,6 +1388,8 @@ static bool mem_cgroup_out_of_memory(struct mem_cgroup *memcg, gfp_t gfp_mask, > bool ret; > > mutex_lock(&oom_lock); > + pr_info("task=%s pid=%d invoked memcg oom killer. oom_victim=%d\n", > + current->comm, current->pid, tsk_is_oom_victim(current)); > ret = out_of_memory(&oc); > mutex_unlock(&oom_lock); > return ret; > > F.Y.I. Waiting until __mmput() completes (with timeout using OOM score feedback) > ( https://syzkaller.appspot.com/x/patch.diff?x=101e449c400000 ) solves this race. Which just means that something else is broken. Seriously, timout is not going to fix anything. It merely changes the picture. -- Michal Hocko SUSE Labs