From root@neptune.hub.org  Wed Apr 28 18:06:57 2004
Return-Path: <root@neptune.hub.org>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id 0F98316A4CF
	for <FreeBSD-gnats-submit@freebsd.org>; Wed, 28 Apr 2004 18:06:57 -0700 (PDT)
Received: from neptune.hub.org (neptune.hub.org [200.46.204.2])
	by mx1.FreeBSD.org (Postfix) with ESMTP id 8ED6943D2F
	for <FreeBSD-gnats-submit@freebsd.org>; Wed, 28 Apr 2004 18:06:56 -0700 (PDT)
	(envelope-from root@neptune.hub.org)
Received: from neptune.hub.org (localhost [127.0.0.1])
	by neptune.hub.org (8.12.11/8.12.10) with ESMTP id i3T16s5D016631
	for <FreeBSD-gnats-submit@freebsd.org>; Wed, 28 Apr 2004 22:06:54 -0300 (ADT)
	(envelope-from root@neptune.hub.org)
Received: (from root@localhost)
	by neptune.hub.org (8.12.11/8.12.11/Submit) id i3T16s9Y016630;
	Wed, 28 Apr 2004 22:06:54 -0300 (ADT)
	(envelope-from root)
Message-Id: <200404290106.i3T16s9Y016630@neptune.hub.org>
Date: Wed, 28 Apr 2004 22:06:54 -0300 (ADT)
From: "Marc G. Fournier" <scrappy@hub.org>
Reply-To: "Marc G. Fournier" <scrappy@hub.org>
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: panic: ufs_direnter: compact2
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         66066
>Category:       kern
>Synopsis:       [unionfs] panic: ufs_direnter: compact2
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    daichi
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Wed Apr 28 18:10:04 PDT 2004
>Closed-Date:    Tue Feb 13 06:13:20 GMT 2007
>Last-Modified:  Tue Feb 13 06:13:20 GMT 2007
>Originator:     Marc G. Fournier
>Release:        FreeBSD 4.10-PRERELEASE i386
>Organization:
>Environment:
System: FreeBSD neptune.hub.org 4.10-PRERELEASE FreeBSD 4.10-PRERELEASE #5: Fri Apr 23 23:21:57 ADT 2004 root@neptune.hub.org:/usr/obj/usr/src/sys/kernel i386


	
>Description:

Script started on Wed Apr 28 22:00:52 2004
neptune# gdb -k /usr/obj/usr/src/sys/kernel/kernel.debug vmcore.8
GNU gdb 4.18 (FreeBSD)
Copyright 1998 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "i386-unknown-freebsd"...Deprecated bfd_read called at /usr/src/gnu/usr.bin/binutils/gdb/../../../../contrib/gdb/gdb/dbxread.c line 2627 in elfstab_build_psymtabs
Deprecated bfd_read called at /usr/src/gnu/usr.bin/binutils/gdb/../../../../contrib/gdb/gdb/dbxread.c line 933 in fill_symbuf

SMP 4 cpus
IdlePTD at physical address 0x00355000
initial pcb at physical address 0x002c17e0
panicstr: ufs_direnter: compact2
panic messages:
---
panic: ufs_direnter: compact2
mp_lock = 00000001; cpuid = 0; lapic.id = 00000000
boot() called on cpu#0

syncing disks... 18 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 
giving up on 1 buffers
Uptime: 43m46s

dumping to dev #da/0x20001, offset 8913024
---
#0  dumpsys () at /usr/src/sys/kern/kern_shutdown.c:487
487		if (dumping++) {
(kgdb) where
#0  dumpsys () at /usr/src/sys/kern/kern_shutdown.c:487
#1  0x8016509f in boot (howto=256) at /usr/src/sys/kern/kern_shutdown.c:316
#2  0x80165511 in panic (fmt=0x8028a09e "ufs_direnter: compact2") at /usr/src/sys/kern/kern_shutdown.c:595
#3  0x8020b092 in ufs_direnter (dvp=0xbaca8b80, tvp=0x0, dirp=0xbc843ce0, cnp=0xbc843ebc, newdirbp=0x0)
    at /usr/src/sys/ufs/ufs/ufs_lookup.c:907
#4  0x8020dc2b in ufs_rename (ap=0xbc843e1c) at /usr/src/sys/ufs/ufs/ufs_vnops.c:1059
#5  0x8020f3c5 in ufs_vnoperate (ap=0xbc843e1c) at /usr/src/sys/ufs/ufs/ufs_vnops.c:2376
#6  0x801a4843 in union_rename (ap=0xbc843e64) at vnode_if.h:645
#7  0x80199793 in rename (p=0xbc7ca440, uap=0xbc843f80) at vnode_if.h:645
#8  0x8025c195 in syscall2 (frame={tf_fs = 47, tf_es = 47, tf_ds = 47, tf_edi = 2143288614, tf_esi = 2143288603, tf_ebp = 2143287108, 
      tf_isp = -1132183596, tf_ebx = 3, tf_edx = -1, tf_ecx = 2, tf_eax = 128, tf_trapno = 12, tf_err = 2, tf_eip = 134518708, 
      tf_cs = 31, tf_eflags = 535, tf_esp = 2143285672, tf_ss = 47}) at /usr/src/sys/i386/i386/trap.c:1175
#9  0x8024948b in Xint0x80_syscall ()
#10 0x80482f0 in ?? ()
#11 0x804813e in ?? ()
(kgdb) up 3
#3  0x8020b092 in ufs_direnter (dvp=0xbaca8b80, tvp=0x0, dirp=0xbc843ce0, cnp=0xbc843ebc, newdirbp=0x0)
    at /usr/src/sys/ufs/ufs/ufs_lookup.c:907
907				panic("ufs_direnter: compact2");
(kgdb) list
902			if (spacefree + dsize < newentrysize)
903				panic("ufs_direnter: compact1");
904			dirp->d_reclen = spacefree + dsize;
905		} else {
906			if (spacefree < newentrysize)
907				panic("ufs_direnter: compact2");
908			dirp->d_reclen = spacefree;
909			ep->d_reclen = dsize;
910			ep = (struct direct *)((char *)ep + dsize);
911		}
(kgdb) print spacefree
$1 = 12
(kgdb) print newentrysize
$2 = 24
(kgdb) quit
neptune# exit
exit

Script done on Wed Apr 28 22:01:47 2004
>How-To-Repeat:

>Fix:

	


>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->suspended 
State-Changed-By: das 
State-Changed-When: Wed Sep 22 04:56:40 GMT 2004 
State-Changed-Why:  
Suspend this awaiting the confluence of time and interest necessary to 
work on it. 

Note that this unionfs-related problem is likely to have the same root 
cause as kern/51001.  It may also be related to the fact that unionfs 
tends to leave 0-link-count files lying around in directories on 
occasion (IIRC). 

http://www.freebsd.org/cgi/query-pr.cgi?pr=66066 
Responsible-Changed-From-To: freebsd-bugs->daichi 
Responsible-Changed-By: rodrigc 
Responsible-Changed-When: Sun May 28 20:21:26 UTC 2006 
Responsible-Changed-Why:  
daichi is showing interest in unionfs 

http://www.freebsd.org/cgi/query-pr.cgi?pr=66066 
State-Changed-From-To: suspended->closed 
State-Changed-By: rodrigc 
State-Changed-When: Tue Feb 13 06:12:58 UTC 2007 
State-Changed-Why:  
New unionfs implementation has been committed to RELENG_6 and CURRENT. 
This bug report is only relevant to the previous version of unionfs. 

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