Subject: kern/28601: FFS v1 corruption after unpacking pkgsrc.tar on sata wd raptor when disk write cache enabled, no softdeps
To: None <kern-bug-people@netbsd.org, gnats-admin@netbsd.org,>
From: rudolf <netbsd@eq.cz>
List: netbsd-bugs
Date: 12/10/2004 16:33:01
>Number: 28601
>Category: kern
>Synopsis: FFS v1 corruption after unpacking pkgsrc.tar on sata wd raptor when disk write cache enabled, no softdeps
>Confidential: no
>Severity: serious
>Priority: high
>Responsible: kern-bug-people
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Fri Dec 10 16:33:00 +0000 2004
>Originator: Charlie The Root
>Release: NetBSD 2.0
>Organization:
>Environment:
# dmesg:
NetBSD 2.0 (GENERIC) #0: Tue Nov 30 21:54:11 UTC 2004
builds@build:/big/builds/ab/netbsd-2-0-RELEASE/amd64/200411300000Z-obj/big/builds/ab/netbsd-2-0-RELEASE/src/sys/arch/amd64/compile/GENERIC
total memory = 1023 MB
avail memory = 979 MB
mainbus0 (root)
mainbus0: Intel MP Specification (Version 1.4) (TYAN S2881 )
cpu0 at mainbus0: apid 0 (boot processor)
cpu0: AMD Opteron(tm) Processor 248, 2191.38 MHz
cpu0: features: e7dbfbff<FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR>
cpu0: features: e7dbfbff<PGE,MCA,CMOV,PAT,PSE36,MPC,NOX,MMXX,MMX>
cpu0: features: e7dbfbff<FXSR,SSE,SSE2,LONG,3DNOW2,3DNOW>
cpu0: I-cache 64 KB 64B/line 2-way, D-cache 64 KB 64B/line 2-way
cpu0: L2 cache 1 MB 64B/line 16-way
cpu0: ITLB 32 4 KB entries fully associative, 8 4 MB entries fully associative
cpu0: DTLB 32 4 KB entries fully associative, 8 4 MB entries fully associative
cpu0: calibrating local timer
cpu0: apic clock running at 199 MHz
cpu0: 16 page colors
mpbios: bus 0 is type PCI
mpbios: bus 1 is type PCI
mpbios: bus 2 is type PCI
mpbios: bus 3 is type PCI
mpbios: bus 4 is type ISA
ioapic0 at mainbus0 apid 1 (I/O APIC)
ioapic0: pa 0xfec00000, version 11, 24 pins
ioapic1 at mainbus0 apid 2 (I/O APIC)
ioapic1: pa 0xfebff000, version 11, 4 pins
ioapic2 at mainbus0 apid 3 (I/O APIC)
ioapic2: pa 0xfebfe000, version 11, 4 pins
pci0 at mainbus0 bus 0: configuration mode 1
pci0: i/o space, memory space enabled, rd/line, rd/mult, wr/inv ok
ppb0 at pci0 dev 6 function 0: Advanced Micro Devices AMD8111 I/O Hub (rev. 0x07)
pci1 at ppb0 bus 3
pci1: i/o space, memory space enabled
ohci0 at pci1 dev 0 function 0: Advanced Micro Devices AMD8111 USB Host Controller (rev. 0x0b)
ohci0: interrupting at ioapic0 pin 19 (irq 9)
ohci0: OHCI version 1.0, legacy support
usb0 at ohci0: USB revision 1.0
uhub0 at usb0
uhub0: Advanced Micro OHCI root hub, class 9/0, rev 1.00/1.00, addr 1
uhub0: 3 ports with 3 removable, self powered
ohci1 at pci1 dev 0 function 1: Advanced Micro Devices AMD8111 USB Host Controller (rev. 0x0b)
ohci1: interrupting at ioapic0 pin 19 (irq 9)
ohci1: OHCI version 1.0, legacy support
usb1 at ohci1: USB revision 1.0
uhub1 at usb1
uhub1: Advanced Micro OHCI root hub, class 9/0, rev 1.00/1.00, addr 1
uhub1: 3 ports with 3 removable, self powered
satalink0 at pci1 dev 5 function 0
satalink0: Silicon Image SATALink 3114 (rev. 0x02)
satalink0: 33MHz PCI bus
satalink0: bus-master DMA support present
satalink0: using ioapic0 pin 17 (irq 10) for native-PCI interrupt
atabus0 at satalink0 channel 0
atabus1 at satalink0 channel 1
atabus2 at satalink0 channel 2
atabus3 at satalink0 channel 3
vga0 at pci1 dev 6 function 0: ATI Technologies Rage XL (rev. 0x27)
wsdisplay0 at vga0 kbdmux 1: console (80x25, vt100 emulation)
wsmux1: connecting to wsdisplay0
pcib0 at pci0 dev 7 function 0
pcib0: Advanced Micro Devices AMD8111 LPC Controller (rev. 0x05)
viaide0 at pci0 dev 7 function 1
viaide0: Advanced Micro Devices AMD8111 IDE Controller (rev. 0x03)
viaide0: bus-master DMA support present
viaide0: primary channel configured to compatibility mode
viaide0: primary channel ignored (disabled)
viaide0: secondary channel configured to compatibility mode
viaide0: secondary channel interrupting at ioapic0 pin 15 (irq 15)
atabus4 at viaide0 channel 1
Advanced Micro Devices AMD8111 ACPI Controller (miscellaneous bridge, revision 0x05) at pci0 dev 7 function 3 not configured
ppb1 at pci0 dev 10 function 0: Advanced Micro Devices AMD8131 PCI-X Tunnel (rev. 0x12)
pci2 at ppb1 bus 2
pci2: memory space enabled
bge0 at pci2 dev 9 function 0: Broadcom BCM5704C Dual Gigabit Ethernet
bge0: interrupting at ioapic1 pin 0 (irq 5)
bge0: ASIC BCM5704 A3 (0x2003), Ethernet address 00:e0:81:2b:cc:2a
brgphy0 at bge0 phy 1: BCM5704 1000BASE-T media interface, rev. 0
brgphy0: using BCM5704 DSP patch
brgphy0: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, 1000baseT, 1000baseT-FDX, auto
bge1 at pci2 dev 9 function 1: Broadcom BCM5704C Dual Gigabit Ethernet
bge1: interrupting at ioapic1 pin 1 (irq 10)
bge1: ASIC BCM5704 A3 (0x2003), Ethernet address 00:e0:81:2b:cc:2b
brgphy1 at bge1 phy 1: BCM5704 1000BASE-T media interface, rev. 0
brgphy1: using BCM5704 DSP patch
brgphy1: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, 1000baseT, 1000baseT-FDX, auto
aapic0 at pci0 dev 10 function 1: Advanced Micro Devices AMD8131 IO Apic (rev. 0x01)
ppb2 at pci0 dev 11 function 0: Advanced Micro Devices AMD8131 PCI-X Tunnel (rev. 0x12)
pci3 at ppb2 bus 1
pci3: memory space enabled
aapic1 at pci0 dev 11 function 1: Advanced Micro Devices AMD8131 IO Apic (rev. 0x01)
pchb0 at pci0 dev 24 function 0
pchb0: Advanced Micro Devices AMD64 HyperTransport configuration (rev. 0x00)
pchb1 at pci0 dev 24 function 1
pchb1: Advanced Micro Devices AMD64 Address Map configuration (rev. 0x00)
pchb2 at pci0 dev 24 function 2
pchb2: Advanced Micro Devices AMD64 DRAM configuration (rev. 0x00)
pchb3 at pci0 dev 24 function 3
pchb3: Advanced Micro Devices AMD64 Miscellaneous configuration (rev. 0x00)
isa0 at pcib0
com0 at isa0 port 0x3f8-0x3ff irq 4: ns16550a, working fifo
com1 at isa0 port 0x2f8-0x2ff irq 3: ns16550a, working fifo
pckbc0 at isa0 port 0x60-0x64
pckbd0 at pckbc0 (kbd slot)
pckbc0: using irq 1 for kbd slot
wskbd0 at pckbd0: console keyboard, using wsdisplay0
pcppi0 at isa0 port 0x61
midi0 at pcppi0: PC speaker
sysbeep0 at pcppi0
ioapic2: enabling
ioapic1: enabling
ioapic0: enabling
Kernelized RAIDframe activated
satalink0: port 0: device present, speed: 1.5Gb/s
wd0 at atabus0 drive 0satalink0: port 1: device present, speed: 1.5Gb/s
satalink0: port 2: device present, speed: 1.5Gb/s
satalink0: port 3: device present, speed: 1.5Gb/s
: <ST3200822AS>
wd0: drive supports 16-sector PIO transfers, LBA48 addressing
wd0: 186 GB, 387621 cyl, 16 head, 63 sec, 512 bytes/sect x 390721968 sectors
wd0: 32-bit data port
wd0: drive supports PIO mode 4, DMA mode 2, Ultra-DMA mode 6 (Ultra/133)
wd0(satalink0:0:0): using PIO mode 4, Ultra-DMA mode 6 (Ultra/133) (using DMA data transfers)
wd1 at atabus1 drive 0: <ST3200822AS>
wd1: drive supports 16-sector PIO transfers, LBA48 addressing
wd1: 186 GB, 387621 cyl, 16 head, 63 sec, 512 bytes/sect x 390721968 sectors
wd1: 32-bit data port
wd1: drive supports PIO mode 4, DMA mode 2, Ultra-DMA mode 6 (Ultra/133)
wd1(satalink0:1:0): using PIO mode 4, Ultra-DMA mode 6 (Ultra/133) (using DMA data transfers)
wd2 at atabus2 drive 0: <WDC WD740GD-75FLA1>
wd2: drive supports 16-sector PIO transfers, LBA48 addressing
wd2: 70571 MB, 143384 cyl, 16 head, 63 sec, 512 bytes/sect x 144531250 sectors
wd2: 32-bit data port
wd2: drive supports PIO mode 4, DMA mode 2, Ultra-DMA mode 6 (Ultra/133)
wd2(satalink0:2:0): using PIO mode 4, Ultra-DMA mode 6 (Ultra/133) (using DMA data transfers)
wd3 at atabus3 drive 0: <WDC WD740GD-75FLA1>
wd3: drive supports 16-sector PIO transfers, LBA48 addressing
wd3: 70571 MB, 143384 cyl, 16 head, 63 sec, 512 bytes/sect x 144531250 sectors
wd3: 32-bit data port
wd3: drive supports PIO mode 4, DMA mode 2, Ultra-DMA mode 6 (Ultra/133)
wd3(satalink0:3:0): using PIO mode 4, Ultra-DMA mode 6 (Ultra/133) (using DMA data transfers)
atapibus0 at atabus4: 2 targets
cd0 at atapibus0 drive 0: <QSI CD-ROM SCR-242, , CXAC> cdrom removable
cd0: 32-bit data port
cd0: drive supports PIO mode 4, DMA mode 2, Ultra-DMA mode 2 (Ultra/33)
cd0(viaide0:1:0): using PIO mode 4, Ultra-DMA mode 2 (Ultra/33) (using DMA data transfers)
boot device: wd3
root on wd3a dumps on wd3b
root file system type: ffs
wsdisplay0: screen 1 added (80x25, vt100 emulation)
wsdisplay0: screen 2 added (80x25, vt100 emulation)
wsdisplay0: screen 3 added (80x25, vt100 emulation)
wsdisplay0: screen 4 added (80x25, vt100 emulation)
# atactl wd3 identify
Model: WDC WD740GD-75FLA1, Rev: 27.08D27, Serial #: WD-WMAKE1601689
Device type: ATA, fixed
Device supports command queue depth of 15
Device capabilities:
DMA
LBA
ATA standby timer values
IORDY operation
IORDY disabling
Device supports following standards:
ATA-1 ATA-2 ATA-3 ATA-4 ATA-5 ATA-6
Command set support:
NOP command
READ BUFFER command
WRITE BUFFER command
Host Protected Area feature set
release interrupt
look-ahead
write cache
Power Management feature set
SMART feature set
FLUSH CACHE EXT command
FLUSH CACHE command
Device Configuration Overlay feature set
48-bit Address feature set
Automatic Acoustic Management feature set
SET MAX security extension
SET FEATURES required to spin-up after power-up
Power-Up In Standby feature set
READ/WRITE DMA QUEUED commands
DOWNLOAD MICROCODE command
SMART self-test
SMART error logging
Command sets/features enabled:
release interrupt
look-ahead
write cache
SMART feature set
disklabel wd3
# /dev/rwd3d:
type: unknown
disk: WDC WD740GD-75F
label:
flags:
bytes/sector: 512
sectors/track: 63
tracks/cylinder: 16
sectors/cylinder: 1008
cylinders: 143384
total sectors: 144531250
rpm: 3600
interleave: 1
trackskew: 0
cylinderskew: 0
headswitch: 0 # microseconds
track-to-track seek: 0 # microseconds
drivedata: 0
16 partitions:
# size offset fstype [fsize bsize cpg/sgs]
a: 139641264 63 4.2BSD 1024 8192 46648 # (Cyl. 0*- 138533*)
b: 263088 139641327 swap # (Cyl. 138533*- 138794*)
c: 144531187 63 unused 0 0 # (Cyl. 0*- 143384*)
d: 144531250 0 unused 0 0 # (Cyl. 0 - 143384*)
System: NetBSD tyan 2.0 NetBSD 2.0 (GENERIC) #0: Tue Nov 30 21:54:11 UTC 2004 builds@build:/big/builds/ab/netbsd-2-0-RELEASE/amd64/200411300000Z-obj/big/builds/ab/netbsd-2-0-RELEASE/src/sys/arch/amd64/compile/GENERIC amd64
Architecture: x86_64
Machine: amd64
>Description:
Unpacking pkgsrc.tar leads to ffs corruption on both of tested wd raptor WD740GD-75FLA1 disks.
There is no corruption when softdeps are on or disk write cache is off. There is also no corruption
when unpacking on seagate ST3200822AS disks connected to the same controller.
See also http://mail-index.netbsd.org/regional-cs/2004/12/05/0000.html and corresponding thread.
>How-To-Repeat:
fs not corrupted, boot, unpack pkgsrc.tar, reboot, boot -s, fsck => fsck repairs filesystem corruption
>Fix:
>Unformatted: