Subject: kern/7906: races involving umount -f
To: None <gnats-bugs@gnats.netbsd.org>
From: Bill Sommerfeld <sommerfeld@orchard.arlington.ma.us>
List: netbsd-bugs
Date: 07/03/1999 20:51:05
>Number:         7906
>Category:       kern
>Synopsis:       umount -f has race conditions..
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    kern-bug-people (Kernel Bug People)
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sat Jul  3 20:50:01 1999
>Last-Modified:
>Originator:     Bill Sommerfeld
>Organization:
	none
>Release:        all?
>Environment:
	
System: NetBSD heap.epilogue.com 1.4 NetBSD 1.4 (HEAPII) #69: Wed Jun 23 15:44:31 EDT 1999 wes@heap.epilogue.com:/usr/sommerfeld/NetBSD-sys/arch/i386/compile/HEAPII i386


>Description:
	umount -f on an active filesystem seems to not work too well..

#2  0xf013f249 in panic (fmt=0xf0158bc9 "unmount: dangling vnode")
    at ../../../../kern/subr_prf.c:212
#3  0xf0158d0a in dounmount (mp=0xf073e200, flags=524288, p=0xfc6e4c54)
    at ../../../../kern/vfs_syscalls.c:488
#4  0xf0158bb7 in sys_unmount (p=0xfc6e4c54, v=0xfc6f3f88, retval=0xfc6f3f80)
    at ../../../../kern/vfs_syscalls.c:444
#5  0xf01eb86a in syscall (frame={tf_es = 31, tf_ds = 31, tf_edi = -272640676, 
      tf_esi = 157350, tf_ebp = -272639540, tf_ebx = 0, tf_edx = 16, 
      tf_ecx = 110, tf_eax = 22, tf_trapno = 3, tf_err = 2, tf_eip = 17319, 
      tf_cs = 23, tf_eflags = 582, tf_esp = -272640736, tf_ss = 31, 
      tf_vm86_es = 0, tf_vm86_ds = 0, tf_vm86_fs = 0, tf_vm86_gs = 0})
    at ../../../../arch/i386/i386/trap.c:782

>How-To-Repeat:
	in one console:
	
	while :
	do
		mount /dev/wd0e /mnt
		umount -f /mnt
	done

in another:
	while :
	do
		cd / ; find /mnt -type d -print
	done

>Fix:
	Unknown.  
>Audit-Trail:
>Unformatted: