From nobody@FreeBSD.org  Tue Mar 24 18:34:02 2009
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id DB2271065670
	for <freebsd-gnats-submit@FreeBSD.org>; Tue, 24 Mar 2009 18:34:02 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (www.freebsd.org [IPv6:2001:4f8:fff6::21])
	by mx1.freebsd.org (Postfix) with ESMTP id AF16C8FC14
	for <freebsd-gnats-submit@FreeBSD.org>; Tue, 24 Mar 2009 18:34:02 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (localhost [127.0.0.1])
	by www.freebsd.org (8.14.3/8.14.3) with ESMTP id n2OIY2ec028060
	for <freebsd-gnats-submit@FreeBSD.org>; Tue, 24 Mar 2009 18:34:02 GMT
	(envelope-from nobody@www.freebsd.org)
Received: (from nobody@localhost)
	by www.freebsd.org (8.14.3/8.14.3/Submit) id n2OIY2ja028059;
	Tue, 24 Mar 2009 18:34:02 GMT
	(envelope-from nobody)
Message-Id: <200903241834.n2OIY2ja028059@www.freebsd.org>
Date: Tue, 24 Mar 2009 18:34:02 GMT
From: George Wenzel <gwenzel@univaud.com>
To: freebsd-gnats-submit@FreeBSD.org
Subject: inappropriate panic caused by zfs.  Panic: zfs_fuid_create
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         133020
>Category:       kern
>Synopsis:       [zfs] [panic] inappropriate panic caused by zfs.  Panic: zfs_fuid_create
>Confidential:   no
>Severity:       serious
>Priority:       low
>Responsible:    pjd
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Tue Mar 24 18:40:04 UTC 2009
>Closed-Date:    Mon Jul 27 14:55:00 UTC 2009
>Last-Modified:  Mon Jul 27 14:55:00 UTC 2009
>Originator:     George Wenzel
>Release:        7.1 and 8.0
>Organization:
Univa UD
>Environment:
FreeBSD cfpbak01.univaud.com 8.0-CURRENT-200902 FreeBSD 8.0-CURRENT-200902 #0: Wed Mar 18 12:06:18 CDT 

2009     gwenzel@cfpbak01.univaud.com:/usr/src/sys/i386/compile/zfs  i386

>Description:
I am seeing this panic message:

Panic: zfs_fuid_create
cpuid=1
KDB: enter: Panic
[thread pid2819 tid 100215]
stopped at kdb_enter+0x3a:movl
$,kdb_why
(this is from hand-written notes, and may not be exact)

zfs is causing a panic when I try to write a file with a 64 bit "nobody" UID.

This occurs from a tar, from cp, and from rsync, and any other attempt to write a file owned by UID 4294967294.

This UID originates from the anonymous (nobody) UID -2 on a windows server.  When this UID is written to a unix NFS server, it becomes 4294967294.

More details on this UID origination are at 
http://blogs.msdn.com/sfu/pages/who-s-4294967294.aspx

Other filesystems don't have a problem with this 64bit UID.  Ideally ZFS shouldn't either, but if we don't want to support 64bit UIDs, then we should find something more useful to do than generating a panic.
>How-To-Repeat:
extract the files from the attached tar file onto a zfs filesystem.

Due to a browser bug, the file is named with .txt, but it IS a tar file.
>Fix:


Patch attached with submission follows:

PaxHeader/429496729418 uid=4294967294
20 ctime=1237918499
20 atime=1237918460
38 LIBARCHIVE.creationtime=1237910562
18 SCHILY.dev=122
22 SCHILY.ino=6712369
18 SCHILY.nlink=2
18 uid=4294967294
20 ctime=1237918471
20 atime=1237917918
38 LIBARCHIVE.creationtime=1200689912
18 SCHILY.dev=122
22 SCHILY.ino=6712461
18 SCHILY.nlink=1
18 uid=4294967294
20 ctime=1237918471
20 atime=1237917840
38 LIBARCHIVE.creationtime=1200689712
18 SCHILY.dev=122
22 SCHILY.ino=6712460
18 SCHILY.nlink=1
18 uid=4294967294
20 ctime=1237918471
20 atime=1237918384
38 LIBARCHIVE.creationtime=1200690132
18 SCHILY.dev=122
22 SCHILY.ino=6712462
18 SCHILY.nlink=1

>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-bugs->freebsd-fs 
Responsible-Changed-By: linimon 
Responsible-Changed-When: Wed Mar 25 01:14:39 UTC 2009 
Responsible-Changed-Why:  
Over to maintainer(s). 

http://www.freebsd.org/cgi/query-pr.cgi?pr=133020 
Responsible-Changed-From-To: freebsd-fs->pjd 
Responsible-Changed-By: mr 
Responsible-Changed-When: Wed Mar 25 15:57:50 UTC 2009 
Responsible-Changed-Why:  
Over to maintainer. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=133020 
State-Changed-From-To: open->feedback 
State-Changed-By: pjd 
State-Changed-When: czw 26 mar 20:15:06 2009 UTC 
State-Changed-Why:  
Could you try this patch: 

http://people.freebsd.org/~pjd/patches/zfs_znode.h.patch 

http://www.freebsd.org/cgi/query-pr.cgi?pr=133020 

From: Matt Simerson <matt@corp.spry.com>
To: bug-followup@FreeBSD.org,
 gwenzel@univaud.com
Cc:  
Subject: Re: kern/133020: [zfs] [panic] inappropriate panic caused by zfs.  Panic: zfs_fuid_create
Date: Thu, 21 May 2009 16:47:11 -0700

 I'm seeing that same bug. Not sure exactly what file tripped it, but  
 this is what gets dumped to the serial console:
 
 panic: zfs_fuid_create
 cpuid = 0
 KDB: enter: panic
 [thread pid 1063 tid 100162 ]
 Stopped at      kdb_enter+0x3d: movq    $0,0x678340(%rip)
 db>
 
 
Responsible-Changed-From-To: pjd->freebsd-fs 
Responsible-Changed-By: linimon 
Responsible-Changed-When: Thu May 28 22:25:35 UTC 2009 
Responsible-Changed-Why:  
With pjd's permission, reassing ZFS-related PRs to freebsd-fs. 

To submitter: did the suggested patch fix the problem? 

http://www.freebsd.org/cgi/query-pr.cgi?pr=133020 

From: Matt Simerson <matt@corp.spry.com>
To: bug-followup@FreeBSD.org,
 gwenzel@univaud.com
Cc:  
Subject: Re: kern/133020: [zfs] [panic] inappropriate panic caused by zfs.  Panic: zfs_fuid_create
Date: Thu, 28 May 2009 16:07:30 -0700

 I applied the patch and removed the debugging options from my 8-STABLE  
 kernel and have not seen this issue since.
State-Changed-From-To: feedback->closed 
State-Changed-By: pjd 
State-Changed-When: pon 27 lip 14:53:56 2009 UTC 
State-Changed-Why:  
Duplicate of 132337, which is now fixed in HEAD. 


Responsible-Changed-From-To: freebsd-fs->pjd 
Responsible-Changed-By: pjd 
Responsible-Changed-When: pon 27 lip 14:53:56 2009 UTC 
Responsible-Changed-Why:  
I'll take this one. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=133020 
>Unformatted:
