Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp858470pxf; Thu, 18 Mar 2021 13:17:24 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzR9xP58LE1POor8OcyjxN8tGfZiPtZHFy4eHYXzfEhDu4Js+ltJkoPmloRYb3/Fxh46IpJ X-Received: by 2002:a17:907:20f5:: with SMTP id rh21mr368728ejb.27.1616098644655; Thu, 18 Mar 2021 13:17:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1616098644; cv=none; d=google.com; s=arc-20160816; b=MQfRm1IDpG1T9EnluFSDXPektAqA9zRvsPAWgR2mN2xtUaAzgZisBD8Kpu8lDOXodj gIjyh/jPBv207jYQl6ijgrlv8DIOha9uChU2UdhtsHg7UTnTmGJ3JFlF7B3cJw/iozaY UHDBHrrTnMvYUTxSU4siAgtFTfvqCrcQuUuC1qWdtR4jj9HrNHWlyJNlh8lCIVzZxIoA ZUyCopHBwduVGLuFTQ6FvEr3a2DB13R51a8rRQyITospjhAUMFwoVvLxVC2krCUTj2Eq pQMP41R+xJoosTiJ3ZtL2h3jV7Tf4sLg7+KXzoWNtorWYFigKGkg4zBfDlQ0cJgoHWZX RwXg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=LTHFHulTROzVRNighBu1q8OFHj3hlf6wYWUkl34JuRo=; b=eftoWAaHrbxIZXwAHg6IdxqII/mRaHa4FzYPTTBOYhrKSxjhMvxLW5XqWLEG3+gRvL M6yoQI4ILXAgRnKrSEDk/IrurV1m6oaGWvYLFBuHr9BX7QhY4DJEMsy0bmqRA7k2rcah nb7hSDdq3hfpHctyHNYNdeYu63I45kMhaanAD3v3tX1qGjxvX730d66ju+4o4dy5qUkr c28EzukBmVcL79YSN3d2IRn6g6HVZ402AbtTLBko+1vcg3AkQ8STcqrD/G+0+iJ6dhBQ JrlkaHNXM4VEr3nSwtplqRU7I0DLAvBrMFk40ibh4WOBmX79piM+m4WHyw9vKOrq30OQ eAjQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b="H/7KweRP"; spf=pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id jl16si2456762ejc.330.2021.03.18.13.16.58; Thu, 18 Mar 2021 13:17:24 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b="H/7KweRP"; spf=pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230391AbhCRUQD (ORCPT + 99 others); Thu, 18 Mar 2021 16:16:03 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45670 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229958AbhCRUPd (ORCPT ); Thu, 18 Mar 2021 16:15:33 -0400 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 06D4CC06174A for ; Thu, 18 Mar 2021 13:15:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=LTHFHulTROzVRNighBu1q8OFHj3hlf6wYWUkl34JuRo=; b=H/7KweRP91fvPd/ZUZcyGShzMw Mt7FAR0aCuNfUf19+FizaGlkxEgDhTd/3KzBn30LwRfXGkGiJDvNuHRibqkzIUxmPQU2lESC4hL8k QhGHJL03c6mL/5q56/nAmJoQWb1ELgnlWOGlh31XY+aYt+DQH0c0MgyPjugFGCxQUZHYsUFR27Xio SREZZjNCaU/3mHKtTssUkmjCoqrqCjxi9dBHD83LSnwUrC7/5PJWUac8bRSCGNxUp6CyBTo5kA9DK Iv/nfFgFiEm0Ej9n5t8Z6bA0ldSeNWtQGVyl43LIUCtFslEml+le/lS7hwjgVb++lfOeirR39/RM+ LXHqEGHg==; Received: from willy by casper.infradead.org with local (Exim 4.94 #2 (Red Hat Linux)) id 1lMz2w-003SJB-FB; Thu, 18 Mar 2021 20:15:14 +0000 Date: Thu, 18 Mar 2021 20:15:06 +0000 From: Matthew Wilcox To: Eric Whitney Cc: linux-ext4@vger.kernel.org, tytso@mit.edu Subject: Re: generic/418 regression seen on 5.12-rc3 Message-ID: <20210318201506.GU3420@casper.infradead.org> References: <20210318181613.GA13891@localhost.localdomain> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210318181613.GA13891@localhost.localdomain> Precedence: bulk List-ID: X-Mailing-List: linux-ext4@vger.kernel.org On Thu, Mar 18, 2021 at 02:16:13PM -0400, Eric Whitney wrote: > As mentioned in today's ext4 concall, I've seen generic/418 fail from time to > time when run on 5.12-rc3 and 5.12-rc1 kernels. This first occurred when > running the 1k test case using kvm-xfstests. I was then able to bisect the > failure to a patch landed in the -rc1 merge window: > > (bd8a1f3655a7) mm/filemap: support readpage splitting a page Thanks for letting me know. This failure is new to me. I don't understand it; this patch changes the behaviour of buffered reads from waiting on a page with a refcount held to waiting on a page without the refcount held, then starting the lookup from scratch once the page is unlocked. I find it hard to believe this introduces a /new/ failure. Either it makes an existing failure easier to hit, or there's a subtle bug in the retry logic that I'm not seeing. > Typical test output resulting from a failure looks like: > > QA output created by 418 > +cmpbuf: offset 0: Expected: 0x1, got 0x0 > +[6:0] FAIL - comparison failed, offset 3072 > +diotest -w -b 512 -n 8 -i 4 failed at loop 0 > Silence is golden > ... > > I've also been able to reproduce the failure on -rc3 in the 4k test case as > well. The failure frequency there was 10 out of 100 runs. It was anywhere > from 2 to 8 failures out of 100 runs in the 1k case. > > So, the failure isn't dependent upon block size less than page size. That's a good data point. I'll take a look at g/418 and see if i can figure out what race we're hitting. Nice that it happens so often. I suppose I could get you to put some debugging in -- maybe dumping the page if we hit a contended case, then again if we're retrying? I presume it doesn't always happen at the same offset or anything convenient like that.