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=-8.8 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, MENTIONS_GIT_HOSTING,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=unavailable 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 09461C433E0 for ; Wed, 29 Jul 2020 19:54:52 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 9F2F42064B for ; Wed, 29 Jul 2020 19:54:51 +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="mhxY2fy8" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 9F2F42064B 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 D136B6B0006; Wed, 29 Jul 2020 15:54:50 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id C9B6D6B0007; Wed, 29 Jul 2020 15:54:50 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id B63126B0008; Wed, 29 Jul 2020 15:54:50 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0168.hostedemail.com [216.40.44.168]) by kanga.kvack.org (Postfix) with ESMTP id 9C6766B0006 for ; Wed, 29 Jul 2020 15:54:50 -0400 (EDT) Received: from smtpin05.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with ESMTP id 388EF180AD817 for ; Wed, 29 Jul 2020 19:54:50 +0000 (UTC) X-FDA: 77092166340.05.lead42_531319226f75 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin05.hostedemail.com (Postfix) with ESMTP id 1878F180178B8 for ; Wed, 29 Jul 2020 19:54:50 +0000 (UTC) X-HE-Tag: lead42_531319226f75 X-Filterd-Recvd-Size: 4715 Received: from casper.infradead.org (casper.infradead.org [90.155.50.34]) by imf27.hostedemail.com (Postfix) with ESMTP for ; Wed, 29 Jul 2020 19:54:49 +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=GGS573IhCZS2mOBQQ1tjPGeTS9xau0FB27cV2ohvdvQ=; b=mhxY2fy8WfWqpCc53TmJurRGOq FY53GgRdECDEss0yx1Fqcw3gb8ys3LHbAVecHiiyN/yj3sv5nXSJzyDHPudqc/Hx+g/Dky+7N5Q7g v/dBw46bA88egYez7lQAziFu+gRAUBwCwlTq7B6GT+bW10gCUlXnHbgRagMuouJe+3fbiIzhg0+m+ rXxxw0VGFqUvabNPgmbl+XZZiOzkrVefT4xDXXJrxOA/nNpSgzo1GpzNlrHNsM7K4dG1SQsKkHnBc m3LBPnYAE9ZBrBy1R4CQ5PVv3UDsJoSr3StSf5Stm225boH5Djj4cviOvAVo1khsASgZ0dP+6lc1l L2bIO+Eg==; Received: from willy by casper.infradead.org with local (Exim 4.92.3 #3 (Red Hat Linux)) id 1k0s9o-0001md-Ap; Wed, 29 Jul 2020 19:54:32 +0000 Date: Wed, 29 Jul 2020 20:54:32 +0100 From: Matthew Wilcox To: "Kirill A. Shutemov" Cc: Hillf Danton , "Kirill A. Shutemov" , Andrew Morton , syzbot , linux-kernel@vger.kernel.org, linux-mm@kvack.org, syzkaller-bugs@googlegroups.com, Mike Kravetz , Johannes Weiner , Jens Axboe , Markus Elfring Subject: Re: kernel BUG at include/linux/swapops.h:LINE! Message-ID: <20200729195432.GY23808@casper.infradead.org> References: <000000000000bc4fd705a6e090e2@google.com> <0000000000004c38cd05aad1d13f@google.com> <20200720165144.93189f7825bd28e234a42cb8@linux-foundation.org> <20200723073744.5268-1-hdanton@sina.com> <20200724111311.rcjqigtjqpkenxg6@box> <20200726164904.GG23808@casper.infradead.org> <20200727103140.xycdx6ctecomqsoe@box> <20200727120310.GJ23808@casper.infradead.org> <20200729192151.eyghcfysfzaf2ijg@box> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200729192151.eyghcfysfzaf2ijg@box> X-Rspamd-Queue-Id: 1878F180178B8 X-Spamd-Result: default: False [0.00 / 100.00] X-Rspamd-Server: rspam02 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, Jul 29, 2020 at 10:21:51PM +0300, Kirill A. Shutemov wrote: > On Mon, Jul 27, 2020 at 01:03:10PM +0100, Matthew Wilcox wrote: > > > It would be interesting to know if the migration entires ever got removed > > > for pfn. I mean if remove_migration_pte() got called for it. > > > > > > It can be rmap issue too. Maybe it misses PMD on remove_migration_ptes() > > > or something. > > > > It's not mapped with a PMD. I tweaked my debugging slightly: > > > > static inline swp_entry_t make_migration_entry(struct page *page, int write) > > { > > - BUG_ON(!PageLocked(compound_head(page))); > > + VM_BUG_ON_PAGE(!PageLocked(page), page); > > > > +if (PageHead(page)) dump_page(page, "make entry"); > > +if (PageTail(page)) printk("pfn %lx order %d\n", page_to_pfn(page), thp_order(thp_head(page))); > > > > 1523 page:0000000006f62206 refcount:490 mapcount:1 mapping:0000000000000000 index:0x562b12a00 pfn:0x1dc00 > > 1523 head:0000000006f62206 order:9 compound_mapcount:0 compound_pincount:0 > > 1523 anon flags: 0x400000000009003d(locked|uptodate|dirty|lru|active|head|swapbacked) > > 1523 raw: 400000000009003d ffffecfd41301308 ffffecfd41b08008 ffff9e9971c00059 > > 1523 raw: 0000000562b12a00 0000000000000000 000001ea00000000 0000000000000000 > > 1523 page dumped because: make entry > > 1523 pfn 1dc01 order 9 > > 1523 pfn 1dc02 order 9 > > 1523 pfn 1dc03 order 9 > > ... > > > > Notice that it's an anonymous page, so it's not related to my work. > > I don't have much hope, but could you try if the patch below would blow > up? Running it now. Results probably in twenty minutes. > Could you share the setup you use to trigger the issue? I want try it > myself. Head commit d8b18bdf9870b131802d641f5e7f32ddc53dcce3 which you can find in http://git.infradead.org/users/willy/pagecache.git I'm using Kent Overstreet's ktest as the base: https://github.com/koverstreet/ktest from the root of the kernel tree, I type: $ ../ktest/build-test-kernel run ../ktest/tests/xfs.ktest xfs.ktest is not in Kent's repo: #!/bin/bash require-kernel-config XFS_FS require-kernel-config XFS_QUOTA XFS_POSIX_ACL XFS_RT XFS_ONLINE_SCRUB require-kernel-config XFS_ONLINE_REPAIR XFS_DEBUG XFS_ASSERT_FATAL require-kernel-config QUOTA require-lib xfstests.sh run_tests() { run_xfstests xfs "$@" } I think that's all you'll need to get going.