From owner-freebsd-current@FreeBSD.ORG Sun Dec 14 09:35:21 2003 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 A437A16A4CE; Sun, 14 Dec 2003 09:35:21 -0800 (PST) Received: from fledge.watson.org (fledge.watson.org [204.156.12.50]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6C52F43D35; Sun, 14 Dec 2003 09:35:18 -0800 (PST) (envelope-from robert@fledge.watson.org) Received: from fledge.watson.org (localhost [127.0.0.1]) by fledge.watson.org (8.12.10/8.12.10) with ESMTP id hBEHZ0Ud068421; Sun, 14 Dec 2003 12:35:00 -0500 (EST) (envelope-from robert@fledge.watson.org) Received: from localhost (robert@localhost)hBEHZ0BT068418; Sun, 14 Dec 2003 12:35:00 -0500 (EST) (envelope-from robert@fledge.watson.org) Date: Sun, 14 Dec 2003 12:34:59 -0500 (EST) From: Robert Watson X-Sender: robert@fledge.watson.org To: "C. Kukulies" In-Reply-To: <200312141145.hBEBjxJo016494@www.kukulies.org> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII cc: freebsd-current@freebsd.org cc: freebsd-mobile@freebsd.org Subject: Re: lock order reversals - what do they mean? 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: Sun, 14 Dec 2003 17:35:21 -0000 On Sun, 14 Dec 2003, C. Kukulies wrote: > I'm getting > lock order reversal > 1st 0xc09524c0 UMA lock (UMA lock) @ /u/src/sys/vm/uma_core.c:1200 > 2nd 0xc1431100 system map (system map) @ /u/src/sys/vm/vm_map.c:2210 > Stack backtrace: > > This happenend while doing a find . something on my notebook hd. These warnings are generated by Witness, a run-time lock diagnostic system found in FreeBSD 5-CURRENT kernels (but removed in releases). You can read more about Witness in the WITNESS(4) man page, which talks about its capabilities. Among other things, Witness performs run-time lock order verification using a combination of hard coded lock orders, and run-time detected lock orders, and generates console warnings when lock orders are violated. The intent of this is to detect the potential for deadlocks due to lock order violations; it's worth observing that Witness is actually slightly conservative, and so it's possible to get false positives. In the event that Witness is accurately reporting a lock order problem, it's basically saying "If you were unlucky, a deadlock would have happened here". There are a couple of "well known" false positives, which we need to do a better job of documenting to prevent spurious reports. The non-well-known ones typically correspond to bugs in newly added locking, as lock order reversals usually get fixed pretty quickly because Witness is busy generating warnings :-). I believe the reversal you've reported is a false positive. Thanks, Robert N M Watson FreeBSD Core Team, TrustedBSD Projects robert@fledge.watson.org Senior Research Scientist, McAfee Research