Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

[Bug 207464] Panic when destroying ZFS snapshot

1 view
Skip to first unread message

bugzilla...@freebsd.org

unread,
May 5, 2016, 6:08:54 PM5/5/16
to
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=207464

dusti...@ebureau.com changed:

What |Removed |Added
----------------------------------------------------------------------------
Summary|Panic when destroying ZFS |Panic when destroying ZFS
|snapshot on boot filesystem |snapshot

--
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
freeb...@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-fs
To unsubscribe, send any mail to "freebsd-fs-...@freebsd.org"

bugzilla...@freebsd.org

unread,
May 6, 2016, 5:13:58 PM5/6/16
to
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=207464

--- Comment #17 from Howard Powell <hpo...@lighthouseinstruments.com> ---
I cannot get the proposed patch for testing to compile on a stock svn checkout
of the 10.3 base head unless I modify

VOP_UNLOCK(vp);

to

VOP_UNLOCK(vp, 0);

in the opensolaris_vfs.c section.

Compiling and testing now.

bugzilla...@freebsd.org

unread,
May 6, 2016, 5:15:13 PM5/6/16
to
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=207464

--- Comment #18 from Howard Powell <hpo...@lighthouseinstruments.com> ---
(In reply to Howard Powell from comment #11)

I can confirm that this seems to be unrelated. The kernel panic still occurs
after updating to 10.3-RELEASE-p2 today.

bugzilla...@freebsd.org

unread,
May 6, 2016, 5:22:35 PM5/6/16
to
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=207464

--- Comment #19 from Howard Powell <hpo...@lighthouseinstruments.com> ---
(In reply to Howard Powell from comment #17)

Patched the 10.3-RELEASE kernel source and recompiled. A test case of creating
a snapshot, reading the snapshot, then destroying the snapshot 100 times
finishes without a kernel panic. Looks promising.

I'm beating the hell out of the new kernel now with 5 million
create-read-destroy cycles to see what happens.

Andriy - can you elaborate on "It seems that the code has a few bugs that
_almost_ cancel out each other." - do you mean your proposed patch or the
original code had bugs?

... waiting to push a mission critical machine into production until after this
is worked out.

Thanks.

bugzilla...@freebsd.org

unread,
May 10, 2016, 4:18:32 AM5/10/16
to
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=207464

--- Comment #20 from Andriy Gapon <a...@FreeBSD.org> ---
(In reply to Howard Powell from comment #17)
Thank you for the fix. I'll update the patch.

bugzilla...@freebsd.org

unread,
May 10, 2016, 4:19:07 AM5/10/16
to
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=207464

--- Comment #21 from Andriy Gapon <a...@FreeBSD.org> ---
(In reply to Howard Powell from comment #19)
I meant the code without the patch.

bugzilla...@freebsd.org

unread,
May 10, 2016, 4:19:47 AM5/10/16
to
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=207464

Andriy Gapon <a...@FreeBSD.org> changed:

What |Removed |Added
----------------------------------------------------------------------------
CC| |freeb...@FreeBSD.org
Assignee|freeb...@FreeBSD.org |a...@FreeBSD.org

--
You are receiving this mail because:
You are on the CC list for the bug.

bugzilla...@freebsd.org

unread,
May 10, 2016, 5:37:41 AM5/10/16
to
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=207464

Andriy Gapon <a...@FreeBSD.org> changed:

What |Removed |Added
----------------------------------------------------------------------------
Attachment #170024|0 |1
is obsolete| |

--- Comment #22 from Andriy Gapon <a...@FreeBSD.org> ---
Created attachment 170172
--> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=170172&action=edit
proposed patch for testing

--
You are receiving this mail because:
You are on the CC list for the bug.

bugzilla...@freebsd.org

unread,
May 10, 2016, 4:04:44 PM5/10/16
to
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=207464

--- Comment #23 from ka...@denninger.net ---
I am running the patch at the present time -- so far no panics, but my regular
workload usually requires a few days (often as much as a week) before it
happens.

If my backup routine detects an "aw crap" (which usually comes before it goes
"boom") I'll advise.

bugzilla...@freebsd.org

unread,
May 16, 2016, 2:24:54 AM5/16/16
to
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=207464

--- Comment #24 from commi...@freebsd.org ---
A commit references this bug:

Author: avg
Date: Mon May 16 06:24:05 UTC 2016
New revision: 299900
URL: https://svnweb.freebsd.org/changeset/base/299900

Log:
zfsctl: fix several problems with reference counts

* Remove excessive references on a snapshot mountpoint vnode.
zfsctl_snapdir_lookup() called VN_HOLD() on a vnode returned from
zfsctl_snapshot_mknode() and the latter also had a call to VN_HOLD()
on the same vnode.
On top of that gfs_dir_create() already returns the vnode with the
use count of 1 (set in getnewvnode).
So there was 3 references on the vnode.

* mount_snapshot() should keep a reference to a covered vnode.
That reference is owned by the mountpoint (mounted snapshot filesystem).

* Remove cryptic manipulations of a covered vnode in zfs_umount().
FreeBSD dounmount() already does the right thing and releases the covered
vnode.

PR: 207464
Reported by: dusti...@ebureau.com
Tested by: Howard Powell <hpo...@lighthouseinstruments.com>
MFC after: 3 weeks

Changes:
head/sys/cddl/compat/opensolaris/kern/opensolaris_vfs.c
head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ctldir.c
head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c

bugzilla...@freebsd.org

unread,
May 16, 2016, 2:25:21 AM5/16/16
to
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=207464

Andriy Gapon <a...@FreeBSD.org> changed:

What |Removed |Added
----------------------------------------------------------------------------
Status|Open |In Progress

bugzilla...@freebsd.org

unread,
May 16, 2016, 3:37:57 AM5/16/16
to
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=207464

--- Comment #25 from Andriy Gapon <a...@FreeBSD.org> ---
Created attachment 170343
--> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=170343&action=edit
add-on patch

If you are testing the first patch could you please test this patch on top of
the first patch as well?

bugzilla...@freebsd.org

unread,
May 16, 2016, 3:47:52 AM5/16/16
to
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=207464

Xin LI <del...@FreeBSD.org> changed:

What |Removed |Added
----------------------------------------------------------------------------
CC| |del...@FreeBSD.org,
| |r...@FreeBSD.org

--- Comment #26 from Xin LI <del...@FreeBSD.org> ---
EN candidate?

bugzilla...@freebsd.org

unread,
May 16, 2016, 12:45:34 PM5/16/16
to
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=207464

--- Comment #27 from ka...@denninger.net ---
Comment on attachment 170343
--> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=170343
add-on patch

Rebuilding kernel to include this as well....

bugzilla...@freebsd.org

unread,
Jul 13, 2016, 5:15:07 AM7/13/16
to
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=207464

--- Comment #28 from commi...@freebsd.org ---
A commit references this bug:

Author: avg
Date: Wed Jul 13 09:14:45 UTC 2016
New revision: 302724
URL: https://svnweb.freebsd.org/changeset/base/302724

Log:
MFC r299900: zfsctl: fix several problems with reference counts

PR: 207464

Changes:
_U stable/10/
stable/10/sys/cddl/compat/opensolaris/kern/opensolaris_vfs.c
stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ctldir.c
stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c

bugzilla...@freebsd.org

unread,
Jul 13, 2016, 5:16:10 AM7/13/16
to
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=207464

--- Comment #29 from commi...@freebsd.org ---
A commit references this bug:

Author: avg
Date: Wed Jul 13 09:15:12 UTC 2016
New revision: 302725
URL: https://svnweb.freebsd.org/changeset/base/302725

Log:
MFC r299900: zfsctl: fix several problems with reference counts

PR: 207464

Changes:
_U stable/9/sys/
stable/9/sys/cddl/compat/opensolaris/kern/opensolaris_vfs.c
_U stable/9/sys/cddl/contrib/opensolaris/
stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ctldir.c
stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c

bugzilla...@freebsd.org

unread,
Jul 13, 2016, 5:16:38 AM7/13/16
to
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=207464

Andriy Gapon <a...@FreeBSD.org> changed:

What |Removed |Added
----------------------------------------------------------------------------
Resolution|--- |FIXED
Status|In Progress |Closed

bugzilla...@freebsd.org

unread,
Jul 21, 2016, 3:53:47 AM7/21/16
to
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=207464

Kubilay Kocak <ko...@FreeBSD.org> changed:

What |Removed |Added
----------------------------------------------------------------------------
Flags| |mfc-stable9+, mfc-stable10+
Keywords| |crash

--- Comment #30 from Kubilay Kocak <ko...@FreeBSD.org> ---
Correctly annotate (mfc &keywords) post-resolution
0 new messages