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 8D481C433E6 for ; Wed, 17 Mar 2021 13:36:19 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id CC2D764F30 for ; Wed, 17 Mar 2021 13:36:18 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org CC2D764F30 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 39E9B6B006E; Wed, 17 Mar 2021 09:36:18 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 34F096B0070; Wed, 17 Mar 2021 09:36:18 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 1CB026B0071; Wed, 17 Mar 2021 09:36:18 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0013.hostedemail.com [216.40.44.13]) by kanga.kvack.org (Postfix) with ESMTP id F35156B006E for ; Wed, 17 Mar 2021 09:36:17 -0400 (EDT) Received: from smtpin18.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with ESMTP id 85ED61EF1 for ; Wed, 17 Mar 2021 13:36:17 +0000 (UTC) X-FDA: 77929465194.18.11FF13C Received: from mail-lf1-f44.google.com (mail-lf1-f44.google.com [209.85.167.44]) by imf11.hostedemail.com (Postfix) with ESMTP id 0603C20D91BC for ; Wed, 17 Mar 2021 13:33:38 +0000 (UTC) Received: by mail-lf1-f44.google.com with SMTP id q25so2972482lfc.8 for ; Wed, 17 Mar 2021 06:33:38 -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=SPa9rDa49UNNnQMdwv/eJ8utZNtZAg0Q98cQ0MWyQlI=; b=lwK7MsEvMqy4KvVa1Tn9DSU+5SlncjOC9miTC+98wKxArloBqN/YSoAVyPzzzig/Ba Ll6pIL8lrA72BBkyX4z7w3nDyfKpEt0/fvQs2y9PPDxvm5JgePvUn9DhZTyYHJfg+vVD un4DZ2CR40sJD+qtyMLLXzuCk3flzDBkm62JdTZVNMVHuhg3oSwHMVOQaaiU3cByu5ad FYOlOGuxxfDZg1N1ImDP8yd9xyX5ApfqXlAw5f+T8bbA2vbgpIHF89RoUEDmj5fkwIGu fQ9YwjeUhKLOURmA5bHOdcmlRx89T4f5nzYuCQ8jIBlTcd1rbvvHluXXLeZmn/Ew2po6 0MmQ== 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=SPa9rDa49UNNnQMdwv/eJ8utZNtZAg0Q98cQ0MWyQlI=; b=lhyYXbFCRxdkTtv1HbcSP29l/PObpe+uqIYtk0o4nrcedOTsg5YWI+8pSGB4yzNLjA lOJVPRpjLzQowaMz4kc73JMDys7Salq2P+CbujMowPIs0oYM4FnCR501m7zff9Wb9K3x GwwHR/kxv6zY5RJASaSbCxBnUSpyJmyuo8jEJ1g/gXjK8c6uFHROOlnS3inA2g1WW9QD gM6cYMGF2M8bJdWr2Hf9nJ0/JpivhrQCPrx/Lt1rHyOszQ2777GIcA1P+wTXTCefpOcL P12Q2UJyrOcu3FBn1VQGARjEITQeWb0KA8KJdICSFEtjnYvyGOwusyVnDvoHQKZnFZd5 kIhQ== X-Gm-Message-State: AOAM5330nuhG2MBBvsU+asKcz0RhNGRNvtTeOPkFO9OdSbqLQtsRDA74 Y4cklHkTlkaCQN8fgnkSScXaK5Q7yGyp5G6mw7V6oA== X-Google-Smtp-Source: ABdhPJx0KbjNeKjr4XlvLNYsA7PvXKn9q0aM3+HA9JqVeBbsfrOhJe3lVT3QXsfFWnA/WNkVKG4M2NYSqf1FfJu4wKs= X-Received: by 2002:a05:6512:6c6:: with SMTP id u6mr2269739lff.347.1615988017179; Wed, 17 Mar 2021 06:33:37 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Shakeel Butt Date: Wed, 17 Mar 2021 06:33:24 -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: 8qj3wx7r9exk376ykw83d554sk5j8juo X-Rspamd-Server: rspam05 X-Rspamd-Queue-Id: 0603C20D91BC Received-SPF: none (google.com>: No applicable sender policy available) receiver=imf11; identity=mailfrom; envelope-from=""; helo=mail-lf1-f44.google.com; client-ip=209.85.167.44 X-HE-DKIM-Result: pass/pass X-HE-Tag: 1615988018-114995 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 Tue, Mar 16, 2021 at 5:46 PM Heiko Carstens wrote: > > Hi Shakeel, > > > > your commit 3a9ca1b0ac0f ("memcg: charge before adding to swapcache on > > > swapin") in linux-next 20210316 appears to cause user process faults / > > > crashes on s390 like: > > > > > > User process fault: interruption code 003b ilc:3 in sshd[2aa15280000+df000] > > > Failing address: 0000000000000000 TEID: 0000000000000800 > > > Fault in primary space mode while using user ASCE. > > > AS:00000000966b41c7 R3:0000000000000024 > > > CPU: 0 PID: 401 Comm: sshd Not tainted 5.12.0-rc3-00048-geba7667a8534 #10 > > > Hardware name: IBM 8561 T01 703 (z/VM 7.2.0) > > > User PSW : 0705000180000000 0000000000000000 > > > R:0 T:1 IO:1 EX:1 Key:0 M:1 W:0 P:1 AS:0 CC:0 PM:0 RI:0 EA:3 > > > User GPRS: 0000000000000000 fffffffffffff000 0000000000000001 000002aa157b88f0 > > > 000002aa157c43c0 0000000000000000 0000000000000000 0000000000000000 > > > 0000000000000000 0000000000000000 0000000000000000 0000000000000000 > > > 0000000000000000 0000000000000000 0000000000000000 0000000000000000 > > > User Code: Bad PSW. > > > > Thanks for the report. Can you please explain a bit what the above report tells? > > 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.