From owner-freebsd-questions@FreeBSD.ORG Thu Jan 29 04:05:22 2004 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 031FC16A4CE for ; Thu, 29 Jan 2004 04:05:22 -0800 (PST) Received: from dire.bris.ac.uk (dire.bris.ac.uk [137.222.10.60]) by mx1.FreeBSD.org (Postfix) with ESMTP id 666FE43D3F for ; Thu, 29 Jan 2004 04:05:20 -0800 (PST) (envelope-from Jan.Grant@bristol.ac.uk) Received: from mail.ilrt.bris.ac.uk by dire.bris.ac.uk with SMTP-PRIV with ESMTP; Thu, 29 Jan 2004 11:58:19 +0000 Received: from cmjg (helo=localhost) by mail.ilrt.bris.ac.uk with local-esmtp (Exim 3.16 #1) id 1AmAlc-00006Z-00; Thu, 29 Jan 2004 11:55:28 +0000 Date: Thu, 29 Jan 2004 11:55:28 +0000 (GMT) From: Jan Grant X-X-Sender: cmjg@mail.ilrt.bris.ac.uk To: Piotr Gnyp In-Reply-To: Message-ID: References: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: Jan Grant cc: freebsd-questions@freebsd.org Subject: Re: Lock order reversal X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Jan 2004 12:05:22 -0000 On Thu, 29 Jan 2004, Piotr Gnyp wrote: > What is exactly lock order reversal? I`ve encountered something like > this on my console: > lock order reversal > 1st 0xc720dce4 vm object (vm object) @ vm/swap_pager.c:1323 > 2nd 0xc06c01a0 swap_pager swhash (swap_pager swhash) @ > vm/swap_pager.c:1838 > 3rd 0xc0c358c4 vm object (vm object) @ vm/uma_core.c:873 A lock is a software object that is attached to a piece of data in order to prevent multiple concurrent accesses/updates to that data getting an inconsistent picture of the data. FreeBSD "names" classes of lock depending on the objects they protect. There are situations that can arise called "deadlock" where process A holds lock x and waits for lock y; process B holds lock y and waits for lock x. Various schemes for ordering lock acquisition can be used to guarantee that deadlocks can arise. A "lock order reversal" means that the debugging watchdog in your kernel has detected that locks of two classes were acquired in different orders. -- jan grant, ILRT, University of Bristol. http://www.ilrt.bris.ac.uk/ Tel +44(0)117 9287088 Fax +44 (0)117 9287112 http://ioctl.org/jan/ If you have received this email in error, do whatever the hell you want with it. It's not like I can stop you anyway.