Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 7 Nov 2002 00:56:46 -0800 (PST)
From:      Robert Carr <rcarr6502@yahoo.com>
To:        freebsd-stable@freebsd.org
Subject:   4.7-STABLE, ata0 READ/WRITE command timeout problem
Message-ID:  <20021107085646.97748.qmail@web13505.mail.yahoo.com>

next in thread | raw e-mail | index | archive | help
I upgraded my Compaq iPAQ (Seagate ST38410A 8.4 Gb
drive) from 4.6 to 4.7-STABLE last month.  Since then,
I've noticed two problems.

(1) dmesg and /dev/console are now reporting these
errors several times an hour:

ad0: WRITE command timeout tag=0 serv=0 - resetting
ata0: resetting devices .. done
ad0: READ command timeout tag=0 serv=0 - resetting
ata0: resetting devices .. done

(2) Sometimes -- though not always -- just prior to
the errors, the drive sounds like it's spinning up
briefly (as though it's been in sleep), makes a raspy,
light grinding noise, the system hangs for a few
seconds, then returns to normal and produces the above
errors.  I've never heard the drive make these noises
before.

The drive otherwise _appears_ to operate fine; I hear
it purring along nicely whenever there's disk
activity.  I haven't found any corruption issues (so
far).

In looking through the archives, it appears others
have had the "command timeout" problem:

http://www.mail-archive.com/freebsd-stable@freebsd.org/msg50105.html
http://www.mail-archive.com/freebsd-stable@freebsd.org/msg50128.html

(and at least two people have mentioned
freezing/pausing while it occurred) throughout FreeBSD
4.x.  I haven't noticed it at all until FreeBSD 4.7,
though I hadn't been keeping the system up for more
than a few hours a day until the 4.7 upgrade (now the
system is on constantly).

hw.ata.ata_dma was set to 1.  As suggested in one
post, I added

   hw.ata.ata_dma=”0”

to /boot/loader.conf and rebooted and neither problem
has gone away.

Presently:

$ sysctl -a | grep ata
hw.ata.ata_dma: 0
hw.ata.wc: 1
hw.ata.tags: 0
hw.ata.atapi_dma: 0

I also have softupdates enabled.

I found a thread last night that seemed to suggest
disabling softupdates with write-caching or to turn
tagging on and leave write-caching on:

http://spitfire.velocet.net/pipermail/freebsd-stable/2001-September/020551.html
http://spitfire.velocet.net/pipermail/freebsd-stable/2001-September/020578.html
http://spitfire.velocet.net/pipermail/freebsd-stable/2001-September/020582.html
http://spitfire.velocet.net/pipermail/freebsd-stable/2001-September/020599.html
http://spitfire.velocet.net/pipermail/freebsd-stable/2001-September/020601.html
http://spitfire.velocet.net/pipermail/freebsd-stable/2001-September/020606.html

But frankly, the advice given in the threads seems
contradictory and confusing.

One poster said:
"To clarify, it isn't the drive that knows about
critical metadata. That's softupdates doing it's job.
Softupdates has to trust the drive to make sure the
critical metadata is on the disk. This is why write
caching sans tagged queuing and softupdates are such a
bad idea. This is also why a file system with soft
updates enabled simply ignore the async flag on any
mount request."

From the ata man page, it does not appear that my
Seagate supports tagged queuing.

Does anyone have a solution to the problem spawning
these error messages?  Is the drive-noise and the
sleep-like drive behavior related to the ata0 command
timeout problem?  Is this a problem with the BSD ATA
driver?  I've seen posts about this problem going back
to FreeBSD 4.3, but nothing definitive on locating the
source of the problem or its solution.

I'm at a loss what to try next.  Should I try
disabling write-caching?

Any help would be greatly appreciated.

============== SYSTEM INFO =================
$ uname -a
FreeBSD 4.7-STABLE FreeBSD 4.7-STABLE #0: Sat Oct 12
23:25:09 PDT 2002 i386

$ dmesg | grep ata
atapci0: <Intel ICH ATA66 controller> port
0x2460-0x246f at device 31.1 on pci0
ata0: at 0x1f0 irq 14 on atapci0
ata1: at 0x170 irq 15 on atapci0
ata1-slave: ATAPI identify retries exceeded
ad0: 8063MB <ST38410A> [16383/16/63] at ata0-master
PIO4
acd0: CDROM <CD-224E> at ata1-master PIO4
ata0: resetting devices .. ata0-slave: ATA identify
retries exceeded
ata0: resetting devices .. done
ata0: resetting devices .. done
ata0: resetting devices .. done
ata0: resetting devices .. done
ata0: resetting devices .. done
ata0: resetting devices .. done
ata0: resetting devices .. done
ata0: resetting devices .. done
ata0: resetting devices .. done

------------------
# atacontrol cap 0 0
ATA channel 0, Master, device ad0:

ATA/ATAPI revision    5
device model          ST38410A
serial number         6CS1D5WT
firmware revision     3.13
cylinders             16383
heads                 16
sectors/track         63
lba supported         16514064 sectors
lba48 not supported         
dma supported
overlap not supported

Feature                      Support  Enable    Value 
 Vendor
write cache                    yes      yes
read ahead                     yes      yes
dma queued                     no       no      0/00
SMART                          yes      yes
microcode download             yes      yes
security                       yes      yes
power management               yes      yes
advanced power management      yes      yes     64/40
automatic acoustic management  no       no      0/00  
 0/00

------------------
Copyright (c) 1992-2002 The FreeBSD Project.
Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989,
1991, 1992, 1993, 1994
        The Regents of the University of California.
All rights reserved.
FreeBSD 4.7-STABLE #0: Sat Oct 12 23:25:09 PDT 2002
    :/usr/obj/usr/src/sys/KERNEL
Timecounter "i8254"  frequency 1193182 Hz
CPU: Pentium III/Pentium III Xeon/Celeron (498.34-MHz
686-class CPU)
  Origin = "GenuineIntel"  Id = 0x683  Stepping = 3

Features=0x383f9ff<FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,SEP,MTRR,PGE,MCA,CMOV,PA
T,PSE36,MMX,FXSR,SSE>
real memory  = 133169152 (130048K bytes)
config> di sn0
config> di lnc0
config> di ie0
config> di fe0
config> di ed0
config> di cs0
config> q
avail memory = 124313600 (121400K bytes)
Preloaded elf kernel "kernel" at 0xc0526000.
Preloaded userconfig_script "/boot/kernel.conf" at
0xc052609c.
Pentium Pro MTRR support enabled
md0: Malloc disk
Using $PIR table, 4 entries at 0xc00edf20
npx0: <math processor> on motherboard
npx0: INT 16 interface
pcib0: <Intel 82810E (i810E GMCH) Host To Hub bridge>
on motherboard
pci0: <PCI bus> on pcib0
pci0: <Intel 82810E (i810E GMCH) SVGA controller> at
1.0 irq 11
pcib1: <Intel 82801AA (ICH) Hub to PCI bridge> at
device 30.0 on pci0
pci1: <PCI bus> on pcib1
fxp0: <Intel Pro 10/100B/100+ Ethernet> port
0x1000-0x103f mem 0x40000000-0x400f
ffff,0x40100000-0x40100fff irq 11 at device 1.0 on
pci1
fxp0: Ethernet address 
inphy0: <i82555 10/100 media interface> on miibus0
inphy0:  10baseT, 10baseT-FDX, 100baseTX,
100baseTX-FDX, auto
isab0: <Intel 82801AA (ICH) PCI to LPC bridge> at
device 31.0 on pci0
isa0: <ISA bus> on isab0
atapci0: <Intel ICH ATA66 controller> port
0x2460-0x246f at device 31.1 on pci0
ata0: at 0x1f0 irq 14 on atapci0
ata1: at 0x170 irq 15 on atapci0
uhci0: <Intel 82801AA (ICH) USB controller> port
0x2440-0x245f irq 11 at device 
31.2 on pci0
usb0: <Intel 82801AA (ICH) USB controller> on uhci0
usb0: USB revision 1.0
uhub0: Intel UHCI root hub, class 9/0, rev 1.00/1.00,
addr 1
uhub0: 2 ports with 2 removable, self powered
chip1: <Intel 82801AA (ICH) AC'97 Audio Controller>
port 0x2400-0x243f,0x2000-0x
20ff irq 11 at device 31.5 on pci0
orm0: <Option ROMs> at iomem
0xc0000-0xc7fff,0xc8000-0xc97ff,0xe0000-0xeffff on 
isa0
fdc0: <NEC 72065B or clone> at port 0x3f0-0x3f5,0x3f7
irq 6 drq 2 on isa0
atkbdc0: <Keyboard controller (i8042)> at port
0x60,0x64 on isa0
atkbd0: <AT Keyboard> flags 0x1 irq 1 on atkbdc0
kbd0 at atkbd0
vga0: <Generic ISA VGA> at port 0x3c0-0x3df iomem
0xa0000-0xbffff on isa0
sc0: <System console> at flags 0x100 on isa0
sc0: VGA <16 virtual consoles, flags=0x300>
sio0 at port 0x3f8-0x3ff irq 4 flags 0x10 on isa0
sio0: type 16550A
sio1: configured irq 3 not in bitmap of probed irqs 0
ppc0: <Parallel port> at port 0x378-0x37f irq 7 on
isa0
ppc0: SMC-like chipset (ECP/EPP/PS2/NIBBLE) in
COMPATIBLE mode
ppc0: FIFO with 16/16/13 bytes threshold
plip0: <PLIP network interface> on ppbus0
lpt0: <Printer> on ppbus0
lpt0: Interrupt-driven port
ppi0: <Parallel I/O> on ppbus0
IP Filter: v3.4.29 initialized.  Default = block all,
Logging = enabled
ata1-slave: ATAPI identify retries exceeded
ad0: 8063MB <ST38410A> [16383/16/63] at ata0-master
PIO4
acd0: CDROM <CD-224E> at ata1-master PIO4
Mounting root from ufs:/dev/ad0s1a
ad0: READ command timeout tag=0 serv=0 - resetting
ata0: resetting devices .. ata0-slave: ATA identify
retries exceeded
done
ad0: READ command timeout tag=0 serv=0 - resetting
ata0: resetting devices .. done
ad0: READ command timeout tag=0 serv=0 - resetting
ata0: resetting devices .. done
ad0: WRITE command timeout tag=0 serv=0 - resetting
ata0: resetting devices .. done
ad0: READ command timeout tag=0 serv=0 - resetting
ata0: resetting devices .. done
ad0: WRITE command timeout tag=0 serv=0 - resetting
ata0: resetting devices .. done
ad0: READ command timeout tag=0 serv=0 - resetting
ata0: resetting devices .. done
ad0: READ command timeout tag=0 serv=0 - resetting
ata0: resetting devices .. done
ad0: READ command timeout tag=0 serv=0 - resetting
ata0: resetting devices .. done
ad0: READ command timeout tag=0 serv=0 - resetting
ata0: resetting devices .. done

------------------
/boot/kernel.conf

di sn0
di lnc0
di ie0
di fe0
di ed0
di cs0
q

------------------
/boot/loader.conf

userconfig_script_load="YES"
hw.ata.ata_dma="0"




__________________________________________________
Do you Yahoo!?
U2 on LAUNCH - Exclusive greatest hits videos
http://launch.yahoo.com/u2

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-stable" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20021107085646.97748.qmail>