From owner-freebsd-current@FreeBSD.ORG Fri Aug 20 04:14:11 2004 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 8164D16A4CE for ; Fri, 20 Aug 2004 04:14:11 +0000 (GMT) Received: from fledge.watson.org (fledge.watson.org [204.156.12.50]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2B85F43D2F for ; Fri, 20 Aug 2004 04:14:11 +0000 (GMT) (envelope-from robert@fledge.watson.org) Received: from fledge.watson.org (localhost [127.0.0.1]) by fledge.watson.org (8.12.11/8.12.11) with ESMTP id i7K4C5SX022813; Fri, 20 Aug 2004 00:12:05 -0400 (EDT) (envelope-from robert@fledge.watson.org) Received: from localhost (robert@localhost)i7K4C57Y022810; Fri, 20 Aug 2004 00:12:05 -0400 (EDT) (envelope-from robert@fledge.watson.org) Date: Fri, 20 Aug 2004 00:12:05 -0400 (EDT) From: Robert Watson X-Sender: robert@fledge.watson.org To: Roman Kurakin In-Reply-To: <41252924.4020305@cronyx.ru> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII cc: freebsd-current@freebsd.org Subject: Re: Tracking down LORs X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 20 Aug 2004 04:14:11 -0000 On Fri, 20 Aug 2004, Roman Kurakin wrote: > Currently I am trying to track down a couple of LORS in my code. > But it seems that I do not undestand smth or all things id realy so bad. I find it's very helpful to add lock orders to the hard-coded lock order table in subr_witness.c. Without hard-coded entries, WITNESS will dynamically build an order based on observed lock use. This is generally fine, but once in a while the "wrong" order will be used before the "right" order, so the lock order warning will print for the "right" order, leaving less useful debugging information. The table allows the definition of partial orders, so you can specify relationships between subsets of mutexes of interest. WITNESS will flesh out remaining orders through dynamic discovery. Robert N M Watson FreeBSD Core Team, TrustedBSD Projects robert@fledge.watson.org Principal Research Scientist, McAfee Research > > So I want to ask some questions to find out if my thoughts > correct or wrong. > > 1. If I am right LOR means that we have at least two mutexs. > Lets call them a and b. If we set a, then b in first case > and b then a in second we could get dead loop, and thus LOR. > > 2. If I have some driver that have mutex a, and we have some > sytem code that could call this driver with Giant (b), we would > get LOR if driver lock a and some other part of system will > try to lock Giant? > > or I am wrong? > > rik > > > > _______________________________________________ > freebsd-current@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-current > To unsubscribe, send any mail to "freebsd-current-unsubscribe@freebsd.org" >