Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 14 Dec 2003 12:34:59 -0500 (EST)
From:      Robert Watson <rwatson@freebsd.org>
To:        "C. Kukulies" <kuku@www.kukulies.org>
Cc:        freebsd-mobile@freebsd.org
Subject:   Re: lock order reversals - what do they mean?
Message-ID:  <Pine.NEB.3.96L.1031214123127.58831C-100000@fledge.watson.org>
In-Reply-To: <200312141145.hBEBjxJo016494@www.kukulies.org>

next in thread | previous in thread | raw e-mail | index | archive | help

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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.NEB.3.96L.1031214123127.58831C-100000>