Subject: kern/7178: unionfs deadlock during vclean
To: None <gnats-bugs@gnats.netbsd.org>
From: Bill Sommerfeld <sommerfeld@orchard.arlington.ma.us>
List: netbsd-bugs
Date: 03/17/1999 19:34:21
>Number:         7178
>Category:       kern
>Synopsis:       unionfs deadlock during vclean
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    kern-bug-people (Kernel Bug People)
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed Mar 17 11:35:00 1999
>Last-Modified:
>Originator:     Bill Sommerfeld
>Organization:
	none
>Release:        199903xx
>Environment:

System: NetBSD orchard.arlington.ma.us 1.3K NetBSD 1.3K (ORCHARDII) #33: Fri Mar 12 12:16:33 EST 1999 sommerfeld@orchard.arlington.ma.us:/usr/src/sys/arch/i386/compile/ORCHARDII i386


>Description:

system dies with a "deadlock with self" panic.

traceback is:

	panic / lockmgr / ufs_lock / vn_lock / ?? / union_fsync 
	/ vinvalbuf / vclean / vgonel / getnewvnode / ffs_vget 
	/ ufs_lookup / lookup / nfs_namei

As best as I can tell, we have a ufs directory locked, and are
attempting to get a vnode in that directory.  we pull one off the
freelist for cleaning, and it turns out ot be a unionfs vnode wrapped
around the very directory we have locked.  *kaboom*

>How-To-Repeat:
	write to directory both via locally-mounted unionfs mount and
	to underlying filesystem of union with NFS.  get unlucky.

>Fix:
	unknown.
	probably involves stepping more carefully in vclean or vinvalbuf..
>Audit-Trail:
>Unformatted: