Re: kbdmux vs ATA? (was: ATA related panic during ZFS scrub)



On Wed, 8 Apr 2009, Ed Schouten wrote:

* Ivan Voras <ivoras@xxxxxxxxxxx> wrote:
Hmmm, this shows a lock order problem between ATA and kbdmux's Giant.

The current state of the input layer is a mess. I guess the policy was to not pick up any locks while in the debugger. Picking up Giant there is one of the most awful things that can happen, right?

As a general rule, the low-level console interfaces should acquire at most spinlocks in normal operation (cngetc, cnputc, etc), and no locks at all when in the debugger (kdb_active). The reason for the second rule should be obvious, but the reason for the first rule is less obvious: it's called during the boot in all kinds of sensitive places as a result of calls to printf(9), so has to be willing to run under the most sticky of circumstances.

Robert N M Watson
Computer Laboratory
University of Cambridge
_______________________________________________
freebsd-current@xxxxxxxxxxx mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscribe@xxxxxxxxxxx"



Relevant Pages

  • Re: syscons(4) races
    ... the default keyboard, all those kbdd_xxxcalls ... all right, so we can not use locks, i'm guessing this includes spin ... together with a hack to allow reentering from the debugger only: ... static int scvidprobe; ...
    (freebsd-current)
  • Re: Lockup debugging
    ... I can crash the machine when it's running with ScrollLock, ... The debugger cannot break in. ... > locks up. ...
    (microsoft.public.development.device.drivers)
  • Re: Evicting a friend who lives for free in home
    ... will not be staying in the house after that date. ... way that you can claim a legitimate reason for doing so. ... they leave the house after the date, change the locks or do whatever ... if they kick up a fuss outside the door, ...
    (uk.legal)
  • Re: C# app lockup - debugging / tools
    ... Result is the system locks up and is totally unresponsive, ... The debugger does not detect any RT ... when the lockup on the handheld occurs, if I "break all", the debugger ... function passing the X,Y position of the foreground image. ...
    (microsoft.public.pocketpc.developer)
  • Re: real random
    ... The reason is because there is no way to keep the ... debugger out of a mainstream system -- i.e., ... By not showing the process that generates numbers? ...
    (comp.lang.c)