kern/145778: [zfs] [panic] panic in zfs_fuid_map_id (known issue fixed in opensolaris)

Alistair Phipps freebsd at alistairphipps.com
Sat May 8 19:10:05 UTC 2010


The following reply was made to PR kern/145778; it has been noted by GNATS.

From: Alistair Phipps <freebsd at alistairphipps.com>
To: bug-followup at FreeBSD.org, pjd at 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 <Address 0x2824b6b8 out of bounds>, 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 <Address 0x2824b6b8 out of bounds>, pathseg=UIO_USERSPACE,
     sbp=0xd6ac7c18) at /usr/src/sys/kern/vfs_syscalls.c:2336
 #12 0x80640666 in kern_lstat (td=0x86ff4000,
     path=0x2824b6b8 <Address 0x2824b6b8 out of bounds>, 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.


More information about the freebsd-fs mailing list