Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp3150900pxf; Mon, 15 Mar 2021 02:48:28 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyZW77OoQiek9pxNx2LUhb9GvBy/cK1YyU0wg47aCxBFZXnDnRMYYh7m8p4jW1AvD2xretg X-Received: by 2002:a17:906:73d5:: with SMTP id n21mr22920106ejl.8.1615801708610; Mon, 15 Mar 2021 02:48:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1615801708; cv=none; d=google.com; s=arc-20160816; b=woh4Xs0ktRr/3W5I6AuymT7LRpvvpOYM8q1jJYIKCa+0vka1kTVTZzWmpriFtAboVl WUZD9CXo2gGHTQCqhTuuUURUGPPeOYPpaXL7rWXUW/EST8OcdMYn1DE0+ohncL+tSy8+ apydCdwGpc/8PEN0YzCcfVNR1TatH/xB4Fh/rbf29ATTN3IM+TlZr1BrQsAb/dhMVUrg qLqqdH/lEp/vrt/1/N3TxLAqlYZbNW5Xz3leWaFjbHK7tSVMUVFRi5Stu3XIwc66adnj p5Bi8+8vW4P/CilcbR/2Dd44Y1A3Vey8hZPFgJjCZa421P7twrovXhuvuVMw5WaqMCH7 OkOQ== 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-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=nzLN/5nlflm0E2Cp9mv/4O103XD+Edmv59dAeNoVkoQ=; b=eBFelHm3cLujeEvuPGCGjSJd3Ylj2oPxVpTCv/HK6Nda5cH3S7Fu4MYiuZmfebTfPM X5TH0TFhuv8iWpf5dk9PQNeC5UWGFDh1zgyO1+AmSrEhcdPgafc/enE2b4EMzbB0G67J eZckEwEpsJCz2PWtG7QM+OZPdcLssozxMVCTsJATMEUScqSlHbJzTF8BER8BDYgWQD6S DtzFRY7PZ8P5smtS/m7PZGJ4li0zAfDBdVq3L7YCehBHBId/rSlu7m9M2LK19XVYpR2Y A3USdR6vQnvgXGwIZHaUfX4d7K0WR22O50IKMA+45ZgBaqX/VG+NTKMURknfjBx5HKsx F7vQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-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 n12si10254968eje.173.2021.03.15.02.48.06; Mon, 15 Mar 2021 02:48:28 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229713AbhCOJrF (ORCPT + 99 others); Mon, 15 Mar 2021 05:47:05 -0400 Received: from mx2.suse.de ([195.135.220.15]:59336 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229546AbhCOJqc (ORCPT ); Mon, 15 Mar 2021 05:46:32 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id D97FDAD74; Mon, 15 Mar 2021 09:46:30 +0000 (UTC) Received: from localhost (brahms [local]) by brahms (OpenSMTPD) with ESMTPA id 335e3db6; Mon, 15 Mar 2021 09:47:45 +0000 (UTC) Date: Mon, 15 Mar 2021 09:47:45 +0000 From: Luis Henriques To: Matthew Wilcox Cc: Miklos Szeredi , "Kirill A. Shutemov" , Andrew Morton , linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: fuse: kernel BUG at mm/truncate.c:763! Message-ID: References: <20210312131123.GZ3479805@casper.infradead.org> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20210312131123.GZ3479805@casper.infradead.org> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Mar 12, 2021 at 01:11:23PM +0000, Matthew Wilcox wrote: > On Fri, Mar 12, 2021 at 12:21:59PM +0000, Luis Henriques wrote: > > > > I've seen a bug report (5.10.16 kernel splat below) that seems to be > > > > reproducible in kernels as early as 5.4. > > If this is reproducible, can you turn this BUG_ON into a VM_BUG_ON_PAGE() > so we know what kind of problem we're dealing with? Assuming the SUSE > tumbleweed kernels enable CONFIG_DEBUG_VM, which I'm sure they do. Just to make sure I got this right, you want to test something like this: } } - BUG_ON(page_mapped(page)); + VM_BUG_ON_PAGE(page_mapped(page), page); ret2 = do_launder_page(mapping, page); if (ret2 == 0) { if (!invalidate_complete_page2(mapping, page)) Cheers, -- Lu?s > > > > Page fault locks the page before installing a new pte, at least > > > AFAICS, so the BUG looks impossible. The referenced commits only > > > touch very high level control of writeback, so they may well increase > > > the chance of a bug triggering, but very unlikely to be the actual > > > cause of the bug. I'm guessing this to be an MM issue. > > > > Ok, thank you for having a look at it. > > > > Interestingly, there's a single commit to mm/truncate.c in 5.4: > > ef18a1ca847b ("mm/thp: allow dropping THP from page cache"). I'm Cc'ing > > Andrew and Kirill, maybe they have some ideas. > > That's probably not it; unless FUSE has developed the ability to insert > compound pages into the page cache without me noticing. > > (if it had, that would absolutely explain it -- i have a fix in my thp > tree for this case, but it doesn't affect any existing filesystem > because only shmem uses compound pages and it doesn't call > invalidate_inode_pages2_range)