Created attachment 175298 [details] LOR + panic with sys_extattr_get_fd() How-to-reproduce: 1) start winecfg 2) wait for 10...20 seconds uname -mrsv: FreeBSD 12.0-CURRENT FreeBSD 12.0-CURRENT #109 r306459M: Fri Sep 30 00:59:15 EEST 2016 andriy@laptop:/usr/obj.debug/usr/src/sys/CUSTOM-ACPI-DEBUG i386
Created attachment 175299 [details] LOR + panic with sys_extattr_get_file()
It seems that you have DIAGNOSTIC turned on. Thank you for testing! You can remove sections guarded with DIAGNOSTIC in zfs_vnops.c to fix the panic. The checks done there are simply incorrect for extended attributes. See https://svnweb.freebsd.org/changeset/base/306292 for a note about that.
Created attachment 175306 [details] patch for extended attributes Please try this patch. If it works for you, then I'll commit it rather than removing the diagnostic code. Thanks!
Created attachment 175316 [details] Possible fix for zfs_lookup() (sys_extattr_get_file()) Yes, it fixes panic in zfs_lock() (first attachment). For the second a possible fix is attached.
(In reply to Andriy Voskoboinyk from comment #4) (I cannot reproduce the panic with it (the LOR is still here); however, there may be needed an additional check for *vp)
A commit references this bug: Author: avg Date: Tue Oct 4 08:09:25 UTC 2016 New revision: 306665 URL: https://svnweb.freebsd.org/changeset/base/306665 Log: zfs: fix a wrong assertion for extended attributes For the extended attributes the order between z_teardown_lock and the vnode lock is different. The bug was triggered only with DIAGNOSTIC turned on. This fix is developed in cooperation with avos. PR: 213112 Reported by: avos Tested by: avos MFC after: 1 week Changes: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c
Andriy, thank you for the second part of the fix and for testing it. I believe that the LOR was always there... Does you experience differ?
No idea; I have DIAGNOSTIC / WITNESS / others enabled for a long time, so this LOR was hidden by panic anyway. BTW, the test case requires STAGING=on in wine-devel options (off by default).
A commit references this bug: Author: avg Date: Wed Oct 12 11:48:15 UTC 2016 New revision: 307142 URL: https://svnweb.freebsd.org/changeset/base/307142 Log: MFC r306665: zfs: fix a wrong assertion for extended attributes PR: 213112 Changes: _U stable/11/ stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c
A commit references this bug: Author: avg Date: Wed Oct 12 11:48:48 UTC 2016 New revision: 307143 URL: https://svnweb.freebsd.org/changeset/base/307143 Log: MFC r306665: zfs: fix a wrong assertion for extended attributes PR: 213112 Changes: _U stable/10/ stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c