From jspence@graendal.dyndns.org  Mon Feb 27 04:05:43 2006
Return-Path: <jspence@graendal.dyndns.org>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id 0E92916A420
	for <FreeBSD-gnats-submit@freebsd.org>; Mon, 27 Feb 2006 04:05:43 +0000 (GMT)
	(envelope-from jspence@graendal.dyndns.org)
Received: from graendal.dyndns.org (c-24-6-199-189.hsd1.ca.comcast.net [24.6.199.189])
	by mx1.FreeBSD.org (Postfix) with ESMTP id 2E55D43D49
	for <FreeBSD-gnats-submit@freebsd.org>; Mon, 27 Feb 2006 04:05:41 +0000 (GMT)
	(envelope-from jspence@graendal.dyndns.org)
Received: from graendal.dyndns.org (localhost [127.0.0.1])
	by graendal.dyndns.org (8.13.4/8.13.4) with ESMTP id k1R4AHbn000775
	for <FreeBSD-gnats-submit@freebsd.org>; Sun, 26 Feb 2006 20:10:18 -0800 (PST)
	(envelope-from jspence@graendal.dyndns.org)
Received: (from jspence@localhost)
	by graendal.dyndns.org (8.13.4/8.13.4/Submit) id k1R4AGKk000774;
	Sun, 26 Feb 2006 20:10:16 -0800 (PST)
	(envelope-from jspence)
Message-Id: <200602270410.k1R4AGKk000774@graendal.dyndns.org>
Date: Sun, 26 Feb 2006 20:10:16 -0800 (PST)
From: Jason Spence <jspence@lightconsulting.com>
Reply-To: Jason Spence <jspence@lightconsulting.com>
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: ata(4) failure: SETFEATURES SET TRANSFER MODE semaphore timeout !! DANGER Will Robinson !!
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         93885
>Category:       kern
>Synopsis:       [ata] ata(4) failure: SETFEATURES SET TRANSFER MODE semaphore timeout !! DANGER Will Robinson !!
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    jh
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Mon Feb 27 04:10:08 GMT 2006
>Closed-Date:    Sat Nov 27 18:51:43 UTC 2010
>Last-Modified:  Sat Nov 27 18:51:43 UTC 2010
>Originator:     Jason Spence <jspence@lightconsulting.com>
>Release:        FreeBSD 6.1-PRERELEASE i386
>Organization:
none
>Environment:
System: FreeBSD graendal 6.1-PRERELEASE FreeBSD 6.1-PRERELEASE #2: Sun Feb 26 18:10:01 PST 2006 root@graendal:/usr/obj/usr/src/sys/GRAENDAL i386

Via EPIA M10000 LVDS motherboard
  http://www.via.com.tw/en/products/mainboards/mini_itx/epia_m/

Promise Fasttrack TX2200
  http://www.promise.com/product/product_detail_eng.asp?segment=RAID%200/1%20HBAs&product_id=128

  atapci1@pci0:20:0:      class=0x010400 card=0x3571105a chip=0x3571105a rev=0x02 hdr=0x00
    vendor   = 'Promise Technology Inc'
    class    = mass storage
    subclass = RAID

2x  WDC WD2500JS-00MHB0 disks, firmware 02.01C03
  http://www.wdc.com/en/products/Products.asp?DriveID=135&Language=en

Disks are configured as a RAID 1 mirror, detected as ar0:
  [jspence@graendal ~]> sudo atacontrol status ar0
  ar0: ATA RAID1 subdisks: ad4 ad6 status: READY

>Description:
Under heavy disk load, such as a find / loop, the following message occurs:
  ad?: req=0x???????? SETFEATURES SET TRANSFER MODE semaphore timeout !! DANGER Will Robinson !!

tHE question mark characters change for each incident.  The message comes
from ata-queue.c.

The machine becomes unresponsive even to power button events.  A hard reset
is required.

This bug is similar to or identical to kern/91408.

>How-To-Repeat:

Duplicate the above hardware configuration.  Execute the following script:
#!/bin/sh
while true; do
	find /
done

Wait a few minutes.

>Fix:
No fix known.


>Release-Note:
>Audit-Trail:

From: Eugene Grosbein <eugen@kuzbass.ru>
To: bug-followup@freebsd.org
Cc: Jason Spence <jspence@lightconsulting.com>, sos@freebsd.org,
        jhb@freebsd.org
Subject: Re: kern/93885: ata(4) failure: SETFEATURES SET TRANSFER MODE semaphore timeout !! DANGER Will Robinson !!
Date: Fri, 3 Mar 2006 20:02:28 +0700

 > This bug is similar to or identical to kern/91408.
 
 kern/91408 seem to be closed prematurely (mea culpa).
 
 I've one more independent report about this bug.
 This may be concerned as show-stopper for 6.1-RELEASE
 
 Eugene Grosbein

From: Eugene Grosbein <eugen@kuzbass.ru>
To: bug-followup@freebsd.org
Cc: Jason Spence <jspence@lightconsulting.com>, sos@freebsd.org
Subject: Re: kern/93885 : ata(4) failure: SETFEATURES SET TRANSFER MODE semaphore timeout !! DANGER Will Robinson !!
Date: Fri, 3 Mar 2006 23:02:10 +0700

 Hi!
 
 I've updated my sources to RELENG_6
 (and grabbed src/sys/dev/ata/ata-all.c,v 1.252.2.6), rebuild and booted
 new kernel.
 
 Now deadlock is gone but the system suffers from temporary delays
 accessing the drive. The kernel is signalling:
 
 ad4: WARNING - SETFEATURES SET TRANSFER MODE taskqueue timeout - completing request directly
 ad4: WARNING - SETFEATURES SET TRANSFER MODE taskqueue timeout - completing request directly
 ad4: WARNING - SETFEATURES ENABLE RCACHE taskqueue timeout - completing request directly
 ad4: WARNING - SETFEATURES ENABLE WCACHE taskqueue timeout - completing request directly
 ad4: WARNING - SET_MULTI taskqueue timeout - completing request directly
 ad4: TIMEOUT - WRITE_DMA retrying (1 retry left) LBA=100861733
 ad6: TIMEOUT - WRITE_DMA retrying (1 retry left) LBA=62118768
 ad4: WARNING - SETFEATURES SET TRANSFER MODE taskqueue timeout - completing request directly
 ad4: WARNING - SETFEATURES SET TRANSFER MODE taskqueue timeout - completing request directly
 ad4: WARNING - SETFEATURES ENABLE RCACHE taskqueue timeout - completing request directly
 ad4: WARNING - SETFEATURES ENABLE WCACHE taskqueue timeout - completing request directly
 ad4: WARNING - SET_MULTI taskqueue timeout - completing request directly
 ad4: TIMEOUT - WRITE_DMA retrying (1 retry left) LBA=100861989
 ad6: TIMEOUT - WRITE_DMA retrying (1 retry left) LBA=62184272
 ad4: WARNING - SETFEATURES SET TRANSFER MODE taskqueue timeout - completing request directly
 ad4: WARNING - SETFEATURES SET TRANSFER MODE taskqueue timeout - completing request directly
 ad4: WARNING - SETFEATURES ENABLE RCACHE taskqueue timeout - completing request directly
 ad4: WARNING - SETFEATURES ENABLE WCACHE taskqueue timeout - completing request directly
 ad4: WARNING - SET_MULTI taskqueue timeout - completing request directly
 ad4: TIMEOUT - WRITE_DMA retrying (1 retry left) LBA=100862853
 ad6: TIMEOUT - WRITE_DMA retrying (1 retry left) LBA=62352144
 
 Eugene Grosbein

From: Alexander Logvinov <lightsquid@logvinov.com>
To: bug-followup@FreeBSD.org, sos@freebsd.org
Cc:  
Subject: Re: kern/93885: ata(4) failure: SETFEATURES SET TRANSFER MODE semaphore timeout !! DANGER Will Robinson !!
Date: Fri, 10 Mar 2006 12:42:42 +0900

 Hello.
 
 Iwill DBS100 Rev 2.2 + FastTrak TX2300
 FreeBSD 6.1-PRERELEASE #0: Sun Mar  5 01:41:09 YAKT 2006
 /src/sys/dev/ata/ata-all.c,v 1.252.2.6
 
 It comes even worse:
 
 ad4: WARNING - SETFEATURES SET TRANSFER MODE taskqueue timeout - completing request directly
 ad4: WARNING - SETFEATURES SET TRANSFER MODE taskqueue timeout - completing request directly
 ad4: WARNING - SETFEATURES ENABLE RCACHE taskqueue timeout - completing request directly
 ad4: WARNING - SETFEATURES ENABLE WCACHE taskqueue timeout - completing request directly
 ad4: WARNING - SET_MULTI taskqueue timeout - completing request directly
 ad4: FAILURE - READ_DMA timed out LBA=84048063
 ar0: WARNING - mirror protection lost. RAID1 array in DEGRADED mode
 ad4: WARNING - WRITE_DMA taskqueue timeout - completing request directly
 ad6: WARNING - WRITE_DMA taskqueue timeout - completing request directly
 ad6: WARNING - SETFEATURES SET TRANSFER MODE taskqueue timeout - completing request directly
 ad6: WARNING - SETFEATURES SET TRANSFER MODE taskqueue timeout - completing request directly
 ad6: WARNING - SETFEATURES ENABLE RCACHE taskqueue timeout - completing request directly
 ad6: WARNING - SETFEATURES ENABLE WCACHE taskqueue timeout - completing request directly
 ad6: WARNING - SET_MULTI taskqueue timeout - completing request directly
 ad6: FAILURE - WRITE_DMA timed out LBA=50807807
 ar0: FAILURE - RAID1 array broken
 ad4: WARNING - WRITE_DMA taskqueue timeout - completing request directly
 ad6: WARNING - WRITE_DMA taskqueue timeout - completing request directly
 g_vfs_done():ar0s1d[WRITE(offset=26013564928, length=16384)]error = 5
 ad4: WARNING - SETFEATURES SET TRANSFER MODE taskqueue timeout - completing request directly
 ad4: WARNING - SETFEATURES SET TRANSFER MODE taskqueue timeout - completing request directly
 ad4: WARNING - SETFEATURES ENABLE RCACHE taskqueue timeout - completing request directly
 ad4: WARNING - SETFEATURES ENABLE WCACHE taskqueue timeout - completing request directly
 ad4: WARNING - SET_MULTI taskqueue timeout - completing request directly
 ad4: FAILURE - WRITE_DMA timed out LBA=50807807
 ad4: WARNING - WRITE_DMA taskqueue timeout - completing request directly
 ad6: WARNING - WRITE_DMA taskqueue timeout - completing request directly
 ad6: WARNING - SETFEATURES SET TRANSFER MODE taskqueue timeout - completing request directly
 
 # atacontrol status ar0
 ar0: ATA RAID1 subdisks: ad4 ad6 status: BROKEN
 
 -- 
 WBR
 

From: =?ISO-8859-1?Q?S=F8ren_Schmidt?= <sos@deepcore.dk>
To: Alexander Logvinov <lightsquid@logvinov.com>
Cc: bug-followup@FreeBSD.ORG, sos@FreeBSD.ORG
Subject: Re: kern/93885: ata(4) failure: SETFEATURES SET TRANSFER MODE semaphore
 timeout !! DANGER Will Robinson !!
Date: Fri, 10 Mar 2006 08:11:23 +0100

 Hmm, does it work if you disable ACPI ?
 If that still fails try to backstep /sys/dev/ata to say 6.0-RELEASE and 
 see if that makes it run smoothly.
 
 Anyhow, the tx2300 works fine in all the boards I've tried here....
 
 -Sren
 
From: Alexander Logvinov <lightsquid@logvinov.com>
To: bug-followup@FreeBSD.org
Cc: =?iso-8859-1?Q?S=F8ren_Schmidt?= <sos@deepcore.dk>
Subject: Re[2]: kern/93885: ata(4) failure: SETFEATURES SET TRANSFER MODE semaphore timeout !! DANGER Will Robinson !!
Date: Mon, 20 Mar 2006 12:08:56 +0900

 Hello.
 
 >> Iwill DBS100 Rev 2.2 + FastTrak TX2300
 >> FreeBSD 6.1-PRERELEASE #0: Sun Mar  5 01:41:09 YAKT 2006
 >> /src/sys/dev/ata/ata-all.c,v 1.252.2.6
 > Hmm, does it work if you disable ACPI ?
  No messages without ACPI. But after updating to 6.1-BETA4 and changing network card system is stable with ACPI (I hope).
 
 > If that still fails try to backstep /sys/dev/ata to say 6.0-RELEASE and 
 > see if that makes it run smoothly.
  With 6.0 messages "Danger Will Robinson" appeared, that is why I updated to RELENG_6.
 
 
 WBR
 
Adding to audit trail from misfiled PR kern/97242:

Date: Sun, 14 May 2006 10:12:12 +0200
From: Lukas Razik <lukas@razik.de>

 Hello!
 
 After some installation problems with a Promise TX4310 which you can read here:
 http://lists.freebsd.org/pipermail/freebsd-hardware/2006-May/003508.html
 
 I've randomly got some "SETFEATURES SET TRANSFER MODE semaphore timeout !! DANGER Will Robinson !"
 warnings during startup.
 So I've cvsup-ed yesterday to RELENG_6:
 src/sys/dev/ata/ata-all.c,v 1.252.2.9
 
 And now the system doesn't freeze but I randomly get this after/at startup:
 
 ad6: WARNING - SETFEATURES SET TRANSFER MODE taskqueue timeout - completing request directly
 ad6: WARNING - SETFEATURES SET TRANSFER MODE taskqueue timeout - completing request directly
 ad6: WARNING - SETFEATURES ENABLE RCACHE taskqueue timeout - completing request directly
 ad6: WARNING - SETFEATURES ENABLE WCACHE taskqueue timeout - completing request directly
 ad6: WARNING - SET_MULTI taskqueue timeout - completing request directly
 ad6: TIMEOUT - READ_DMA retrying (1 retry left) LBA=219869952
 
 My system:
 http://net.razik.de/temp/dmesg-2006-05-14.txt
 
 My kernel-config:
 http://net.razik.de/temp/RAZIK2006-01-28.txt
 
 Regards,
 Lukas

From: Lukas Razik <lukas@razik.de>
To: bug-followup@FreeBSD.org
Cc: jspence@lightconsulting.com, sos@FreeBSD.ORG
Subject: Re: kern/93885: ata(4) failure: SETFEATURES SET TRANSFER MODE semaphore
 timeout !! DANGER Will Robinson !!
Date: Sun, 14 May 2006 22:48:47 +0200

 Hello!
 
 I only want to add that now I had two times many WARNING messages 
 followed by:
 ar0: FAILURE - RAID0 array broken
 
 And in both cases the message was right :-/
 I had to recreate the RAID array because it was really damaged!
 It doesn't matter if I disable ACPI or not.
 So it's impossible for me to use the controller with FreeBSD...
 
 Regards,
 Lukas

From: Lukas Razik <lukas@razik.de>
To: bug-followup@FreeBSD.org,  jspence@lightconsulting.com, 
 sos@FreeBSD.ORG
Cc:  
Subject: Re: kern/93885: ata(4) failure: SETFEATURES SET TRANSFER MODE semaphore
 timeout !! DANGER Will Robinson !!
Date: Mon, 15 May 2006 08:44:15 +0200

 Hello!
 
 I think I've the malefactor.
 I've compiled a new kernel without additional optimizations which I had 
 before:
 makeoptions    COPTFLAGS="-O2 -pipe -funroll-loops -ffast-math"
 
 I've restarted the system more times and generated high IO over more 
 hours and I hadn't any warnings...
 
 Now I'll try to figure out which of these options causes the "bug" and 
 if it also works with SCHED_ULE. Because with SCHED_ULE and all 
 above-mentioned optimizations I had more warnings than with SCHED_4BSD 
 and the same optimizations.
 
 Regards,
 Lukas

From: Lukas Razik <lukas@razik.de>
To: bug-followup@FreeBSD.org
Cc: jspence@lightconsulting.com, sos@FreeBSD.ORG
Subject: Re: kern/93885: ata(4) failure: SETFEATURES SET TRANSFER MODE semaphore
 timeout !! DANGER Will Robinson !!
Date: Mon, 15 May 2006 16:43:28 +0200

 Hello
 
 O.K. I've to revise the last information I gave you!
 
 I've rebooted my system with the kernel which I built without any of 
 these optimizations "-O2 -pipe -funroll-loops -ffast-math" about 30 
 times and there were fewer warnings but last time when I booted the 
 system, FreeBSD destroyed again the metadata of the TX4310 and now I 
 won't continue with any tests until someone answeres and wants more 
 information...
 
 Best regards,
 Lukas
Responsible-Changed-From-To: freebsd-bugs->sos 
Responsible-Changed-By: remko 
Responsible-Changed-When: Mon Dec 25 15:17:44 UTC 2006 
Responsible-Changed-Why:  
Hey Soren, 

Can you peek at this one more time to determine the problem 
perhaps? 

http://www.freebsd.org/cgi/query-pr.cgi?pr=93885 

From: =?ISO-8859-1?Q?S=F8ren_Schmidt?= <sos@deepcore.dk>
To: bug-followup@FreeBSD.org, jspence@lightconsulting.com
Cc:  
Subject: Re: kern/93885: [ata] ata(4) failure: SETFEATURES SET TRANSFER MODE
 semaphore timeout !! DANGER Will Robinson !!
Date: Mon, 25 Dec 2006 19:11:30 +0100

 Problems like this is usually due to bad interrupt routing or sharing 
 interrupt with something that cant.
 To rule out selfgenerated problems make a GENERIC kernel without 
 tampering with options etc, if that still fails, try relocating the card 
 to another PCI slot to try to avoid evt resource sharing problems.
 
 Other than that I'm out of ideas...
 
 -Sren
Responsible-Changed-From-To: sos->reebsd-bugs 
Responsible-Changed-By: linimon 
Responsible-Changed-When: Tue May 12 04:37:20 UTC 2009 
Responsible-Changed-Why:  
sos@ is not actively working on ATA-related PRs. 

To submitter: is this still a problem in FreeBSD 7.2? 

http://www.freebsd.org/cgi/query-pr.cgi?pr=93885 
Responsible-Changed-From-To: reebsd-bugs->freebsd-bugs 
Responsible-Changed-By: linimon 
Responsible-Changed-When: Tue May 12 04:57:29 UTC 2009 
Responsible-Changed-Why:  
fix assignment. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=93885 
State-Changed-From-To: open->feedback 
State-Changed-By: jh 
State-Changed-When: Mon Oct 11 17:55:40 UTC 2010 
State-Changed-Why:  
Can you still reproduce this on 8.1? 


Responsible-Changed-From-To: freebsd-bugs->jh 
Responsible-Changed-By: jh 
Responsible-Changed-When: Mon Oct 11 17:55:40 UTC 2010 
Responsible-Changed-Why:  
Track.

http://www.freebsd.org/cgi/query-pr.cgi?pr=93885 
State-Changed-From-To: feedback->closed 
State-Changed-By: jh 
State-Changed-When: Sat Nov 27 18:51:42 UTC 2010 
State-Changed-Why:  
Feedback timeout. 

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