From nobody@FreeBSD.org  Mon Aug  1 18:35:28 2005
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id 4EFFC16A41F
	for <freebsd-gnats-submit@FreeBSD.org>; Mon,  1 Aug 2005 18:35:28 +0000 (GMT)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (www.freebsd.org [216.136.204.117])
	by mx1.FreeBSD.org (Postfix) with ESMTP id 13F9643D53
	for <freebsd-gnats-submit@FreeBSD.org>; Mon,  1 Aug 2005 18:35:28 +0000 (GMT)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (localhost [127.0.0.1])
	by www.freebsd.org (8.13.1/8.13.1) with ESMTP id j71IZRWR005737
	for <freebsd-gnats-submit@FreeBSD.org>; Mon, 1 Aug 2005 18:35:27 GMT
	(envelope-from nobody@www.freebsd.org)
Received: (from nobody@localhost)
	by www.freebsd.org (8.13.1/8.13.1/Submit) id j71IZRRJ005736;
	Mon, 1 Aug 2005 18:35:27 GMT
	(envelope-from nobody)
Message-Id: <200508011835.j71IZRRJ005736@www.freebsd.org>
Date: Mon, 1 Aug 2005 18:35:27 GMT
From: Matthias Schndehtte <msch@snafu.de>
To: freebsd-gnats-submit@FreeBSD.org
Subject: Kernelpanic during mount of UFS1+extattr
X-Send-Pr-Version: www-2.3

>Number:         84456
>Category:       kern
>Synopsis:       [panic] during mount of UFS1+extattr (with backtrace)
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    rwatson
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Mon Aug 01 18:40:08 GMT 2005
>Closed-Date:    Sun Nov 27 18:57:30 GMT 2005
>Last-Modified:  Sun Nov 27 18:57:30 GMT 2005
>Originator:     Matthias Schndehtte
>Release:        6.0-BETA1
>Organization:
private FreeBSD site
>Environment:
FreeBSD stable.alpenflugzentrum.de 6.0-BETA1 FreeBSD 6.0-BETA1 #0: Fri Jul 29 21:17:52 CEST 2005     root@stable.alpenflugzentrum.de:/usr/obj/usr/src/sys/STABLE  i386      
>Description:
During mount of an UFS1 filesystem with extended attributes the following panic occured:

Dump header from device /dev/da0s1b
 Architecture: i386
 Architecture Version: 33554432
 Dump Length: 267980800B (255 MB)
 Blocksize: 512
 Dumptime: Sat Jul 30 17:38:32 2005
 Hostname:
 Magic: FreeBSD Kernel Dump
 Version String: FreeBSD 6.0-BETA1 #0: Fri Jul 29 21:17:52 CEST 2005
   root@stable.alpenflugzentrum.de:/usr/obj/usr/src/sys/STABLE
 Panic String: lockmgr: unknown locktype request 0
 Dump Parity: 2781107745
 Bounds: 205
 Dump Status: good


Backtrace of the kernel dump:

#23 0xc054b91c in panic (fmt=0xc0729f42 "lockmgr: unknown locktype
request %d")
   at /usr/src/sys/kern/kern_shutdown.c:537
#24 0xc053cad1 in lockmgr (lkp=0xc1746c08, flags=0, interlkp=0xc07875f8,
   td=0xc1717e10) at /usr/src/sys/kern/kern_lock.c:423
#25 0xc05ab9a6 in vfs_hash_insert (vp=0xc1746bb0, hash=215, flags=0,
   td=0xc1717e10, vpp=0xd13a3760, fn=0, arg=0x0)
   at /usr/src/sys/kern/vfs_hash.c:112
#26 0xc067bf27 in ffs_vget (mp=0xc16b6000, ino=215, flags=0,
vpp=0xd13a3760)
   at pcpu.h:162
#27 0xc068831e in ufs_lookup (ap=0xd13a3838)
   at /usr/src/sys/ufs/ufs/ufs_lookup.c:571
#28 0xc0685f34 in ufs_extattr_lookup (start_dvp=0xc1746cc0,
lockparent=2,
   dirname=0x0, vp=0x0, td=0xc1717e10)
   at /usr/src/sys/ufs/ufs/ufs_extattr.c:273
#29 0xc0686623 in ufs_extattr_autostart (mp=0xc16b6000, td=0xc1717e10)
   at /usr/src/sys/ufs/ufs/ufs_extattr.c:462
#30 0xc067e35a in ffs_mount (mp=0xc16b6000, td=0xc1717e10)
   at /usr/src/sys/ufs/ffs/ffs_vfsops.c:780
#31 0xc05ae9d9 in vfs_donmount (td=0xc1717e10, fsflags=32776,
   fsoptions=0xd13a3be8) at /usr/src/sys/kern/vfs_mount.c:739
#32 0xc05b09cd in kernel_mount (ma=0xc16c6450, flags=0) at pcpu.h:162
#33 0xc067b778 in ffs_cmount (ma=0xc16c6450, data=0x0, flags=0,
td=0xc1717e10)
   at /usr/src/sys/ufs/ffs/ffs_vfsops.c:384
#34 0xc05b0707 in mount (td=0xc1717e10, uap=0xd13a3d04)
   at /usr/src/sys/kern/vfs_mount.c:566
#35 0xc06f1be0 in syscall (frame=
     {tf_fs = 59, tf_es = 59, tf_ds = 59, tf_edi = -1077943940, tf_esi
= -1077941228, tf_ebp = -1077943800, tf_isp = -784712348, tf_ebx =
-1077943760, tf_edx = 0, tf_ecx = 1, tf_eax = 21, tf_trapno = 12,
tf_err = 2, tf_eip = 671916271, tf_cs = 51, tf_eflags = 582, tf_esp =
-1077943972, tf_ss = 59})
   at /usr/src/sys/i386/i386/trap.c:986
#36 0xc06e236f in Xint0x80_syscall ()
at /usr/src/sys/i386/i386/exception.s:200


The filesystem dump look as follows:

magic   11954 (UFS1)    time    Sat Jul 30 16:38:30 2005
id      [ 3fc09aad 28e883c3 ]
ncg     52      size    4718592 blocks  4644951
bsize   16384   shift   14      mask    0xffffc000
fsize   2048    shift   11      mask    0xfffff800
frag    8       shift   3       fsbtodb 2
minfree 8%      optim   time    symlinklen 60
maxbpg  4096    maxcontig 7     contigsumsize 7
nbfree  462756  ndir    58      nifree  1164394 nffree  252
cpg     89      bpg     11392   fpg     91136   ipg     22400
nindir  4096    inopb   128     nspf    4       maxfilesize
1126174852055039
sbsize  2048    cgsize  16384   cgoffset 1024   cgmask  0xffffffff
csaddr  1424    cssize  2048
rotdelay 0ms    rps     60      trackskew 0     interleave 1
nsect   4096    npsect  4096    spc     4096
sblkno  8       cblkno  16      iblkno  24      dblkno  1424
cgrotor 36      fmod    0       ronly   0       clean   0
avgfpdir 64     avgfilesize 16384
flags   soft-updates
fsmnt   /disk
volname         swuid   0

cs[].cs_(nbfree,ndir,nifree,nffree):
       (2991,3,22392,27) (7117,0,22400,0) (7117,1,22399,7)
(7117,1,22399,7)
       (11215,0,22400,0) (7118,0,22400,0) (11215,0,22400,0)
(11215,0,22400,0)
       (7118,0,22400,0) (7118,0,22400,0) (4068,5,22252,114)
(7118,0,22400,0)
       (7118,0,22400,0) (7118,0,22400,0) (7118,0,22400,0)
(7118,0,22400,0)
       (7118,0,22400,0) (4577,0,22400,0) (7117,0,22400,0)
(7118,0,22400,0)
       (7118,0,22400,0) (7118,0,22400,0) (7118,0,22400,0)
(7118,0,22400,0)
       (7118,0,22400,0) (7118,0,22400,0) (7118,0,22400,0)
(7118,0,22400,0)
       (6916,1,22398,7) (11215,0,22400,0) (11215,0,22400,0)
(11214,1,22399,7)
       (11215,0,22400,0) (10736,1,22395,12) (11215,0,22400,0)
(11215,0,22400,0)
       (10392,0,22400,0) (11215,0,22400,0) (11215,0,22400,0)
(11215,0,22400,0)
       (11215,0,22400,0) (11215,0,22400,0) (11215,0,22400,0)
(11101,42,22163,66)
       (11214,3,22397,5) (11215,0,22400,0) (11215,0,22400,0)
(11215,0,22400,0)
       (11215,0,22400,0) (11215,0,22400,0) (11215,0,22400,0)
(8655,0,22400,0)
cylinders in last group 69
blocks in last group 8832

>How-To-Repeat:
Try to mount an UFS1 filesystem with extended attributes with an 6.0-BETA1 kernel
>Fix:
      
>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-bugs->jeff 
Responsible-Changed-By: rwatson 
Responsible-Changed-When: Wed Aug 3 11:35:02 GMT 2005 
Responsible-Changed-Why:  
Assign to jeff@ since this is likely related to SMP VFS locking.  I've 
dropped him an e-mail summary.  If it's not, please chown this back to 
me. 


http://www.freebsd.org/cgi/query-pr.cgi?pr=84456 
State-Changed-From-To: open->patched 
State-Changed-By: rwatson 
State-Changed-When: Wed Oct 12 14:50:15 GMT 2005 
State-Changed-Why:  
This bug is believed to be fixed by ufs_extattr.c:1.82, which I committed 
to CVS HEAD a few minutes ago.  I'm currently waiting for additional 
testing before I MFC the fix.  It should appear in 6.0-RC2 once MFC'd. 

Thanks for the report! 


Responsible-Changed-From-To: jeff->rwatson 
Responsible-Changed-By: rwatson 
Responsible-Changed-When: Wed Oct 12 14:50:15 GMT 2005 
Responsible-Changed-Why:  
Grab ownership of this as I believe I have fixed the change. 


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

From: Matthias Schuendehuette <msch@snafu.de>
To: bug-followup@FreeBSD.org,
 =?ISO-8859-1?Q?Matthias_Sch=FCndeh=FCtte?= <msch@snafu.de>
Cc:  
Subject: Re: kern/84456: [panic] during mount of UFS1+extattr (with backtrace)
Date: Wed, 12 Oct 2005 17:50:55 +0200

 -----BEGIN PGP SIGNED MESSAGE-----
 Hash: SHA1
 
 Sorry Robert, I was so annoyed by this bug and since I don't use  
 FreeBSD-4 any more, I newfs-ed the filesystem in question to UFS2.
 
 The only thing I'm still able to mention is, that even with UFS2, the  
 kernel paniced until I completely delete the .attribute-directory in  
 the filesystem's root.
 
 
 - -- 
 Ciao/BSD - Matthias
 
 Matthias Schuendehuette    <msch [at] snafu.de>, Berlin (Germany)
 PGP-Key at <pgp.mit.edu> and <wwwkeys.de.pgp.net> ID: 0xDDFB0A5F
 
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.1 (Darwin)
 
 iD8DBQFDTTDlf1BNcN37Cl8RArp/AKCAHQHzjrkXIWum0boo/vBEx5wXqACeI1mg
 pQHUumTrTn19H6bR9lixPCs=
 =RvKI
 -----END PGP SIGNATURE-----

From: Robert Watson <rwatson@FreeBSD.org>
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: kern/84456: [panic] during mount of UFS1+extattr (with backtrace)
Date: Wed, 12 Oct 2005 17:36:45 +0100 (BST)

 On Wed, 12 Oct 2005, Matthias Schuendehuette wrote:
 
 > Sorry Robert, I was so annoyed by this bug and since I don't use 
 > FreeBSD-4 any more, I newfs-ed the filesystem in question to UFS2.
 >
 > The only thing I'm still able to mention is, that even with UFS2, the 
 > kernel paniced until I completely delete the .attribute-directory in the 
 > filesystem's root.
 
 If you could check that this feature is gone, that would be great.  BTW, 
 with UFS2, you no longer need options UFS_EXTATTR or options 
 UFS_EXTATTR_AUTOSTART, since EA support is natively integrated into UFS2. 
 I would be interested in knowing that the panic is also gone on UFS2.
 
 Really, the UFS2 panic exists due to a bug in that the UFS1 initialization 
 code is running on UFS2, and that needs to be fixed.
 
 Robert N M Watson
State-Changed-From-To: patched->closed 
State-Changed-By: rwatson 
State-Changed-When: Sun Nov 27 18:56:51 GMT 2005 
State-Changed-Why:  
Problem believed fixed; mark as closed.  Please let me know if you are 
still experiencing this problem. 


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