Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 7 Aug 2017 17:10:28 +0200
From:      Fabian Keil <freebsd-listen@fabiankeil.de>
To:        <freebsd-fs@freebsd.org>
Subject:   [ZFS] Potential silent data corruption when receiving incremental stream with block size change on receiving side
Message-ID:  <20170807165118.72bde0a3@fabiankeil.de>

next in thread | raw e-mail | index | archive | help
--Sig_/lY=k_bwa_GISGVRQQ=iLx5/
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: quoted-printable

The problem described in:
https://github.com/zfsonlinux/zfs/issues/6224
is reproducible on FreeBSD-based systems.

The reproducer script doesn't work as is, but a slightly modified
version of it does:
https://www.fabiankeil.de/tmp/reproduce-zfsonlinux-bug-6224.sh

I've reproduced the problem on a system based on 11-STABLE r322045
but suspect that CURRENT is affected as well.

While the Github issue is titled "Silent corruption in incremental
send without -L flag with large block pool" I only became aware
of the ZFSonLinux bug after discovering silent data loss after
receiving an incremental stream that was sent with the -L flag:

[fk@test-vm ~]$ hd /usr/test/src/sbin/camcontrol/camcontrol.c
00000000  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |..............=
..|
*
0003ea10
[fk@test-vm ~]$ sudo zdb -ddddddd -bbbbbbb rpool/test/src $(stat -f '%i' /u=
sr/test/src/sbin/camcontrol/camcontrol.c)
Dataset rpool/test/src [ZPL], ID 550, cr_txg 67575, 704M, 78457 objects, ro=
otbp DVA[0]=3D<0:254bfb000:1000> DVA[1]=3D<0:3803b7000:1000> [L0 DMU objset=
] sha256 uncompressed LE contiguous unique double size=3D800L/800P birth=3D=
67755L/67755P fill=3D78457 cksum=3Dfb0fd08b71ffb3f8:e14c2e477498cdc4:482244=
0c7db2cccc:9fa4961bce0031b6

    Object  lvl   iblk   dblk  dsize  lsize   %full  type
    100844    2   128K   251K      0   251K    0.00  ZFS plain file (K=3Din=
herit) (Z=3Dinherit)
                                        168   bonus  System attributes
	dnode flags: USED_BYTES USERUSED_ACCOUNTED=20
	dnode maxblkid: 0
	path	/sbin/camcontrol/camcontrol.c
	uid     1001
	gid     1001
	atime	Sat Jul  8 18:41:59 2017
	mtime	Sat Jul  8 18:41:59 2017
	ctime	Sat Jul  8 18:41:59 2017
	crtime	Sat Jul  8 18:41:59 2017
	gen	609632
	mode	100644
	size	256529
	parent	44643
	links	1
	pflags	40800000004
Indirect blocks:
               0 L1  HOLE [L1 ZFS plain file] size=3D20000L birth=3D67755L

		segment [0000000000000000, 000000000003ec00) size  251K

In case of my incremental /usr/src transfer the data corruption is only
reproducible when not setting the -L flag so blindly omitting the flag
is not a reliable workaround.

While I hope that this is a recent regression I didn't have time to
bisect it yet.

Fabian

--Sig_/lY=k_bwa_GISGVRQQ=iLx5/
Content-Type: application/pgp-signature
Content-Description: OpenPGP digital signature

-----BEGIN PGP SIGNATURE-----

iF0EARECAB0WIQTKUNd6H/m3+ByGULIFiohV/3dUnQUCWYiC5AAKCRAFiohV/3dU
nY9tAKCGQ3JYx1sstSUneSH6PIKtOcWPVACfRUBa7ohw5IKyP7LkOgEWj6W121E=
=o0Oy
-----END PGP SIGNATURE-----

--Sig_/lY=k_bwa_GISGVRQQ=iLx5/--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20170807165118.72bde0a3>