Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp1229454pxf; Fri, 12 Mar 2021 05:15:30 -0800 (PST) X-Google-Smtp-Source: ABdhPJz9cjLZSkDhhCL0Jz/uC1vKSwqffLLvFODyJmuV7FaBOjOT3h+hmZwcEKvKfTszjPYGENUP X-Received: by 2002:a17:906:78d:: with SMTP id l13mr7484557ejc.97.1615554930000; Fri, 12 Mar 2021 05:15:30 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1615554929; cv=none; d=google.com; s=arc-20160816; b=IyNWWBYGUh19sLu9faAAxukVvzs7Ow5D3HElV2YPsr+sp5x4fSIVJxKGD+KYcyYPEx /fWEtHrX3Ps0z7y529kLHREAxnMOptQpUIHhde6So7MdZdvh+P2/tgR5yGRFiSxSfpVo CM986TE7OsZHWLudC13KKGKz0u1HlRwhrRd+fY5O7Cbevwiy49De4Xscwd8N1WgChj+x 1wSGinvxnsfxfMZNzbBsMfuNKipLs0azIWlwliEQ3cVRCjNlzDCtMU4WuEV3ZR2L56WH 9BcE6qISmcyaPlfVVuOFxqxd+BB/EWAFjH/USiRyKU+EQLkdCruYi0TiU48q/i/6/uVI nuXA== 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=tvpjCoady7IGByyxkS97aMgJJirlM2J40DzsaJU72mI=; b=IGzHtWyscWOW8OEDhsGJx3GitI5xGdON4L/Y4jbecqglVQTcy3ezNWmkRIfby1xMUn 97Da96Tg2QOSB5F4Rq5sF877x5RBe/GUgnDG4hZ6VRfrTBlq/cSO2jFUIWTi2QnmBYhK LpCQWn4lp5/2JX7Y4DbKCJA5mkyunSLMeXSIPPWjXjUJWD+rUHLiw2Ag/TMhUgZ/XieB BQW8rICtRo3JlOlAFIVz3JhGvnBIeKmw7LZg4vSAVN9bUlAL2XwOXRzDilwCFmX/Pkgk sDeYqXwfg3h/aKI3DUziCE5JQs7E80+OFP2y5tP9dJAZUO2vRI0Qtbwdr/6TzA/KtRGB sU0Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b="q/da4l3L"; 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 ly3si3859031ejb.615.2021.03.12.05.15.07; Fri, 12 Mar 2021 05:15:29 -0800 (PST) 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; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b="q/da4l3L"; 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 S231660AbhCLNML (ORCPT + 99 others); Fri, 12 Mar 2021 08:12:11 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42410 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231694AbhCLNLx (ORCPT ); Fri, 12 Mar 2021 08:11:53 -0500 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A3703C061761; Fri, 12 Mar 2021 05:11:53 -0800 (PST) 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=tvpjCoady7IGByyxkS97aMgJJirlM2J40DzsaJU72mI=; b=q/da4l3LIDjHrcbEUEmKLQwVSh KlSt4MSWxdLroPNerkJi+pOKPjh71eRW0Z3Lkr9JLhV89hTfarZRqDT+GPjnp+dQH94Lk1xUaN5B9 AdVWvbix78dRGQoMEJBhJiddIMDiGII81pmR782yZ7upSp4/BfevFNv1fTOoubqfek5e269323OKR x7z6lyP88+nK5pEDw1nM6WPlpCMsIGMJPgYrVBtejRD9dW/KBbLAlb0b7XXY6NqJB5zZOEHjtnecY ytmZdXoKy4ZSBBHgoqsAvWLB1qJbAO7IEWWUjXnelGzAIbdsgCl0ZQUXi9ppDu9Z7c0fUd/IgBaPz Ag7HnDpQ==; Received: from willy by casper.infradead.org with local (Exim 4.94 #2 (Red Hat Linux)) id 1lKhZb-00AiRn-V7; Fri, 12 Mar 2021 13:11:28 +0000 Date: Fri, 12 Mar 2021 13:11:23 +0000 From: Matthew Wilcox To: Luis Henriques 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: <20210312131123.GZ3479805@casper.infradead.org> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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. > > 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)