From owner-freebsd-fs@FreeBSD.ORG Sat May 8 19:10:05 2010 Return-Path: Delivered-To: freebsd-fs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 860711065674 for ; Sat, 8 May 2010 19:10:05 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [69.147.83.40]) by mx1.freebsd.org (Postfix) with ESMTP id 2C7FF8FC16 for ; Sat, 8 May 2010 19:10:05 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.4/8.14.4) with ESMTP id o48JA5tu047818 for ; Sat, 8 May 2010 19:10:05 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.4/8.14.4/Submit) id o48JA58i047816; Sat, 8 May 2010 19:10:05 GMT (envelope-from gnats) Date: Sat, 8 May 2010 19:10:05 GMT Message-Id: <201005081910.o48JA58i047816@freefall.freebsd.org> To: freebsd-fs@FreeBSD.org From: Alistair Phipps Cc: Subject: Re: kern/145778: [zfs] [panic] panic in zfs_fuid_map_id (known issue fixed in opensolaris) X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Alistair Phipps List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 08 May 2010 19:10:05 -0000 The following reply was made to PR kern/145778; it has been noted by GNATS. From: Alistair Phipps To: bug-followup@FreeBSD.org, pjd@freebsd.org Cc: Subject: Re: kern/145778: [zfs] [panic] panic in zfs_fuid_map_id (known issue fixed in opensolaris) Date: Sat, 8 May 2010 14:37:08 -0400 The box is crashing nightly with this panic when running /etc/periodic/daily/450.status-security. I figured out how to get a crash dump and think I was too hasty in associating this with the opensolaris bug. Here's the backtrace: #0 doadump () at pcpu.h:246 #1 0x805b1447 in boot (howto=260) at /usr/src/sys/kern/kern_shutdown.c:416 #2 0x805b1739 in panic (fmt=Variable "fmt" is not available. ) at /usr/src/sys/kern/kern_shutdown.c:579 #3 0x84cd17ad in zfs_fuid_map_id (zfsvfs=0x86573000, fuid=4294967314, cr=0x86a6c980, type=ZFS_GROUP) at /usr/src/sys/modules/zfs/../../cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_fuid.c:395 #4 0x84cd181f in zfs_groupmember (zfsvfs=0x86573000, id=Unhandled dwarf expression opcode 0x93 ) at /usr/src/sys/modules/zfs/../../cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_fuid.c:713 #5 0x84ce1a9d in zfs_zaccess_common (zp=0x88033000, v4_mode=Variable "v4_mode" is not available. ) at /usr/src/sys/modules/zfs/../../cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_acl.c:2292 #6 0x84ce1dc7 in zfs_zaccess (zp=0x88033000, mode=128, flags=0, skipaclchk=0, cr=0x86a6c980) at /usr/src/sys/modules/zfs/../../cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_acl.c:2411 #7 0x84cf6ab4 in zfs_freebsd_getattr (ap=0xd6ac7ac4) at /usr/src/sys/modules/zfs/../../cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c:2356 #8 0x80844ea2 in VOP_GETATTR_APV (vop=0x84d5aaa0, a=0xd6ac7ac4) at vnode_if.c:697 #9 0x806490c9 in vn_stat (vp=0x879a5c90, sb=0xd6ac7afc, active_cred=0x86a6c980, file_cred=0x0, td=0x86ff4000) at vnode_if.h:309 #10 0x806404ed in kern_statat_vnhook (td=0x86ff4000, flag=512, fd=-100, path=0x2824b6b8
, pathseg=UIO_USERSPACE, sbp=0xd6ac7c18, hook=0) at /usr/src/sys/kern/vfs_syscalls.c:2358 #11 0x8064062c in kern_statat (td=0x86ff4000, flag=512, fd=-100, path=0x2824b6b8
, pathseg=UIO_USERSPACE, sbp=0xd6ac7c18) at /usr/src/sys/kern/vfs_syscalls.c:2336 #12 0x80640666 in kern_lstat (td=0x86ff4000, path=0x2824b6b8
, pathseg=UIO_USERSPACE, sbp=0xd6ac7c18) at /usr/src/sys/kern/vfs_syscalls.c:2409 #13 0x8064070f in lstat (td=0x86ff4000, uap=0xd6ac7cf8) at /usr/src/sys/kern/vfs_syscalls.c:2399 #14 0x8082fb93 in syscall (frame=0xd6ac7d38) at /usr/src/sys/i386/i386/trap.c:1111 #15 0x80812390 in Xint0x80_syscall () at /usr/src/sys/i386/i386/exception.s:261 #16 0x00000033 in ?? () Here's the offending code: #ifdef TODO if (type == ZFS_OWNER || type == ZFS_ACE_USER) { (void) kidmap_getuidbysid(crgetzone(cr), domain, FUID_RID(fuid), &id); } else { (void) kidmap_getgidbysid(crgetzone(cr), domain, FUID_RID(fuid), &id); } #else panic(__func__); #endif The code in opensolaris doesn't have the ifdef TODO block: http://src.opensolaris.org/source/xref/systemz/sirius/usr/src/uts/common/fs/zfs/zfs_fuid.c Based on the function names, it *sounds* as if Windows/CIFS SIDs are stored instead of UIDs when a ZFS partition is accessed using the sharesmb functionality on OpenSolaris. However, sharesmb appears to not be supported under FreeBSD (reports "unsupported share protocol: 1") and it looks like FreeBSD has some unimplemented code where it will panic upon encountering files with associated SIDs set up on OpenSolaris (the TODO block above). Should this be listed on the ZFS known issues page (http://wiki.freebsd.org/ZFS)? Is there a workaround for this, e.g. some way to strip the SIDs from my ZFS? I don't have a need to preserve them. If I change the panic line to return 0, will that make the offending files owned by root? Thanks for any help.