ATA driver races with interrupts

Daniel Eriksson daniel_k_eriksson at
Tue Aug 3 04:54:13 PDT 2004

Ville-Pertti Keinonen wrote:

> Partitions from ad10 and ad12 were mounted on /sata1 and /sata2, 
> respectively, both containing tens of gigabytes of files.
> By issuing
> $ find /sata1 -type f -exec md5 '{}' \; & find /sata2 -type f 
> -exec md5 
> '{}' \; &
> the system would lock up or detach one of the disks in less 
> than 5 seconds.
> With the attached version of my patch, it completed successfully.

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).

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.

/Daniel Eriksson

More information about the freebsd-current mailing list