Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp4735250iob; Sun, 8 May 2022 23:42:14 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxlvNgm1WjloeHYQyr0UAqb+WakC4rDKP/0ZjsYEPu2y/77+V/LA2ZqE26Ie52bO99bwnHY X-Received: by 2002:a17:902:cec9:b0:15e:cbf4:c246 with SMTP id d9-20020a170902cec900b0015ecbf4c246mr15436729plg.1.1652078533732; Sun, 08 May 2022 23:42:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1652078533; cv=none; d=google.com; s=arc-20160816; b=XqqF7fAgUIgNLYAF3q0GO1gcTawY/ZvDyxVf9F//IYXIc2fTiD2eusmht11apoGxbw Lc/T7kVxNdaBqtcW0Mo4VfcPUXQJs/kl6JfToxCLROZMl7derw774sw8q9uL/E20LAXZ kYPKHtll0aRR4XcXzQkhcUyhBflIBLacBoLcRqIBeW5p7lnBz8Vw71dKeTlp4haWt/+U DExWKQciFNy11V7wVL9/R/GoT7Skp8d4iaxiuXYud6Vx1RaTykOU6Dj4pXdGO9IHm+4b GA+0clvJyuLnTaI73F+pC/BBbOy4j4apWankLJMXEFY9Anb8chQkOl6am1djNbFMyeqd ZVsA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=nWu2MywQGG/lQk+6DwIYkOy+InPInu19/JISIJ1ay6c=; b=ZAG53ik8Xo/T8pDh22DTclXW5oIAO8M8WJuulcqulMYdpv7bsLuo8vWf667abbPg9X 0tpHQklawqt7Nu7n79bPIGtkSiEK88byn5avWRJodVrctTye9+NjuNg/odi9B8Gm9SlZ XG6WPQnclOatwlwEZh6kO3c1LhV7xnkWT2AsONPAIIX9+iGfRXKMc89BKdVi4sBwhxMh yj4x/7AYH/DCzFWCIzpgoYc5OP+qCDu68q/tYg2KGeTdiWkFDaizsdb00+FuNaZboMiU ApejIwR1pJIdxdeK7wTXlIBsBRRLX4sKs2jMxHGUR/rl1zJaeX5in5RWRrW/iR2EspE6 f6Gw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=S2LmFPFT; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id k22-20020a056a00169600b0050a92f7d228si14257240pfc.143.2022.05.08.23.42.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 08 May 2022 23:42:13 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=S2LmFPFT; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 626D413F421; Sun, 8 May 2022 23:40:05 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1386855AbiEGSbn (ORCPT + 99 others); Sat, 7 May 2022 14:31:43 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33306 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230521AbiEGSbl (ORCPT ); Sat, 7 May 2022 14:31:41 -0400 Received: from mail-vs1-xe31.google.com (mail-vs1-xe31.google.com [IPv6:2607:f8b0:4864:20::e31]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D77AC237CF for ; Sat, 7 May 2022 11:27:53 -0700 (PDT) Received: by mail-vs1-xe31.google.com with SMTP id e10so10215284vsr.1 for ; Sat, 07 May 2022 11:27:53 -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=kVtsz4J928KdYOrRpnIJLg1TCCXiRejH9/Rb/au7wJmvWLW6SGsvGUaimxxjFrs2Cd bNXVqp2ldVi6yJQBW6DdimB9GuWWsFry1DYRK1eeo2m66gccGiGlM32xl3kc/R4R2oeS XH2QxpW9FvLyNbM7n1mI9DvLcpaWzBq8fa4MC7nylaZ0k/cKWqb0df6LlRYuVhmC/3mx T8Ot3mdCtTRodn+Wdz0eBPPr/17Ap7SV9O6zPKIyrtAP696lfvBbSuxVNfr1UDk0c6au OFc9/KDON05XKS6eJSWV7r/0xkWw6puLUVtdvzIqI3fGLecXSYfgcKMGj2h41xQJAP2o nsdg== X-Gm-Message-State: AOAM532jadGqqeS6bYARjNck6PfuLX//0KPIj/DjFJY90H7K8zr6RACN EDI2L/XbJqnANYWvL4F/eAZYc/FHNCUvppyZ2oIAxg== 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-Spam-Status: No, score=-9.5 required=5.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE, USER_IN_DEF_DKIM_WL autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --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--