linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Shakeel Butt <shakeelb@google.com>
To: Heiko Carstens <hca@linux.ibm.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	Roman Gushchin <guro@fb.com>,
	 Johannes Weiner <hannes@cmpxchg.org>,
	Hugh Dickins <hughd@google.com>,
	 Juergen Christ <jchrist@linux.ibm.com>,
	Christian Borntraeger <borntraeger@de.ibm.com>,
	 Vasily Gorbik <gor@linux.ibm.com>, Linux MM <linux-mm@kvack.org>,
	 Linux-Next Mailing List <linux-next@vger.kernel.org>
Subject: Re: [BUG -next] "memcg: charge before adding to swapcache on swapin" broken
Date: Wed, 17 Mar 2021 06:33:24 -0700	[thread overview]
Message-ID: <CALvZod5k5wgE-d=U=thhQp5bwQ6t0ugKDtZj75qSSYVB27uCuQ@mail.gmail.com> (raw)
In-Reply-To: <YFFRcPUtddlIB21l@osiris>

On Tue, Mar 16, 2021 at 5:46 PM Heiko Carstens <hca@linux.ibm.com> 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.


  parent reply	other threads:[~2021-03-17 13:36 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-16 21:08 Heiko Carstens
2021-03-16 21:21 ` Shakeel Butt
2021-03-17  0:46   ` Heiko Carstens
2021-03-17  8:36     ` Christian Borntraeger
2021-03-17 13:33     ` Shakeel Butt [this message]
2021-03-17 15:26       ` Heiko Carstens
2021-03-17 15:44         ` Shakeel Butt
2021-03-17 20:44           ` Heiko Carstens
2021-03-17 21:11             ` Heiko Carstens
2021-03-17 21:39               ` Shakeel Butt
2021-03-18  0:23                 ` Shakeel Butt
2021-03-18  1:30                   ` Minchan Kim
2021-03-18  1:49                     ` Shakeel Butt
2021-03-18 15:19                       ` Minchan Kim

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='CALvZod5k5wgE-d=U=thhQp5bwQ6t0ugKDtZj75qSSYVB27uCuQ@mail.gmail.com' \
    --to=shakeelb@google.com \
    --cc=akpm@linux-foundation.org \
    --cc=borntraeger@de.ibm.com \
    --cc=gor@linux.ibm.com \
    --cc=guro@fb.com \
    --cc=hannes@cmpxchg.org \
    --cc=hca@linux.ibm.com \
    --cc=hughd@google.com \
    --cc=jchrist@linux.ibm.com \
    --cc=linux-mm@kvack.org \
    --cc=linux-next@vger.kernel.org \
    /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