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 X-Spam-Level: X-Spam-Status: No, score=-3.5 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 06EA6C2D0A3 for ; Thu, 22 Oct 2020 00:49:28 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 44E282237B for ; Thu, 22 Oct 2020 00:49:27 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="gAQr0wgY" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 44E282237B Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=infradead.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 1EA116B005D; Wed, 21 Oct 2020 20:49:26 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 199336B0062; Wed, 21 Oct 2020 20:49:26 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 0B0C86B0068; Wed, 21 Oct 2020 20:49:26 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0196.hostedemail.com [216.40.44.196]) by kanga.kvack.org (Postfix) with ESMTP id D0E3E6B005D for ; Wed, 21 Oct 2020 20:49:25 -0400 (EDT) Received: from smtpin29.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with ESMTP id 6156B8A71F9B for ; Thu, 22 Oct 2020 00:49:25 +0000 (UTC) X-FDA: 77397727890.29.self02_1a068da2724c Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin29.hostedemail.com (Postfix) with ESMTP id 8D8F7180868FB for ; Thu, 22 Oct 2020 00:49:24 +0000 (UTC) X-HE-Tag: self02_1a068da2724c X-Filterd-Recvd-Size: 2802 Received: from casper.infradead.org (casper.infradead.org [90.155.50.34]) by imf13.hostedemail.com (Postfix) with ESMTP for ; Thu, 22 Oct 2020 00:49:22 +0000 (UTC) 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=QrzozL6sqW5vYMZtN3K+R9LE+6kDlJD77dyJBYxqbOI=; b=gAQr0wgYZsNoYp/Jxj6agcvDTx 515wMKDVLaZCnGYu1SuKbzHmqql9n3YgNNC05Hq053Ckz8OPZOOIuRYKTYzNz1bBa0XKHFVzBo06v BY+auv7WQdwFyc8/rR956Mb7tOflxn3F25od2XoCfxwYapp7OVEL5StjOLgOHgHMhBT3AWRv8oG1k pclENd55pZOwFHRzR3dueqwqHv6xVCO9jQAl2pkShBMGkO+cK15NpsZ1crZSzJGtbvsoBKC/EbNqa qe6wlh9cfBemaS/EMMK5qAmrUcwv1Wma502bIzvp7ctSSucnvbiVfIdxlO0Emlbn1L7YVWAUjQQWJ 6jZXS/xA==; Received: from willy by casper.infradead.org with local (Exim 4.92.3 #3 (Red Hat Linux)) id 1kVOmw-0007BB-RS; Thu, 22 Oct 2020 00:49:06 +0000 Date: Thu, 22 Oct 2020 01:49:06 +0100 From: Matthew Wilcox To: Qian Cai Cc: Christoph Hellwig , "Darrick J. Wong" , linux-xfs@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, Jens Axboe , linux-mm@kvack.org Subject: Re: kernel BUG at mm/page-writeback.c:2241 [ BUG_ON(PageWriteback(page); ] Message-ID: <20201022004906.GQ20115@casper.infradead.org> References: <645a3f332f37e09057c10bc32f4f298ce56049bb.camel@lca.pw> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <645a3f332f37e09057c10bc32f4f298ce56049bb.camel@lca.pw> X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Wed, Oct 21, 2020 at 08:30:18PM -0400, Qian Cai wrote: > Today's linux-next starts to trigger this wondering if anyone has any clue. I've seen that occasionally too. I changed that BUG_ON to VM_BUG_ON_PAGE to try to get a clue about it. Good to know it's not the THP patches since they aren't in linux-next. I don't understand how it can happen. We have the page locked, and then we do: if (PageWriteback(page)) { if (wbc->sync_mode != WB_SYNC_NONE) wait_on_page_writeback(page); else goto continue_unlock; } VM_BUG_ON_PAGE(PageWriteback(page), page); Nobody should be able to put this page under writeback while we have it locked ... right? The page can be redirtied by the code that's supposed to be writing it back, but I don't see how anyone can make PageWriteback true while we're holding the page lock.