From nobody Sat Nov 04 21:34:48 2023 X-Original-To: freebsd-fs@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SN9r71ZnNz4ymwQ for ; Sat, 4 Nov 2023 21:35:03 +0000 (UTC) (envelope-from mm@FreeBSD.org) Received: from www541.your-server.de (www541.your-server.de [213.133.107.7]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4SN9r66Xkbz4Yh3 for ; Sat, 4 Nov 2023 21:35:02 +0000 (UTC) (envelope-from mm@FreeBSD.org) Authentication-Results: mx1.freebsd.org; none Received: from sslproxy03.your-server.de ([88.198.220.132]) by www541.your-server.de with esmtpsa (TLS1.3) tls TLS_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1qzOI7-0001tS-Lk; Sat, 04 Nov 2023 22:34:51 +0100 Received: from [188.167.171.2] (helo=[10.0.9.225]) by sslproxy03.your-server.de with esmtpsa (TLSv1.3:TLS_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1qzOI6-000Won-Kf; Sat, 04 Nov 2023 22:34:50 +0100 Content-Type: multipart/alternative; boundary="------------6M70tl1GHxx17km1YMm0xKtr" Message-ID: <2f93493b-a9cc-4c71-848a-efc55751a33e@FreeBSD.org> Date: Sat, 4 Nov 2023 22:34:48 +0100 List-Id: Filesystems List-Archive: https://lists.freebsd.org/archives/freebsd-fs List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-fs@freebsd.org MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: ZFS txg rollback: expected timeframe? Content-Language: en-US To: Alexander Leidinger Cc: John F Carr , freebsd-fs@freebsd.org References: <18B0B6B6-9237-42D0-9FB2-D55CE72E1CCA@mit.edu> From: Martin Matuska In-Reply-To: X-Authenticated-Sender: martin@matuska.de X-Virus-Scanned: Clear (ClamAV 0.103.10/27082/Sat Nov 4 08:38:24 2023) X-Spamd-Bar: ---- X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:24940, ipnet:213.133.96.0/19, country:DE] X-Rspamd-Queue-Id: 4SN9r66Xkbz4Yh3 This is a multi-part message in MIME format. --------------6M70tl1GHxx17km1YMm0xKtr Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Hi Alexander, I am already running block cloning with stable/14 on many production servers and also on my Ubuntu 23.10 notebook. The referenced issue appeared way before block cloning was even introduced so that is unrelated to me. Block cloning is not the same as deduplication. When copying a file with copy_file_range(2) between two datasets on the same pool, blocks of data are only referenced instead of doing a real copy. That is all magic that is being done. Did you check "zpool get bcloneused,bclonesaved poolname" before re-creating the pool? That would tell you if any blocks were cloned using block cloning at all. Cheers, Martin On 04/11/2023 18:35, Alexander Leidinger wrote: > > Am 2023-10-31 15:27, schrieb Alexander Leidinger: > >> On Tue, Oct 31, 2023 at 1:15 PM John F Carr wrote: >> >> >> >> > On Oct 31, 2023, at 06:16, Alexander Leidinger >> wrote: >> > >> > Issue: a overheating CPU may have corrupted a zpool (4 * 4TB in >> raidz2 setup) in a way that a normal import of the pool panics >> the machine with "VERIFY3(l->blk_birth == r->blk_birth) failed >> (101867360 == 101867222)". >> > >> >> I disabled that assertion because it gives a false alarm with >> some combinaion >> of deduplication, cloning, and snapshotting on one of my systems. >> >> See >> >> https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=261538 >> https://github.com/openzfs/zfs/issues/11480 >> >> I don't have deduplication on this pool. There are clones, and >> snapshots, and there could be recent ones if poudriere does some. Is >> it still a false alarm in this case? If yes, you say a kernel with >> this patch applied should let me import the pool without rollback? >> The github issue is from 2022, I have my doubts that this is the same >> issue we see. I rather expect some issues around the >> copy_file_range(2) related code for ZFS which was re-enabled 20 days >> ago (maybe it is valid to remove this assert, or maybe the block >> cloning part needs some tweak). CC Martin for the block cloning part. > > So in the end I was at least able to import the pool read-only with > the patch to disable this VERIFY3 panic. After a final incremental > backup I re-created the pool (with vfs.zfs.bclone_enabled=0) and > restored all datasets. Now some checks (this VERIFY3 part is enabled > again) and then a full backup. > > There is still the question what caused it. With the above report from > John about some issues when dedup is enabled (which wasn't on this > pool until the default of bclone_enabled was changed to 1, which is > some kind of dedup internal to ZFS as far as I was understanding the > description of block cloning in the openzfs ticket of block cloning) I > have some reservations about enabling it again. > > Martin, maybe it's a good idea to disable block cloning again, until > someone with the corresponding OpenZFS knowledge has investigated this... > > Bye, > Alexander. > > -- > http://www.Leidinger.net > Alexander@Leidinger.net: PGP 0x8F31830F9F2772BF > http://www.FreeBSD.org netchild@FreeBSD.org >  : PGP 0x8F31830F9F2772BF --------------6M70tl1GHxx17km1YMm0xKtr Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 8bit

Hi Alexander,

I am already running block cloning with stable/14 on many production servers and also on my Ubuntu 23.10 notebook. The referenced issue appeared way before block cloning was even introduced so that is unrelated to me. Block cloning is not the same as deduplication. When copying a file with copy_file_range(2) between two datasets on the same pool, blocks of data are only referenced instead of doing a real copy. That is all magic that is being done. Did you check "zpool get bcloneused,bclonesaved poolname" before re-creating the pool? That would tell you if any blocks were cloned using block cloning at all.

Cheers,
Martin

On 04/11/2023 18:35, Alexander Leidinger wrote:

Am 2023-10-31 15:27, schrieb Alexander Leidinger:

On Tue, Oct 31, 2023 at 1:15 PM John F Carr <jfc@mit.edu> wrote:


> On Oct 31, 2023, at 06:16, Alexander Leidinger <alexleidingerde@gmail.com> wrote:
>
> Issue: a overheating CPU may have corrupted a zpool (4 * 4TB in raidz2 setup) in a way that a normal import of the pool panics the machine with "VERIFY3(l->blk_birth == r->blk_birth) failed (101867360 == 101867222)".
>

I disabled that assertion because it gives a false alarm with some combinaion
of deduplication, cloning, and snapshotting on one of my systems.

See

 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=261538
 https://github.com/openzfs/zfs/issues/11480
 
I don't have deduplication on this pool. There are clones, and snapshots, and there could be recent ones if poudriere does some. Is it still a false alarm in this case? If yes, you say a kernel with this patch applied should let me import the pool without rollback?
 
The github issue is from 2022, I have my doubts that this is the same issue we see. I rather expect some issues around the copy_file_range(2) related code for ZFS which was re-enabled 20 days ago (maybe it is valid to remove this assert, or maybe the block cloning part needs some tweak). CC Martin for the block cloning part.

So in the end I was at least able to import the pool read-only with the patch to disable this VERIFY3 panic. After a final incremental backup I re-created the pool (with vfs.zfs.bclone_enabled=0) and restored all datasets. Now some checks (this VERIFY3 part is enabled again) and then a full backup.

There is still the question what caused it. With the above report from John about some issues when dedup is enabled (which wasn't on this pool until the default of bclone_enabled was changed to 1, which is some kind of dedup internal to ZFS as far as I was understanding the description of block cloning in the openzfs ticket of block cloning) I have some reservations about enabling it again.

Martin, maybe it's a good idea to disable block cloning again, until someone with the corresponding OpenZFS knowledge has investigated this...

Bye,
Alexander.

--
--------------6M70tl1GHxx17km1YMm0xKtr--