From nobody@FreeBSD.org  Wed Jun 28 00:33:02 2006
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id C2A1116A47B
	for <freebsd-gnats-submit@FreeBSD.org>; Wed, 28 Jun 2006 00:33:02 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (www.freebsd.org [216.136.204.117])
	by mx1.FreeBSD.org (Postfix) with ESMTP id 8AFC543E94
	for <freebsd-gnats-submit@FreeBSD.org>; Wed, 28 Jun 2006 00:07:42 +0000 (GMT)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (localhost [127.0.0.1])
	by www.freebsd.org (8.13.1/8.13.1) with ESMTP id k5S07gtZ027772
	for <freebsd-gnats-submit@FreeBSD.org>; Wed, 28 Jun 2006 00:07:42 GMT
	(envelope-from nobody@www.freebsd.org)
Received: (from nobody@localhost)
	by www.freebsd.org (8.13.1/8.13.1/Submit) id k5S07gVV027771;
	Wed, 28 Jun 2006 00:07:42 GMT
	(envelope-from nobody)
Message-Id: <200606280007.k5S07gVV027771@www.freebsd.org>
Date: Wed, 28 Jun 2006 00:07:42 GMT
From: Steve <lordrictus@hotmail.com>
To: freebsd-gnats-submit@FreeBSD.org
Subject: Powerup of sleeping IDE drives causes system reboot.
X-Send-Pr-Version: www-2.3

>Number:         99567
>Category:       kern
>Synopsis:       [ata] Powerup of sleeping IDE drives causes system reboot.
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    brucec
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Wed Jun 28 00:40:24 GMT 2006
>Closed-Date:    Fri Mar 12 23:29:46 UTC 2010
>Last-Modified:  Fri Mar 12 23:29:46 UTC 2010
>Originator:     Steve
>Release:        5.5
>Organization:
>Environment:
FreeBSD Torhelm.mil 5.5-RELEASE FreeBSD 5.5-RELEASE #0: Tue May 23 14:58:27 UTC 2006     root@perseus.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC  i386
>Description:
Occasionally, accessing a hard disk drive that is powered down causes the
system to freeze (likely a kernel panic) and then reboot.  If accessing a
powered down hard drive does not cause a lockup, then messages such as the
following are reported:

kernel: ad1: TIMEOUT - READ_DMA retrying (2 retries left) LBA=32547130

From my websearching, it seems the IDE subsystem in the 5.x branch is the
problem and 4.x and 6.x lack the issues I'm reporting.  I was hoping that
5.5 would contain the patch that Sren Schmidt released (ATA-mkIII), but
apparently that is not the case.  Note that I'm only writting this bug
report because the server has rebooted 4 times today, and WindowsXP is
starting to look much much more stable than FreeBSD.
>How-To-Repeat:

>Fix:
If one turns off powering down of hard disk drives, this would obviously
solve the problem.  The patch by Sren Schmidt may or may not also work.
Migrating to 6.x should also work.

>Release-Note:
>Audit-Trail:

From: Bruce Cran <bruce@cran.org.uk>
To: bug-followup@FreeBSD.org, lordrictus@hotmail.com
Cc:  
Subject: Re: kern/99567: [ata] Powerup of sleeping IDE drives causes system
 reboot.
Date: Sun, 10 Feb 2008 12:00:33 +0000

 It sounds like you're using ataidle to put the drives into sleep mode.  
 Since it 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.  Since there were 
 still 2 retries left, this only becomes a problem if the operation fails 
 after all the retries have been done.
 
 --
 Bruce
State-Changed-From-To: open->closed 
State-Changed-By: brucec 
State-Changed-When: Fri Mar 12 23:26:26 UTC 2010 
State-Changed-Why:  
HDD APM can cause kernel panics and hangs depending on the ata controller 
because the driver wasn't designed to have disks being spun down. 
Unfortunately the only workaround is to not run ataidle. In 8.0 and newer 
there's a new cam based driver that has built-in support for power management 
that should be more reliable. 


Responsible-Changed-From-To: freebsd-bugs->brucec  
Responsible-Changed-By: brucec 
Responsible-Changed-When: Fri Mar 12 23:26:26 UTC 2010 
Responsible-Changed-Why:  
Track. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=99567 
>Unformatted:
