From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-13.3 required=3.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_IN_DEF_DKIM_WL autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 97833C433DB for ; Wed, 17 Mar 2021 16:20:24 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id E05F064F0F for ; Wed, 17 Mar 2021 16:20:23 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org E05F064F0F Authentication-Results: mail.kernel.org; dmarc=fail (p=reject dis=none) header.from=google.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 29A3F6B006E; Wed, 17 Mar 2021 12:20:23 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 24AA16B0070; Wed, 17 Mar 2021 12:20:23 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 0EBC86B0071; Wed, 17 Mar 2021 12:20:23 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0197.hostedemail.com [216.40.44.197]) by kanga.kvack.org (Postfix) with ESMTP id EA0666B006E for ; Wed, 17 Mar 2021 12:20:22 -0400 (EDT) Received: from smtpin26.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with ESMTP id 863B6180AD82F for ; Wed, 17 Mar 2021 16:20:22 +0000 (UTC) X-FDA: 77929878684.26.F7FBA2E Received: from mail-lf1-f48.google.com (mail-lf1-f48.google.com [209.85.167.48]) by imf06.hostedemail.com (Postfix) with ESMTP id AEFB8C008EA9 for ; Wed, 17 Mar 2021 15:44:28 +0000 (UTC) Received: by mail-lf1-f48.google.com with SMTP id n16so3687868lfb.4 for ; Wed, 17 Mar 2021 08:44:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=aTfBh90JXwGff2ZxWuiB3veslzipZjcqWGXtv4mEtkg=; b=aefOe8HrK+8l5069etTdhgpdpsTxNKmQ5waNWpfBPc4Vp2tSQ3WYhPKRFUSgm9ctwQ WBvCIVuGft3X7461mvj3J+OE0goxWYt7Y1uGsDY0JXTht2umVSP0lcKRIF2B3d5EhXAG sxjCber5jF8JJ6zwYaZFATyR+IVEz0lafZkt8tGZvr448ISoGI/dg4+BS+G8QGrIbgx1 RUwVsvgbKzGswjnORvduCk0WVKYr+aVE00ayw9Oq63fmaaKER4YBLKpat98CmPwNnSFT A+5MN0OCtWsTUFacitZqngcNZpgqqYpfNgpKK5vh8qLODjBLoU0Tvr1OWxGt9TAi8MDC Xv3w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=aTfBh90JXwGff2ZxWuiB3veslzipZjcqWGXtv4mEtkg=; b=EyCc2eaHt9KVT0rtBVB6c0CThb+gAUu3pesj8FMEKAerJEWhxlNqAM1AZdyOH3/Z16 jOl7j9N2uvC+sisrh9SoTPmMECRw9atkUOiHj9dflajseIUPWRlDd833T8EjIo57VstA npTtrnR+6lmtQIrs1mmJQMWrc+4QHRF4+1hkDhqdqcUFcI0KSC2BWQcD4S8uvBOKaGgO iVU4OtmAg/3BbrlObFa+8vOtk3XCA4MGspImh3XBY9QO/dC3unTDTrIjAcQvhH3NGyqe Ygb9DjJrjVy2bB4ASj8B+7YhyeJWATeGodpzzqTHvOadciWx6DB6AR/eu2hU/YjfIyGS sLEA== X-Gm-Message-State: AOAM533EscYc8L5pyzb0OJPrJMpr4lWk/nwmPAbUxG/Xz5CGZfyoXbaX 2n52MyXF1o7eGfFY721EEVMbwff5pWeVVMv+JAq3aQ== X-Google-Smtp-Source: ABdhPJx84cgIxdrUA6ixcUNb6dqmqL7iG5H4YThlUdttX0FkCh+i1V/VAjXiflzPjfe8qHFYLEKRhq3nFvH9+kME+mQ= X-Received: by 2002:a19:ee19:: with SMTP id g25mr2618624lfb.83.1615995866698; Wed, 17 Mar 2021 08:44:26 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Shakeel Butt Date: Wed, 17 Mar 2021 08:44:14 -0700 Message-ID: Subject: Re: [BUG -next] "memcg: charge before adding to swapcache on swapin" broken To: Heiko Carstens Cc: Andrew Morton , Roman Gushchin , Johannes Weiner , Hugh Dickins , Juergen Christ , Christian Borntraeger , Vasily Gorbik , Linux MM , Linux-Next Mailing List Content-Type: text/plain; charset="UTF-8" X-Stat-Signature: fkx7m4mtbt9a5psxfkd7gjnckqq874ur X-Rspamd-Server: rspam01 X-Rspamd-Queue-Id: AEFB8C008EA9 Received-SPF: none (google.com>: No applicable sender policy available) receiver=imf06; identity=mailfrom; envelope-from=""; helo=mail-lf1-f48.google.com; client-ip=209.85.167.48 X-HE-DKIM-Result: pass/pass X-HE-Tag: 1615995868-28867 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Wed, Mar 17, 2021 at 8:26 AM Heiko Carstens wrote: > > On Wed, Mar 17, 2021 at 06:33:24AM -0700, Shakeel Butt wrote: > > > Ah, sorry. This is the s390 output for exception-traces. That is if > > > /proc/sys/debug/exception-trace is set to one, and a process gets > > > killed because of an unhandled signal. > > > > > > In this particular case sshd was killed because it tried to access > > > address zero, where nothing is mapped. > > > > > > Given that all higher registers are zero in the register dump above my > > > guess would be this happened because a stack page got unmapped, and > > > when it got accessed to restore register contents a zero page was > > > mapped in instead of the real old page contents. > > > > > > We have also all other sorts of crashes in our CI with linux-next > > > currently, e.g. LTP's testcase "swapping01" seems to be able to make > > > (more or less) sure that the init process get's killed (-> panic). > > > > I have tried the elfutils selftests and swapping01 on x86_64 VM and I > > am not able to reproduce the issue. Can you give a bit more detail of > > the setup along with the config file? I am assuming you are not > > creating cgroups as these tests do not manipulate cgroups. Also is the > > memory controller on your system on v1 or v2? > > > > I am fine with dropping the patch from mm-tree until we know more > > about this issue. > > This is a Fedora 33 system with 2 CPUs, 2 GB memory and 20 GB swap > space (yes...). > > It should be cgroups v2: > > # mount > ... > cgroup2 on /sys/fs/cgroup type cgroup2 (rw,nosuid,nodev,noexec,relatime,seclabel,nsdelegate) > > Config below. And the fun thing is that I cannot reproduce it today > anymore with the elfutils test case - what _seems_ to be different is > that the test suite runs much faster than yesterday evening. Usually > an indication that there is no steal time (other guests which steal > cpu time), which again _could_ indicate a race / lack of locking > somewhere. > This is kind of odd, since yesterday evening it was very reliable to > trigger the bug :/ > Thanks for the config. One question regarding swap, is it disk based swap or zram? By guests, do you mean there was another significant workload running on the machine in parallel to the tests? If you don't mind can you try swapping01 as well.