Date: Mon, 27 Jul 2020 00:00:11 +0000 From: bugzilla-noreply@freebsd.org To: bugs@FreeBSD.org Subject: [Bug 248286] ZFS deadlock when rename the volumes Message-ID: <bug-248286-227@https.bugs.freebsd.org/bugzilla/>
next in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D248286 Bug ID: 248286 Summary: ZFS deadlock when rename the volumes Product: Base System Version: 12.1-RELEASE Hardware: amd64 OS: Any Status: New Severity: Affects Many People Priority: --- Component: kern Assignee: bugs@FreeBSD.org Reporter: fbsd-bugzilla@aj.admwt.jp I use bhyve very heavily, and when I ran zfs rename to clean up the VM's di= sk image (ZFS Volume), the ZFS deadlocked inside the kernel. The procedure to recreate it is as follows. =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D $ gpart add -s 20g -t freebsd-zfs -a 4k -l zdead1 ada0 ada0p9 added $ zpool create -O compression=3Dlz4 -m none zbad ada0p9 $ zfs list -r zbad NAME USED AVAIL REFER MOUNTPOINT zbad 334K 18.9G 23K none $ xz -dc ~minmin/tmp/zfs/zfs-deadlock-volume.zfs.xz | zfs receive zbad/vm $ zfs list -r zbad NAME USED AVAIL REFER MOUNTPOINT zbad 2.84G 16.1G 23K none zbad/vm 2.83G 16.1G 23K none zbad/vm/debian10 975M 16.1G 961M - zbad/vm/freebsd32 977M 16.1G 977M - zbad/vm/idmdeb10 947M 16.1G 1.55G - $ zfs create zbad/vmn $ zfs list -r zbad NAME USED AVAIL REFER MOUNTPOINT zbad 2.84G 16.1G 23K none zbad/vm 2.83G 16.1G 23K none zbad/vm/debian10 975M 16.1G 961M - zbad/vm/freebsd32 977M 16.1G 977M - zbad/vm/idmdeb10 947M 16.1G 1.55G - zbad/vmn 23K 16.1G 23K none $ cat /var/tmp/zfs/deadlock pool=3Dzbad zfs rename ${pool}/vm/idmdeb10 ${pool}/vmn/idmdeb10 zfs rename ${pool}/vm/freebsd32 ${pool}/vmn/freebsd32 $ sh -x /var/tmp/zfs/deadlock + pool=3Dzbad + zfs rename zbad/vm/idmdeb10 zbad/vmn/idmdeb10 + zfs rename zbad/vm/freebsd32 zbad/vmn/freebsd32 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D The second rename operation is not finished. When sleep is placed between rename operations, deadlock does not occur and= the operation ends normally. "debian10" and "freebsd32" are bhyve disk images and "idmdeb10" is a ZFS vo= lume cloned from "debian10". I ran the same test on multiple systems and all of them had deadlocks. If you need it for the replication test, I can provide you with the "zfs-deadlock-volume.zfs.xz" image (about 1.5GB) that I used for the test. --=20 You are receiving this mail because: You are the assignee for the bug.=
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-248286-227>