|
Lines 4379-4384
Link Here
|
| 4379 |
channel is numbered 0, and so on.</para> |
4379 |
channel is numbered 0, and so on.</para> |
| 4380 |
</answer> |
4380 |
</answer> |
| 4381 |
</qandaentry> |
4381 |
</qandaentry> |
|
|
4382 |
|
| 4383 |
<qandaentry> |
| 4384 |
<question id="lock-order-reversal"> |
| 4385 |
<para>What is a <errorname>lock order reversal</errorname>?</para> |
| 4386 |
</question> |
| 4387 |
|
| 4388 |
<answer> |
| 4389 |
<para>&a.rwatson; answered this question very succinctly on |
| 4390 |
the freebsd-current list in a thread entitled <quote><ulink |
| 4391 |
url="http://docs.freebsd.org/cgi/getmsg.cgi?fetch=65165+0+/usr/local/www/db/text/2003/freebsd-current/20031221.freebsd-current">lock |
| 4392 |
order reversals - what do they mean?</ulink></quote></para> |
| 4393 |
|
| 4394 |
<blockquote> |
| 4395 |
<attribution>&a.rwatson; on freebsd-current, December 14, |
| 4396 |
2003</attribution> |
| 4397 |
|
| 4398 |
<para>These warnings are generated by Witness, a run-time lock |
| 4399 |
diagnostic system found in FreeBSD 5-CURRENT kernels (but |
| 4400 |
removed in releases). You can read more about Witness in the |
| 4401 |
&man.witness.4; man page, which talks about its capabilities. Among |
| 4402 |
other things, Witness performs run-time lock order verification |
| 4403 |
using a combination of hard coded lock orders, and run-time |
| 4404 |
detected lock orders, and generates console warnings when lock |
| 4405 |
orders are violated. The intent of this is to detect the |
| 4406 |
potential for deadlocks due to lock order violations; it's worth |
| 4407 |
observing that Witness is actually slightly conservative, and so |
| 4408 |
it's possible to get false positives. In the event that Witness |
| 4409 |
is accurately reporting a lock order problem, it's basically |
| 4410 |
saying "If you were unlucky, a deadlock would have happened |
| 4411 |
here". There are a couple of "well known" false positives, |
| 4412 |
which we need to do a better job of documenting to prevent |
| 4413 |
spurious reports. The non-well-known ones typically correspond |
| 4414 |
to bugs in newly added locking, as lock order reversals usually |
| 4415 |
get fixed pretty quickly because Witness is busy generating |
| 4416 |
warnings :-).</para> |
| 4417 |
</blockquote> |
| 4418 |
|
| 4419 |
<note> |
| 4420 |
<para>See <ulink |
| 4421 |
url="http://sources.zabbadoz.net/freebsd/lor.html">Bjoern |
| 4422 |
Zeeb's lock order reversal page</ulink> for the status of |
| 4423 |
known lock order reversals.</para> |
| 4424 |
</note> |
| 4425 |
</answer> |
| 4426 |
</qandaentry> |
| 4382 |
</qandaset> |
4427 |
</qandaset> |
| 4383 |
</chapter> |
4428 |
</chapter> |