Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp1476975pxj; Sat, 8 May 2021 19:30:42 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyYUv+36a1TuEDGBeQya19w3XjkxxTXLt6Tr34zCICsTjjCj7Fpvxp36zmKfnsVGUd+gLuE X-Received: by 2002:a5d:9619:: with SMTP id w25mr13564019iol.2.1620527442271; Sat, 08 May 2021 19:30:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1620527442; cv=none; d=google.com; s=arc-20160816; b=UVRvIVeOb95wvPFCpmgAFxFePQ81FwCRMRWi3Q1Njp6rsnE+UYvgfPCStNgUALKSCO 7fmaDbPK2nhLAhspGQf50QOSZz6ZwJdFny0mPvZOhpjBo201JPREfizPR7pTmJHuxGAr ead/dkY2RQXfrclDXx6alJw2RqWywM32nZF6JwUIQggAW1MtSZIogRtBacxLxV7ZEitU B/U0urwpIj0zCAo4xEV9oW2ivqeX994u3Itoj5kMQ3z1eoMwrZAH1iO2j10MOGjtdErU q8qJs5/hv88RtrUhWKgcDV5GWSj6LP0if7bwuQFm+dfA0NHeMnQ1Dmth1iVEEPY5PnsA kmag== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:message-id :mime-version:in-reply-to:references:to:subject:from:date :dkim-signature; bh=ueIl4x8R37izX0Gh+GlY985UzorU1ofhHJDIzVNG++Q=; b=QZVyGKNOYiIsLtWINXI7uLsZ+TyRTSexgtY8KaazcT6yl+lHwQeXgg07rEm7jk7Kuk +U1sawGxVfLLgTq0HiikPiWFjWcfrbMZCAV2hLFPfyXDHzGJBoHEHRNMGUMg490ctJGm uB/rcJ62JlYwaroAYe2nT5L5fcOPr98F5LHZJvTTXYJmDAcX8VVBGJrNZctQrSCgyUbC iTRzYpcvLoFim1ehlanbslNS4ETxXKCZh7lkSYwbAWCWowu86MrratEDf1A24G5xbVqu tHdEDTwF2i7kPnaO9olinmVX/WfkL3jlOowXT94wIPXJi068iJ1D4ITTT2kzcVZFW1Mm AJGQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@yahoo.ca header.s=s2048 header.b=sTD95D4g; spf=pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=yahoo.ca Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id d12si6496186ioi.7.2021.05.08.19.30.24; Sat, 08 May 2021 19:30:42 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-ext4-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=@yahoo.ca header.s=s2048 header.b=sTD95D4g; spf=pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=yahoo.ca Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229609AbhEICbF (ORCPT + 99 others); Sat, 8 May 2021 22:31:05 -0400 Received: from sonic315-55.consmr.mail.gq1.yahoo.com ([98.137.65.31]:36918 "EHLO sonic315-55.consmr.mail.gq1.yahoo.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229620AbhEICbE (ORCPT ); Sat, 8 May 2021 22:31:04 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.ca; s=s2048; t=1620527402; bh=ueIl4x8R37izX0Gh+GlY985UzorU1ofhHJDIzVNG++Q=; h=Date:From:Subject:To:References:In-Reply-To:From:Subject:Reply-To; b=sTD95D4gy+Vcqfdm9MRrhFLgK+32S9AeoOouq63VuJwOeCGgOXgTCc6ELOHmStNbQFexs593GFDvf8atd99OtINT/E1CkDbj3aAMsffzYZhg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SooHb8qZ5Pm4IF2MG kla.uUIbI2PZTBk7FVM33BJ8sqhtXaIlK2FBCV0hIqQRlzXyXTQwDSRA6AOGjM5hmsvXp0d0ZW58 _MlM0vtsremlHfHZRncsCCKuPkTvsqWlCBxwMZd8rEXKp.mJi1ptZWfGRt5P5bp3Qy4uigMm5Ssf hlmz84befS5qfZgb0ochSbn9NHxhJlEAccDIZygamDW0zZwSYopV58FBKZI4sSydeX.PYiQ0KUW4 dgSsev.ifJXe2ZOihZ7_4tj7IUdkgb1MwDiGVk4qyOcdWJ0eQoKys456W_uGuosle.GUbPxg1aQD NNukk94TvpwgwGV1k.P3bBPHDSE9aJTDa1Pjpyz_KdC2bygVz0qxaEzaoWjbtYPVrs4Cfw_88c5n 9vlPeulAjLl2qcU86wpunZtMg4mjTle_OPYMfZUs- X-Sonic-MF: Received: from sonic.gate.mail.ne1.yahoo.com by sonic315.consmr.mail.gq1.yahoo.com with HTTP; Sun, 9 May 2021 02:30:02 +0000 Received: by kubenode569.mail-prod1.omega.gq1.yahoo.com (VZM Hermes SMTP Server) with ESMTPA ID f2d11dc1d343c0ca0261cac91088d59a; Sun, 09 May 2021 02:30:00 +0000 (UTC) Date: Sat, 08 May 2021 22:29:57 -0400 From: "Alex Xu (Hello71)" Subject: Re: regression: data corruption with ext4 on LUKS on nvme with torvalds master To: linux-kernel@vger.kernel.org, linux-ext4@vger.kernel.org, dm-crypt@saout.de, linux-nvme@lists.infradead.org, linux-block@vger.kernel.org, Jens Axboe , Changheun Lee , bvanassche@acm.org, yi.zhang@redhat.com, ming.lei@redhat.com, bgoncalv@redhat.com, hch@lst.de, jaegeuk@kernel.org References: <1620493841.bxdq8r5haw.none@localhost> In-Reply-To: <1620493841.bxdq8r5haw.none@localhost> MIME-Version: 1.0 Message-Id: <1620526887.tg1zx7w5np.none@localhost> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Mailer: WebService/1.1.18231 mail.backend.jedi.jws.acl:role.jedi.acl.token.atz.jws.hermes.yahoo Apache-HttpAsyncClient/4.1.4 (Java/16) Content-Length: 2267 Precedence: bulk List-ID: X-Mailing-List: linux-ext4@vger.kernel.org Excerpts from Alex Xu (Hello71)'s message of May 8, 2021 1:54 pm: > Hi all, >=20 > Using torvalds master, I recently encountered data corruption on my ext4=20 > volume on LUKS on NVMe. Specifically, during heavy writes, the system=20 > partially hangs; SysRq-W shows that processes are blocked in the kernel=20 > on I/O. After forcibly rebooting, chunks of files are replaced with=20 > other, unrelated data. I'm not sure exactly what the data is; some of it=20 > is unknown binary data, but in at least one case, a list of file paths=20 > was inserted into a file, indicating that the data is misdirected after=20 > encryption. >=20 > This issue appears to affect files receiving writes in the temporal=20 > vicinity of the hang, but affects both new and old data: for example, my=20 > shell history file was corrupted up to many months before. >=20 > The drive reports no SMART issues. >=20 > I believe this is a regression in the kernel related to something merged=20 > in the last few days, as it consistently occurs with my most recent=20 > kernel versions, but disappears when reverting to an older kernel. >=20 > I haven't investigated further, such as by bisecting. I hope this is=20 > sufficient information to give someone a lead on the issue, and if it is=20 > a bug, nail it down before anybody else loses data. >=20 > Regards, > Alex. >=20 I found the following test to reproduce a hang, which I guess may be the=20 cause: host$ cd /tmp host$ truncate -s 10G drive host$ qemu-system-x86_64 -drive format=3Draw,file=3Ddrive,if=3Dnone,id=3Ddr= ive -device nvme,drive=3Ddrive,serial=3D1 [... more VM setup options] guest$ cryptsetup luksFormat /dev/nvme0n1 [accept warning, use any password] guest$ cryptsetup open /dev/nvme0n1 [enter password] guest$ mkfs.ext4 /dev/mapper/test [normal output...] Creating journal (16384 blocks): [hangs forever] I bisected this issue to: cd2c7545ae1beac3b6aae033c7f31193b3255946 is the first bad commit commit cd2c7545ae1beac3b6aae033c7f31193b3255946 Author: Changheun Lee Date: Mon May 3 18:52:03 2021 +0900 bio: limit bio max size I didn't try reverting this commit or further reducing the test case.=20 Let me know if you need my kernel config or other information. Regards, Alex.