ATA driver races with interrupts
will+freebsd-current at will.iki.fi
Tue Aug 3 05:51:51 PDT 2004
Daniel Eriksson wrote:
>My system also survives the stress-test after applying the patch, but it
>fails to fix all of my problems.
>One way for me to reliably mess my system up is to install
>/usr/ports/sysutils/smartmontools and then try to enable SMART on both the
>SATA discs (smartctl -s on /dev/ad20 && smartctl -s on /dev/ad22). This
>results in the first channel totally locking up, to the point where not even
>a reboot unlocks it (BIOS hangs, or if the SATA BIOS is turned off then
>FreeBSD hangs when detecting the channel on the controller). Trying to
>access the disc results in the process hanging indefinately without error
>message and with no way to kill it.
>The above problem is the same with or without your patch. However, without
>your patch I usually get an interrupt storm, followed by a detached disc and
>then a channel lockup. With your patch I get no storm and the disc is not
>detached (but the channel still locks up hard).
The patch definitely isn't a complete solution. Whether your remaining
problems are related to the same race conditions is hard to say - some
of what you're experiencing sounds different from what my problems
were. I had SMART enabled on both SATA disks even before patching
things, that didn't cause any problems.
I also didn't see interrupt storms, just the DMA state getting
confused. This was on a -current from June 29th.
Søren's patch (also posted on this thread) might be worth trying,
although its effect should be very similar to the patch that you already
>I'm not sure if this is a hardware problem or not. I've tried switching
>channels for the two discs (one Maxtor, one Western Digital), but it seems
>it is always the first channel that locks up. That seems to indicate that
>it's not a disc problem. It could still be a problem with the motherboard.
>Unfortunately I don't know how to proceed with troubleshooting this.
One thing you could try is to see if you have any problems using only
one SATA disk on the controller. If so, there's probably something
wrong that isn't related to the race conditions discussed in this thread...
More information about the freebsd-current