Monday, November 26, 2012

Problem with SMART probing sata disk on some chipsets/sata controllers results system is freeze (ata exception frozen).




Very annoying linux / hardware bug triggered by SMART ata check it only manifests in some cases of SATA controllers and hard disks. In my case:

On M3A32-MVP DELUXE controller
Marvell Technology Group Ltd. 88SE6121 SATA II / PATA Controller

Error in /ver/log/messages looks like this:

[  115.670018] ata5.00: exception Emask 0x0 SAct 0x0 SErr 0x0 action 0x6 frozen
[  115.670027] ata5.00: failed command: SMART
[  115.670036] ata5.00: cmd b0/d0:01:00:4f:c2/00:00:00:00:00/00 tag 0 pio 512 in
         res 40/00:01:00:4f:c2/00:00:00:00:00/00 Emask 0x4 (timeout)
[  115.670039] ata5.00: status: { DRDY }
[  115.670047] ata5: hard resetting link
[  115.989123] ata5: SATA link up 3.0 Gbps (SStatus 123 SControl 300)
[  116.088351] ata5.00: configured for UDMA/133
[  116.088380] ata5: EH complete
[ 7300.699855] ata5.00: exception Emask 0x0 SAct 0x0 SErr 0x0 action 0x6 frozen
[ 7300.699863] ata5.00: failed command: IDENTIFY DEVICE
[ 7300.699872] ata5.00: cmd ec/00:01:00:00:00/00:00:00:00:00/00 tag 0 pio 512 in
         res 40/00:00:00:4f:c2/00:00:00:00:00/00 Emask 0x4 (timeout)
[ 7300.699876] ata5.00: status: { DRDY }
[ 7300.699883] ata5: hard resetting link
[ 7301.019187] ata5: SATA link up 3.0 Gbps (SStatus 123 SControl 300)
[ 7301.131523] ata5.00: configured for UDMA/133
[ 7301.131557] ata5: EH complete

Bug reports 

Solution  - testing 
Gentoo udev rules are located in /usr/lib/udev/rules.d

Locate 80-udisks.rules and remove following line:
KERNEL=="sd*[!0-9]", ATTR{removable}=="0", ENV{ID_BUS}=="ata", ENV{DEVTYPE}=="disk", IMPORT{program}="udisks-probe-ata-smart $tempnode"

Rrepeat every time after update of udev.