Received: by 2002:a05:6a10:9e8c:0:0:0:0 with SMTP id y12csp380619pxx; Mon, 26 Oct 2020 10:35:16 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzfnCQVxmo4mh3Qw9Pad47Rml00592tXQphZYtVg6a5xYBQqIpE9ss6ViWqRHQ3Acz1mp/R X-Received: by 2002:a17:906:c08f:: with SMTP id f15mr16148283ejz.97.1603733716542; Mon, 26 Oct 2020 10:35:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1603733716; cv=none; d=google.com; s=arc-20160816; b=lxulDYxvWU/EHqtfzVZtxd0Tex3GL9a365ubwWL9VCIdW2XxzCLdYs0VogSRojzY88 IuJ3IL8ZeYu95ZNmuqjTH7uPGP0cZKQJxp90ElaoWtYgBeCARrD1DtN+36H3PmAkL8Qe nlFaZfR5ixbPQZQ44rxafMAizj8AJ8w52OP4/SBZcxfOQ9pcQKO0DUzgvCi/uP46XUcl q8Rs4nYFgfiKiVJh3vKjgwMwLQM0uzW3snEPqwZUDJWvbaSsgtk22e9K0Tb2y29poBfb YSBY1gHYfs849WHc+rFDI259iurGl76BrhtphR3hyiFulVJ0+sFapGtEXmIFmWrOcFxq w/pw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject:dkim-signature; bh=T34Jne3WnifRc7iEE9z5MUbPKqS9loF5a16qtrLnLG8=; b=SFOIgSsFvLO9l+a+V5DiN+PInMJp40BzzuefnA1Xex7di7l+jMPlA5ESxAwjnwxquG 0Nrsj6zG1XwFIltlmiAKnuSFJ7tTqyXwZFH2voO1QiUVen19c/GODlCUROlwEQ7o7LOo qzuD9FFrXAXyBtBpdr4WY6wWRy4tz4czz0TvUNJ+4PNl8LeVGgR5LC++CQZ8trq5cVj5 e6BgUxUqSTf02p1+e2RUJYC8DgGLIcDBSejKSdwioKUC5RZvFNho6gyokVpyMOqfzuHC L+xP8/zZBr0Uu3a/tRcmpjaSj6aWHDq2saZhtdR6ZiUtMoYeyzHRzLa44M2W9/NymcEz KdBw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel-dk.20150623.gappssmtp.com header.s=20150623 header.b=j13Zm+0X; 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 x18si7118128ejn.61.2020.10.26.10.34.53; Mon, 26 Oct 2020 10:35:16 -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; dkim=pass header.i=@kernel-dk.20150623.gappssmtp.com header.s=20150623 header.b=j13Zm+0X; 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 S1780786AbgJZNzs (ORCPT + 99 others); Mon, 26 Oct 2020 09:55:48 -0400 Received: from mail-il1-f193.google.com ([209.85.166.193]:37874 "EHLO mail-il1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1780771AbgJZNzr (ORCPT ); Mon, 26 Oct 2020 09:55:47 -0400 Received: by mail-il1-f193.google.com with SMTP id y17so8381308ilg.4 for ; Mon, 26 Oct 2020 06:55:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel-dk.20150623.gappssmtp.com; s=20150623; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=T34Jne3WnifRc7iEE9z5MUbPKqS9loF5a16qtrLnLG8=; b=j13Zm+0XnwOqcOGOpuQET9O2RfehNckeb8yaPUyDzmtyqhCdwkEKn1I9C2QpMi5U9U 2lIk4rBKl1/VajB7yyDvgkoWFWMg+AuX62uIyF1Qic0dsnPlz6c/9aS7zesD/7REIdud 9ZyPYuia+JMp67LRB3AxAihbvlBN1iq+FE0G0j+9WQXZsEseZo3i218DB5TAgu15HsGv EebICGF+VNRtM0z01N9Ls10+g87Zn64WNjwWTfW0pCzyAD6QBRx6MAlM2SJfwbNg9jx/ SI7m+jC+QKREaYWL5MUj2ByZwvaq6JIhdqwZbiPkGwzZFPjkZKftD6g1QNp46MWdzJeQ KrSg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=T34Jne3WnifRc7iEE9z5MUbPKqS9loF5a16qtrLnLG8=; b=g4rdoVHU+FxiluzqgHgs8BjJyQLCOU4hrerLDe2JxU+4ThGK8G1tSNL1lAuLCUTDT4 I5GfVMTUzX7n/G29arSshlg/wdA5qgNjoPPkQfn8QBqIvB/8ndsIrpK777NT/iRs2+vF mUXXL7eyKqP+/gsE5cZ6r+42u+Miw8dpQRAxialJM/uac/AgRkGuFHndudQ2YW5xKA1e MhtHxrQ2l9bkU6Zra4iaN+s+IudwpIw1oh5UjxyRfyRQpJlD7T9FbNN4tSpm9SytCaHd u3a9iUJtVUxCiB/uvwIo9S/hp6LaLDBafRtBOfB4wzsrZilMffl1uHpSaO3RTM2fV6TJ Ywow== X-Gm-Message-State: AOAM530f5waN9WhWQ59Om3n4a4WYznYJe0OCj5Cg2MFx7IM4udrsiIrF R3GNMnfKaAKQKILc5Lr0P8NNVg== X-Received: by 2002:a05:6e02:5c7:: with SMTP id l7mr11066619ils.43.1603720545201; Mon, 26 Oct 2020 06:55:45 -0700 (PDT) Received: from [192.168.1.30] ([65.144.74.34]) by smtp.gmail.com with ESMTPSA id v85sm6156874ilk.50.2020.10.26.06.55.44 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 26 Oct 2020 06:55:44 -0700 (PDT) Subject: Re: kernel BUG at mm/page-writeback.c:2241 [ BUG_ON(PageWriteback(page); ] To: Matthew Wilcox , Jan Kara Cc: Qian Cai , Christoph Hellwig , "Darrick J. Wong" , linux-xfs@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org References: <645a3f332f37e09057c10bc32f4f298ce56049bb.camel@lca.pw> <20201022004906.GQ20115@casper.infradead.org> <20201026094948.GA29758@quack2.suse.cz> <20201026131353.GP20115@casper.infradead.org> From: Jens Axboe Message-ID: Date: Mon, 26 Oct 2020 07:55:44 -0600 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 MIME-Version: 1.0 In-Reply-To: <20201026131353.GP20115@casper.infradead.org> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 10/26/20 7:13 AM, Matthew Wilcox wrote: > On Mon, Oct 26, 2020 at 10:49:48AM +0100, Jan Kara wrote: >> On Thu 22-10-20 01:49:06, Matthew Wilcox wrote: >>> 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. >> >> FWIW here's very similar report for ext4 [1] and I strongly suspect this >> started happening after Linus' rewrite of the page bit waiting logic. Linus >> thinks it's preexisting bug which just got exposed by his changes (which is >> possible). I've been searching a culprit for some time but so far I failed. >> It's good to know it isn't ext4 specific so we should be searching in the >> generic code ;). So far I was concentrating more on ext4 bits... >> >> Honza >> >> [1] https://lore.kernel.org/lkml/000000000000d3a33205add2f7b2@google.com/ > > Oh good, I was wondering if it was an XFS bug ;-) > > I hope Qian gets it to reproduce soon with the assert because that will > tell us whether it's a spurious wakeup or someone calling SetPageWriteback > without holding the page lock. I've tried to reproduce this as well, to no avail. Qian, could you perhaps detail the setup? What kind of storage, kernel config, compiler, etc. -- Jens Axboe