From owner-freebsd-bugs@freebsd.org Mon Jul 27 00:00:12 2020 Return-Path: Delivered-To: freebsd-bugs@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 3B21D370620 for ; Mon, 27 Jul 2020 00:00:12 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mailman.nyi.freebsd.org (mailman.nyi.freebsd.org [IPv6:2610:1c1:1:606c::50:13]) by mx1.freebsd.org (Postfix) with ESMTP id 4BFKgb6FcBz4DdT for ; Mon, 27 Jul 2020 00:00:11 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: by mailman.nyi.freebsd.org (Postfix) id D31D93705AE; Mon, 27 Jul 2020 00:00:11 +0000 (UTC) Delivered-To: bugs@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id D2C763705AC for ; Mon, 27 Jul 2020 00:00:11 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (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-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BFKgb3XJNz4DVS for ; Mon, 27 Jul 2020 00:00:11 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2610:1c1:1:606c::50:1d]) (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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 5B24214E97 for ; Mon, 27 Jul 2020 00:00:11 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org ([127.0.1.5]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id 06R00BVR083847 for ; Mon, 27 Jul 2020 00:00:11 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 06R00B64083846 for bugs@FreeBSD.org; Mon, 27 Jul 2020 00:00:11 GMT (envelope-from bugzilla-noreply@freebsd.org) X-Authentication-Warning: kenobi.freebsd.org: www set sender to bugzilla-noreply@freebsd.org using -f From: bugzilla-noreply@freebsd.org To: bugs@FreeBSD.org Subject: [Bug 248286] ZFS deadlock when rename the volumes Date: Mon, 27 Jul 2020 00:00:11 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: kern X-Bugzilla-Version: 12.1-RELEASE X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Many People X-Bugzilla-Who: fbsd-bugzilla@aj.admwt.jp X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: bugs@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version rep_platform op_sys bug_status bug_severity priority component assigned_to reporter Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 27 Jul 2020 00:00:12 -0000 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.=