Bug 79409

Summary: Coming back from idles make the server reboot
Product: Base System Reporter: Arnaud de Prelle <arnaud>
Component: i386Assignee: Gavin Atkinson <gavin>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: 5.4-PRERELEASE   
Hardware: Any   
OS: Any   

Description Arnaud de Prelle 2005-03-31 20:20:05 UTC
When the ata1-master disk come back from sleep (configured by ataidle), it
is removed and I can't browse it anymore.  A manual umount makes the server
reboot.

Here are the logs for the event:
kernel: ad2: TIMEOUT - READ_DMA retrying (2 retries left) LBA=265761311
kernel: ad2: WARNING - removed from configuration
kernel: ata1-master: FAILURE - READ_DMA timed out
kernel: ata1-master: timeout state=0 unexpected

It is a new 200Go Maxtor disk:
ad2: 194481MB <Maxtor 6B200P0/BAH41BY0> [395136/16/63] at ata1-master UDMA133

Config ataidle:
/usr/local/sbin/ataidle -S 20 1 0 (in rc.local)

Fix: 

Unknown
How-To-Repeat: Unknown, not regular.
Comment 1 Gavin Atkinson freebsd_committer freebsd_triage 2008-02-21 17:19:25 UTC
State Changed
From-To: open->closed

To submitter: firstly, sorry that it has taken so long for this PR to 
be looked at.  PR kern/99567 is about the same issue, from that PR: 

"Since ataidle bypasses the kernel and talks directly to the hardware 
there are cases where it just doesn't work with certain controllers.  
Unfortunately the only solution at the moment is simply not to use it if  
it doesn't work with the combination of hardware you have. The  
READ_DMA timeouts are expected: the kernel doesn't expect to have to  
wait for a drive to spin up before data can be read. [...] This only 
becomes a problem if the operation fails after all the retries have 
been done." 

As it appears your drives take longer to spin up than the kernel is 
prepared to wait, the kernel gives up on the disk; assuming it is no 
longer there (as it has no idea that the disk was ever put to sleep). 
Apparently there is a possibility that using ataidle's standby mode 
rather than sleep mode may help with this. 

There is talk of integrating this functionality into the kernel, I don't 
know of a timeframe which this will be completed in.  You could possibly 
try upping the retries count in the ATA code to see if you are able to 
work around the problem that way, else the only answer is to not use 
ataidle on your hardware. 



Comment 2 Gavin Atkinson freebsd_committer freebsd_triage 2008-02-21 17:19:25 UTC
Responsible Changed
From-To: freebsd-i386->gavin

Track