From owner-cvs-all@FreeBSD.ORG Sun Oct 19 14:08:58 2003 Return-Path: Delivered-To: cvs-all@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 4C7A916A4B3; Sun, 19 Oct 2003 14:08:58 -0700 (PDT) Received: from fledge.watson.org (fledge.watson.org [204.156.12.50]) by mx1.FreeBSD.org (Postfix) with ESMTP id 102B443F85; Sun, 19 Oct 2003 14:08:54 -0700 (PDT) (envelope-from robert@fledge.watson.org) Received: from fledge.watson.org (localhost [127.0.0.1]) by fledge.watson.org (8.12.9p2/8.12.9) with ESMTP id h9JL89Mg009138; Sun, 19 Oct 2003 17:08:09 -0400 (EDT) (envelope-from robert@fledge.watson.org) Received: from localhost (robert@localhost)h9JL89Js009135; Sun, 19 Oct 2003 17:08:09 -0400 (EDT) (envelope-from robert@fledge.watson.org) Date: Sun, 19 Oct 2003 17:08:09 -0400 (EDT) From: Robert Watson X-Sender: robert@fledge.watson.org To: David Malone In-Reply-To: <200310192154.aa57999@salmon.maths.tcd.ie> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII cc: cvs-src@FreeBSD.org cc: src-committers@FreeBSD.org cc: cvs-all@FreeBSD.org cc: Kris Kennaway Subject: Re: cvs commit: src/sys/dev/streams streams.c src/sys/kern kern_descrip.c kern_event.c sys_pipe.c uipc_syscalls.c vfs_syscalls.c src/sys/opencrypto cryptodev.c X-BeenThere: cvs-all@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: CVS commit messages for the entire tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 19 Oct 2003 21:08:58 -0000 On Sun, 19 Oct 2003, David Malone wrote: > > Does this fix the filedesc LORs that have been seen for the past few months? > > Nope, 'fraid not. I was trying to make sure that we wouldn't need Giant > in syscalls that allocate file descriptors. Can you point me at a > backtrace? I can take a look, but I'm not sure I'll be able to fix them. There's fairly extensive discussion of the problem in the -current mailing list archives. My recollection is a little vague right now, but I seem to recall that there are instances of Giant being grabbed both before and after the file descriptor lock, as well as calls to fo_poll() and SYSCTL_OUT() while holding the file descriptor lock. It seemed like there was an effort to push the file descriptor lock grab before Giant, and that this was substantially complicated by some of the "deep" use of file descriptor locks in the socket and file system code. For example, some of the file descriptor handling during execve(), in kqueue_register(), unp_externalize(), the /dev/fd code, et al. We need to either pick to have the file descriptor locks in the lock order before Giant, or after Giant, and right now we're in limbo, so Witness generates lock order warnings... Robert N M Watson FreeBSD Core Team, TrustedBSD Projects robert@fledge.watson.org Network Associates Laboratories