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 Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3E909C433EF for ; Fri, 24 Jun 2022 23:11:33 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 546C16B00EB; Fri, 24 Jun 2022 19:11:32 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 4F7738E027D; Fri, 24 Jun 2022 19:11:32 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 3E5048E0244; Fri, 24 Jun 2022 19:11:32 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0016.hostedemail.com [216.40.44.16]) by kanga.kvack.org (Postfix) with ESMTP id 2FB9A6B00EB for ; Fri, 24 Jun 2022 19:11:32 -0400 (EDT) Received: from smtpin31.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay12.hostedemail.com (Postfix) with ESMTP id F4088120A94 for ; Fri, 24 Jun 2022 23:11:31 +0000 (UTC) X-FDA: 79614677982.31.DC48742 Received: from casper.infradead.org (casper.infradead.org [90.155.50.34]) by imf10.hostedemail.com (Postfix) with ESMTP id 1D7A5C0011 for ; Fri, 24 Jun 2022 23:11:30 +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=ZjGNfNISgbfjem4r9Vx6g9WVXgtwbymAR0AGhTv8Qnw=; b=Hz2ykpNkRL9q0TSlWX8hBc4Gvq HtqCdMeaTewLhm1F3a7tscVeF1+Z7+byBDwHI5Cw5I6GvfJ+9aey5oE8c/1cQpwK0r2u7vItbGPiI FjjhFAZ6EzN9GUfzqYJNpJ2FkgwCaeZafXTbeUcqTn5freiBiOlZbyWJeBQi4grpZOkj/+4KG3tSA UlzEus74TktmBSW1ZQKVDT7I/izIDjLbVJ5u8Ph4UT7nNIE1wd0TxJALZDlhTMqjMxNBFLsYAHCAA PNJ8Yx78+d6ympuzTlNnMVORYmxUwGkd6dtNVYDi0nAb/cp/3T8lVN9/t8kdUXZikxyHFhgp0EKsn /C/sypUA==; Received: from willy by casper.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1o4sSQ-009JhE-Ua; Fri, 24 Jun 2022 23:11:22 +0000 Date: Sat, 25 Jun 2022 00:11:22 +0100 From: Matthew Wilcox To: Nathan Chancellor Cc: Andrew Morton , linux-fsdevel@vger.kernel.org, linux-mm@kvack.org, linux-next@vger.kernel.org Subject: Re: Triggered assertion from "mm: Add an assertion that PG_private and folio->private are in sync" Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: ARC-Authentication-Results: i=1; imf10.hostedemail.com; dkim=pass header.d=infradead.org header.s=casper.20170209 header.b=Hz2ykpNk; dmarc=none; spf=none (imf10.hostedemail.com: domain of willy@infradead.org has no SPF policy when checking 90.155.50.34) smtp.mailfrom=willy@infradead.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1656112291; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=ZjGNfNISgbfjem4r9Vx6g9WVXgtwbymAR0AGhTv8Qnw=; b=ZTKBbjYcdG8wuqHSNj8mS/orH10WxOQ869NAYjZY4Cp17GKD2RvMvYtQucWMiDtJM/S2Cv nPFhitT3luZ5/DzTrbHujIV3J39UAHDGg5BpzGREZWd6bPGTRnOa+CTf2/IVjXk0AoDLWB lBNqv5538NztLGcOQK6JUqntWkXHhns= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1656112291; a=rsa-sha256; cv=none; b=YUhGMllECsFNuiwvkzgPlR4TPH6lqGBw63PqStn+H250E7Wpe9y62m/mhXryAFcmyU+iqT jdBtHLlaLTmgyqafY2cOnKazqLwVY52eSSndhILwq2H0rfOtoShGJrZ2mxjB7tSFoOTt/A FY2s4nE+dq8P2bc25CH3mdouVu3zXtI= X-Stat-Signature: wauecwed4u4w76injbs64kw9shw6nta3 X-Rspamd-Queue-Id: 1D7A5C0011 X-Rspam-User: Authentication-Results: imf10.hostedemail.com; dkim=pass header.d=infradead.org header.s=casper.20170209 header.b=Hz2ykpNk; dmarc=none; spf=none (imf10.hostedemail.com: domain of willy@infradead.org has no SPF policy when checking 90.155.50.34) smtp.mailfrom=willy@infradead.org X-Rspamd-Server: rspam12 X-HE-Tag: 1656112290-753955 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 Fri, Jun 24, 2022 at 02:58:28PM -0700, Nathan Chancellor wrote: > Hi Matthew, > > I bisected a boot failure on one of my test machines to your commit > c462f63731e0 ("mm: Add an assertion that PG_private and folio->private > are in sync"), which landed in next-20220624. I didn't see this patch > posted to any mailing list on lore, hence this separate thread; > apologies if it was and I missed it. I didn't see this reported yet but > I see the assertion triggered when systemd-zram-setup@zram0 runs: urgh, sorry about that. i really need to wean zsmalloc off using struct page. i'll drop this patch; feel free to just revert it, there's nothing that will depend on it. > zram0: detected capacity change from 0 to 16777216 > page:00000000fed1c582 refcount:1 mapcount:33 mapping:000000007b9116a6 index:0xfffffda990ac2640 pfn:0x20b5278 > aops:zsmalloc_aops ino:488c > flags: 0x2ffff000000001(locked|node=0|zone=2|lastcpupid=0xffff) > raw: 002ffff000000001 0000000000000000 dead000000000122 ffff6a6422c621fa > raw: fffffda990ac2640 ffff6a642a1e5e40 0000000100000020 0000000000000000 > page dumped because: VM_BUG_ON_FOLIO(!folio_test_swapbacked(folio) && (folio_test_private(folio) == !folio_get_private(folio))) > ------------[ cut here ]------------ > kernel BUG at mm/filemap.c:1560! > Internal error: Oops - BUG: 0 [#1] SMP > Modules linked in: zram xfs fsl_dpaa2_eth pcs_lynx phylink ahci_qoriq crct10dif_ce ghash_ce sbsa_gwdt fsl_mc_dpio nvme nvme_core xhci_plat_hcd lm90 rtc_fsl_ftm_alarm at803x xgmac_mdio ahci_platform i2c_imx ip6_tables ip_tables ipmi_devintf ipmi_msghandler fuse > CPU: 0 PID: 813 Comm: mkswap Not tainted 5.19.0-rc3-00032-gc462f63731e0 #1 > Hardware name: SolidRun Ltd. SolidRun CEX7 Platform, BIOS EDK II Jun 21 2022 > pstate: 00400005 (nzcv daif +PAN -UAO -TCO -DIT -SSBS BTYPE=--) > pc : folio_unlock+0x98/0x9c > lr : folio_unlock+0x98/0x9c > sp : ffff8000095bb680 > x29: ffff8000095bb680 x28: 0000000000001000 x27: 0000000000000000 > x26: 0000000000001000 x25: ffff6a642ab48000 x24: 0000000000000001 > x23: 0020b59770000000 x22: ffff6a642a1e5e40 x21: 0000000000000001 > x20: ffff6a642a802000 x19: fffffda990d49e00 x18: 0000000000000020 > x17: 696c6f662864656b x16: 636162706177735f x15: 747365745f6f696c > x14: 6f6621284f494c4f x13: 2929296f696c6f66 x12: 0000000000000018 > x11: 0000000000000000 x10: 0000000000000027 x9 : 0000000000000002 > x8 : 0000000100000002 x7 : 6163656220646570 x6 : 6d75642065676170 > x5 : ffffa31574652d6f x4 : 6f696c6f66286574 x3 : 65745f6f696c6f66 > x2 : 80000000ffffe314 x1 : ffffa31573961a43 x0 : 000000000000007f > Call trace: > folio_unlock+0x98/0x9c > unlock_page+0x28/0x58 > SetZsPageMovable+0x74/0x100 > zs_malloc+0x218/0x234 > __zram_bvec_write+0x158/0x458 [zram] > zram_bvec_rw+0x94/0x194 [zram] > zram_submit_bio+0x1a4/0x240 [zram] > __submit_bio+0x88/0x2f0 > submit_bio_noacct_nocheck+0xa4/0x1d8 > submit_bio_noacct+0x2e4/0x40c > submit_bio+0x100/0x13c > submit_bh_wbc+0x158/0x1a0 > __block_write_full_page+0x39c/0x700 > block_write_full_page+0x98/0xac > blkdev_writepage+0x28/0x34 > __writepage+0x2c/0xbc > write_cache_pages+0x1e4/0x44c > generic_writepages+0x54/0x80 > blkdev_writepages+0x1c/0x28 > do_writepages+0xd8/0x1c8 > filemap_fdatawrite_wbc+0x80/0xa4 > file_write_and_wait_range+0x78/0xdc > blkdev_fsync+0x24/0x48 > __arm64_sys_fsync+0x74/0xb0 > invoke_syscall+0x78/0x118 > el0_svc_common+0x94/0xfc > do_el0_svc+0x38/0xc0 > el0_svc+0x34/0x110 > el0t_64_sync_handler+0x84/0xf0 > el0t_64_sync+0x190/0x194 > Code: 17fffff5 90009781 9137e021 9401212e (d4210000) > ---[ end trace 0000000000000000 ]--- > note: mkswap[813] exited with preempt_count 3 > ------------[ cut here ]------------ > > If there is any additional information I can provide or patches I can > test, I am more than happy to do so. > > Cheers, > Nathan