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 Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8694FC433EF for ; Sat, 7 May 2022 18:27:54 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 09E446B0071; Sat, 7 May 2022 14:27:54 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 04C1A6B0073; Sat, 7 May 2022 14:27:53 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id E56526B0074; Sat, 7 May 2022 14:27:53 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0011.hostedemail.com [216.40.44.11]) by kanga.kvack.org (Postfix) with ESMTP id D75AD6B0071 for ; Sat, 7 May 2022 14:27:53 -0400 (EDT) Received: from smtpin20.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay10.hostedemail.com (Postfix) with ESMTP id AE0E7512 for ; Sat, 7 May 2022 18:27:53 +0000 (UTC) X-FDA: 79439780826.20.7D43283 Received: from mail-vs1-f46.google.com (mail-vs1-f46.google.com [209.85.217.46]) by imf13.hostedemail.com (Postfix) with ESMTP id 7471620062 for ; Sat, 7 May 2022 18:27:38 +0000 (UTC) Received: by mail-vs1-f46.google.com with SMTP id x8so10185674vsg.11 for ; Sat, 07 May 2022 11:27:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=nWu2MywQGG/lQk+6DwIYkOy+InPInu19/JISIJ1ay6c=; b=S2LmFPFT3yCVv6uHOM/n6FYz0td4vWDE4alAWZ2hpBNlKJQ3THghV1FVCnlJAf5Qql Vz5+/OVzUCtw/sOUOEizQ0d2HUPzbfQ1YaHDrk5bva9ixw9kJ2fEZYthN2zzT5CKuEQJ AbVhfWIbv7aFWXAj/1eFRffwpQYJU/+1KEgQhBVvDeTlNWU93PaQO/lMuNjLdCxmAjt8 G7obweVZ2rOhvydfWP7CRUpGkwwmrsBF9lI3Ok0mlOOEN1b4JMvmOj+F8mLaiDtpjEJJ z/93Dw98zyHkD5zLIBDBXzqyNJ6nPsAKWELVFuCbvfIR98GwljRrkFDrJfcxXOZZcKc8 izvA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=nWu2MywQGG/lQk+6DwIYkOy+InPInu19/JISIJ1ay6c=; b=D0Zah/4VITN6uWogbhnqklwsdw2Ii0BTKyN6Fub+8AMmL9cWY8wxQiCZ+pAyCdXsqN muS7fqTc+UjgMtxLg6byNTSG3d6xMuKuK5oAwMuDCtOtXDnKQzuJqc59weMp+ImjzeAR vZTEXl6TT9sa8oS+6XXaTp3LnjnShIpjQLd2sUcXP5Ca6ybB1QiyJis6clTnOpikx7UA kzAjoPYxYmmwq7WOuVSHlkvYp3BxSxtBpeE0AbqnLd9EGXpRPAuH/z23+tUD9S6WBmsc cOcOSO4ec0L9Dw/SnFC2w9qbayl5JXVbbdBvjPPq6PWVvYV4z9WXVChgvgtYPU9sQohV fiRg== X-Gm-Message-State: AOAM531nSNNJdaLIbP6th0H7pISARqdYOI4AWoSYNczbMm7JjNkpJjv6 gI5Q/CYVQZkbMOkCCFpKuZGsvSrh0YbEsjapaXLVqw== X-Google-Smtp-Source: ABdhPJxvMr9/79bgxLnx9dOLzXxMnJ0mfL6bTXPoI5A7fOtPqbD0va77JLyV7wheFIEfWMg1VQSOtRVhFgEET3orvmY= X-Received: by 2002:a67:cb02:0:b0:32c:2690:be39 with SMTP id b2-20020a67cb02000000b0032c2690be39mr5129804vsl.81.1651948072013; Sat, 07 May 2022 11:27:52 -0700 (PDT) MIME-Version: 1.0 References: <20220507015646.5377-1-hdanton@sina.com> In-Reply-To: <20220507015646.5377-1-hdanton@sina.com> From: Yu Zhao Date: Sat, 7 May 2022 11:27:15 -0700 Message-ID: Subject: Re: Alpha: rare random memory corruption/segfault in user space bisected To: Michael Cree Cc: Linux-MM , linux-kernel , Hillf Danton , Joonsoo Kim Content-Type: multipart/mixed; boundary="00000000000005798e05de70220d" X-Rspam-User: X-Rspamd-Server: rspam11 X-Rspamd-Queue-Id: 7471620062 X-Stat-Signature: cjz1oykmjy4wu7u7f5woktcdu193wznz Authentication-Results: imf13.hostedemail.com; dkim=pass header.d=google.com header.s=20210112 header.b=S2LmFPFT; spf=pass (imf13.hostedemail.com: domain of yuzhao@google.com designates 209.85.217.46 as permitted sender) smtp.mailfrom=yuzhao@google.com; dmarc=pass (policy=reject) header.from=google.com X-HE-Tag: 1651948058-89513 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000041, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: --00000000000005798e05de70220d Content-Type: text/plain; charset="UTF-8" On Fri, May 6, 2022 at 6:57 PM Hillf Danton wrote: > > On Sat, 7 May 2022 09:21:25 +1200 Michael Cree wrote: > > Alpha kernel has been exhibiting rare and random memory > > corruptions/segaults in user space since the 5.9.y kernel. First seen > > on the Debian Ports build daemon when running 5.10.y kernel resulting > > in the occasional (one or two a day) build failures with gcc ICEs either > > due to self detected corrupt memory structures or segfaults. Have been > > running 5.8.y kernel without such problems for over six months. > > > > Tried bisecting last year but went off track with incorrect good/bad > > determinations due to rare nature of bug. After trying a 5.16.y kernel > > early this year and seen the bug is still present retried the bisection > > and have got to: > > > > aae466b0052e1888edd1d7f473d4310d64936196 is the first bad commit > > commit aae466b0052e1888edd1d7f473d4310d64936196 > > Author: Joonsoo Kim > > Date: Tue Aug 11 18:30:50 2020 -0700 > > > > mm/swap: implement workingset detection for anonymous LRU This commit seems innocent to me. While not ruling out anything, i.e., this commit, compiler, qemu, userspace itself, etc., my wild guess is the problem is memory barrier related. Two lock/unlock pairs, which imply two full barriers, were removed. This is not a small deal on Alpha, since it imposes no constraints on cache coherency, AFAIK. Can you please try the attached patch on top of this commit? Thanks! > > Pretty confident this is the bad commit as the kernel built to the parent > > commit (3852f6768ede54...) has not failed in four days running. Always have > > seen the failure within one day of running in past. > > See if the fix to the syzbot bisection [1] is not a cure to your issue. > > [1] https://lore.kernel.org/lkml/000000000000625fa705dd1802e3@google.com/ --00000000000005798e05de70220d Content-Type: application/octet-stream; name="test.diff" Content-Disposition: attachment; filename="test.diff" Content-Transfer-Encoding: base64 Content-ID: X-Attachment-Id: f_l2w76ukb0 ZGlmZiAtLWdpdCBhL21tL21lbW9yeS5jIGIvbW0vbWVtb3J5LmMKaW5kZXggZGUzMTFmYzc2Mzll Li5mMWNmMDc0MTZjZjQgMTAwNjQ0Ci0tLSBhL21tL21lbW9yeS5jCisrKyBiL21tL21lbW9yeS5j CkBAIC0zMTUwLDYgKzMxNTAsOCBAQCB2bV9mYXVsdF90IGRvX3N3YXBfcGFnZShzdHJ1Y3Qgdm1f ZmF1bHQgKnZtZikKIAkJCQkJZ290byBvdXRfcGFnZTsKIAkJCQl9CiAKKwkJCQlzbXBfbWIoKTsK KwogCQkJCXNoYWRvdyA9IGdldF9zaGFkb3dfZnJvbV9zd2FwX2NhY2hlKGVudHJ5KTsKIAkJCQlp ZiAoc2hhZG93KQogCQkJCQl3b3JraW5nc2V0X3JlZmF1bHQocGFnZSwgc2hhZG93KTsKZGlmZiAt LWdpdCBhL21tL3N3YXBfc3RhdGUuYyBiL21tL3N3YXBfc3RhdGUuYwppbmRleCBiNzNhYWJkZmQz NWEuLjMxMGQ0MDQ5Y2RmMyAxMDA2NDQKLS0tIGEvbW0vc3dhcF9zdGF0ZS5jCisrKyBiL21tL3N3 YXBfc3RhdGUuYwpAQCAtNDk5LDYgKzQ5OSw4IEBAIHN0cnVjdCBwYWdlICpfX3JlYWRfc3dhcF9j YWNoZV9hc3luYyhzd3BfZW50cnlfdCBlbnRyeSwgZ2ZwX3QgZ2ZwX21hc2ssCiAJCWdvdG8gZmFp bF91bmxvY2s7CiAJfQogCisJc21wX21iKCk7CisKIAlpZiAoc2hhZG93KQogCQl3b3JraW5nc2V0 X3JlZmF1bHQocGFnZSwgc2hhZG93KTsKIAo= --00000000000005798e05de70220d--