From 9bace42dc4ed1e69aaf514fd1daf6043090c3a96 Mon Sep 17 00:00:00 2001 From: Murray Stokely Date: Mon, 2 Aug 2004 05:26:07 +0000 Subject: [PATCH] Add a FAQ about lock order reversals, based on a nice explanation sent by rwatson to freebsd-current. PR: docs/68595 Submitted by: Jonathan Noack --- en_US.ISO8859-1/books/faq/book.sgml | 45 +++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) diff --git a/en_US.ISO8859-1/books/faq/book.sgml b/en_US.ISO8859-1/books/faq/book.sgml index f3cb19595a..27d6bbb152 100644 --- a/en_US.ISO8859-1/books/faq/book.sgml +++ b/en_US.ISO8859-1/books/faq/book.sgml @@ -4434,6 +4434,51 @@ kern.timecounter.hardware: TSC -> i8254 channel is numbered 0, and so on. + + + + What is a lock order reversal? + + + + &a.rwatson; answered this question very succinctly on + the freebsd-current list in a thread entitled lock + order reversals - what do they mean? + +
+ &a.rwatson; on freebsd-current, December 14, + 2003 + + 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 + &man.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 :-). +
+ + + See Bjoern + Zeeb's lock order reversal page for the status of + known lock order reversals. + +
+