Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 19 Sep 2009 16:02:01 GMT
From:      Martin Laabs <info@martinlaabs.de>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   kern/138967: HDD write error: g_vfs_done(): ... ]error = 1
Message-ID:  <200909191602.n8JG21aG065292@www.freebsd.org>
Resent-Message-ID: <200909191610.n8JGA10M049986@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         138967
>Category:       kern
>Synopsis:       HDD write error: g_vfs_done(): ... ]error = 1
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sat Sep 19 16:10:00 UTC 2009
>Closed-Date:
>Last-Modified:
>Originator:     Martin Laabs
>Release:        7.2-STABLE
>Organization:
-
>Environment:
FreeBSD pc.martinlaabs.de 7.2-STABLE FreeBSD 7.2-STABLE #1: Sat Aug 15 18:48:58 CEST 2009     martin@pc.martinlaabs.de:/usr/obj/usr/src/sys/GENERIC  i386

>Description:
Some times I get the following errors at dmesg and syslog:

Sep 18 14:03:38 pc kernel: g_vfs_done():ufs/home[WRITE(offset=50879266816, length=131072)]error = 1
Sep 18 14:04:05 pc last message repeated 287 times
Sep 18 14:07:43 pc kernel: g_vfs_done():ufs/home[WRITE(offset=50879283200, length=131072)]error = 1
Sep 18 14:08:06 pc last message repeated 216 tim

They repeat endless until reboot. There the kernel gives up the buffers which leads to a dirty file system and maybe also data loss. However I don't belive the harddisk is broken because it is new and SMART reports no errors at all.

I use the SATA adX device with gbde encryption. Here are some information about: (full dmesg is attached)

atapci1: <nVidia nForce MCP67 SATA300 controller> port 0xf80-0xf87,0xf00-0xf03,0
xe80-0xe87,0xe00-0xe03,0xdc00-0xdc0f mem 0xfbe76000-0xfbe77fff irq 23 at device 
9.0 on pci0
atapci1: [ITHREAD]
atapci1: AHCI Version 01.10 controller with 4 ports detected
[...]
ata4: <ATA channel 2> on atapci1
ata4: [ITHREAD]
[...]
ad4: 476940MB <SAMSUNG HD502HI 1AG01118> at ata2-master SATA300

su:/home/martin$ geom bde list
Geom name: label/home.bde
Providers:
1. Name: label/home.bde
   Mediasize: 52060192768 (48G)
   Sectorsize: 512
   Mode: r1w1e2
Consumers:
1. Name: label/home
   Mediasize: 53687090688 (50G)
   Sectorsize: 512
   Mode: r2w2e3

[...]


su:/home/martin$ tunefs -p /dev/label/home.bde 
tunefs: ACLs: (-a)                                         disabled
tunefs: MAC multilabel: (-l)                               disabled
tunefs: soft updates: (-n)                                 enabled
tunefs: gjournal: (-J)                                     disabled
tunefs: maximum blocks per file in a cylinder group: (-e)  2048
tunefs: average file size: (-f)                            16384
tunefs: average number of files in a directory: (-s)       64
tunefs: minimum percentage of free space: (-m)             8%
tunefs: optimization preference: (-o)                      time
tunefs: volume label: (-L)                                 home


su:/home/martin$ fdisk /dev/ad4
******* Working on device /dev/ad4 *******
parameters extracted from in-core disklabel are:
cylinders=969021 heads=16 sectors/track=63 (1008 blks/cyl)

Figures below won't work with BIOS for partitions not in cyl 1
parameters to be used for BIOS calculations are:
cylinders=969021 heads=16 sectors/track=63 (1008 blks/cyl)

Media sector size is 512
Warning: BIOS sector numbering starts with sector 1
Information from DOS bootblock is:
The data for partition 1 is:
[...]
The data for partition 4 is:
sysid 165 (0xa5),(FreeBSD/NetBSD/386BSD)
    start 293587875, size 683180190 (333584 Meg), flag 0
        beg: cyl 1023/ head 255/ sector 63;
        end: cyl 1023/ head 14/ sector 63

su:/home/martin$ bsdlabel /dev/ad4s4
# /dev/ad4s4:
8 partitions:
#        size   offset    fstype   [fsize bsize bps/cpg]
  c: 683180190        0    unused        0     0         # "raw" part, don't edit
  d: 104857600        0    4.2BSD        0     0     0 
  e: 62914560 104857600    4.2BSD        0     0     0 
  f: 515408030 167772160    4.2BSD        0     0     0 

>How-To-Repeat:

>Fix:


Patch attached with submission follows:

Copyright (c) 1992-2009 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 is a registered trademark of The FreeBSD Foundation.
FreeBSD 7.2-STABLE #1: Sat Aug 15 18:48:58 CEST 2009
    martin@pc.martinlaabs.de:/usr/obj/usr/src/sys/GENERIC
module_register: module cpu/ichss already exists!
Module cpu/ichss failed to register: 17
module_register: module uhub/uftdi already exists!
Module uhub/uftdi failed to register: 17
module_register: module cpu/est already exists!
Module cpu/est failed to register: 17
module_register: module cpu/p4tcc already exists!
Module cpu/p4tcc failed to register: 17
module_register: module cpu/powernow already exists!
Module cpu/powernow failed to register: 17
module_register: module cpu/smist already exists!
Module cpu/smist failed to register: 17
Timecounter "i8254" frequency 1193182 Hz quality 0
CPU: AMD Athlon(tm) II X2 240 Processor (2795.97-MHz 686-class CPU)
  Origin = "AuthenticAMD"  Id = 0x100f62  Stepping = 2
  Features=0x178bfbff<FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CLFLUSH,MMX,FXSR,SSE,SSE2,HTT>
  Features2=0x802009<SSE3,MON,CX16,POPCNT>
  AMD Features=0xee500800<SYSCALL,NX,MMX+,FFXSR,Page1GB,RDTSCP,LM,3DNow!+,3DNow!>
  AMD Features2=0x37ff<LAHF,CMP,SVM,ExtAPIC,CR8,ABM,SSE4A,MAS,Prefetch,OSVW,IBS,SKINIT,WDT>
  TSC: P-state invariant
  Cores per package: 2
real memory  = 2012938240 (1919 MB)
avail memory = 1947013120 (1856 MB)
ACPI APIC Table: <040909 APIC1950>
FreeBSD/SMP: Multiprocessor System Detected: 2 CPUs
 cpu0 (BSP): APIC ID:  0
 cpu1 (AP): APIC ID:  1
ioapic0: Changing APIC ID to 2
ioapic0 <Version 1.1> irqs 0-23 on motherboard
kbd1 at kbdmux0
acpi0: <040909 RSDT1950> on motherboard
acpi0: [ITHREAD]
acpi0: Power Button (fixed)
acpi0: reservation of fefe1000, 1000 (3) failed
acpi0: reservation of fee01000, ff000 (3) failed
acpi0: reservation of fec00000, 1000 (3) failed
acpi0: reservation of fee00000, 1000 (3) failed
acpi0: reservation of 0, a0000 (3) failed
acpi0: reservation of 100000, 7ff00000 (3) failed
Timecounter "ACPI-fast" frequency 3579545 Hz quality 1000
acpi_timer0: <24-bit timer at 3.579545MHz> port 0x1008-0x100b on acpi0
pcib0: <ACPI Host-PCI bridge> port 0xcf8-0xcff on acpi0
pci0: <ACPI PCI bus> on pcib0
pci0: <memory, RAM> at device 0.0 (no driver attached)
isab0: <PCI-ISA bridge> port 0x1f00-0x1fff at device 1.0 on pci0
isa0: <ISA bus> on isab0
pci0: <serial bus, SMBus> at device 1.1 (no driver attached)
pci0: <processor> at device 1.3 (no driver attached)
ohci0: <OHCI (generic) USB controller> mem 0xfbe7f000-0xfbe7ffff irq 22 at device 2.0 on pci0
ohci0: [GIANT-LOCKED]
ohci0: [ITHREAD]
usb0: OHCI version 1.0, legacy support
usb0: SMM does not respond, resetting
usb0: <OHCI (generic) USB controller> on ohci0
usb0: USB revision 1.0
uhub0: <nVidia OHCI root hub, class 9/0, rev 1.00/1.00, addr 1> on usb0
uhub0: 6 ports with 6 removable, self powered
ehci0: <EHCI (generic) USB 2.0 controller> mem 0xfbe7ec00-0xfbe7ecff irq 23 at device 2.1 on pci0
ehci0: [GIANT-LOCKED]
ehci0: [ITHREAD]
usb1: EHCI version 1.0
usb1: companion controller, 12 ports each: usb0
usb1: <EHCI (generic) USB 2.0 controller> on ehci0
usb1: USB revision 2.0
uhub1: <nVidia EHCI root hub, class 9/0, rev 2.00/1.00, addr 1> on usb1
uhub1: 6 ports with 6 removable, self powered
ohci1: <OHCI (generic) USB controller> mem 0xfbe7d000-0xfbe7dfff irq 20 at device 4.0 on pci0
ohci1: [GIANT-LOCKED]
ohci1: [ITHREAD]
usb2: OHCI version 1.0, legacy support
usb2: SMM does not respond, resetting
usb2: <OHCI (generic) USB controller> on ohci1
usb2: USB revision 1.0
uhub2: <nVidia OHCI root hub, class 9/0, rev 1.00/1.00, addr 1> on usb2
uhub2: 6 ports with 6 removable, self powered
ehci1: <EHCI (generic) USB 2.0 controller> mem 0xfbe7e800-0xfbe7e8ff irq 21 at device 4.1 on pci0
ehci1: [GIANT-LOCKED]
ehci1: [ITHREAD]
usb3: EHCI version 1.0
usb3: companion controller, 12 ports each: usb2
usb3: <EHCI (generic) USB 2.0 controller> on ehci1
usb3: USB revision 2.0
uhub3: <nVidia EHCI root hub, class 9/0, rev 2.00/1.00, addr 1> on usb3
uhub3: 6 ports with 6 removable, self powered
ugen0: <TechnoTrend TT-USB2.0, class 0/0, rev 2.00/1.00, addr 2> on uhub3
atapci0: <nVidia nForce MCP67 UDMA133 controller> port 0x1f0-0x1f7,0x3f6,0x170-0x177,0x376,0xffa0-0xffaf at device 6.0 on pci0
ata0: <ATA channel 0> on atapci0
ata0: [ITHREAD]
ata1: <ATA channel 1> on atapci0
ata1: [ITHREAD]
hdac0: <NVidia MCP67 High Definition Audio Controller> mem 0xfbe78000-0xfbe7bfff irq 22 at device 7.0 on pci0
hdac0: HDA Driver Revision: 20090624_0136
hdac0: [ITHREAD]
pcib1: <ACPI PCI-PCI bridge> at device 8.0 on pci0
pci1: <ACPI PCI bus> on pcib1
pcib2: <PCI-PCI bridge> at device 10.0 on pci1
pci2: <PCI bus> on pcib2
asr0: <Adaptec Caching SCSI RAID> mem 0xf6000000-0xf7ffffff irq 10 at device 10.1 on pci1
asr0: [GIANT-LOCKED]
asr0: [ITHREAD]
asr0:   ADAPTEC 2100S FW Rev. 370F, 1 channel, 2000 CCBs, Protocol I2O
atapci1: <nVidia nForce MCP67 SATA300 controller> port 0xf80-0xf87,0xf00-0xf03,0xe80-0xe87,0xe00-0xe03,0xdc00-0xdc0f mem 0xfbe76000-0xfbe77fff irq 23 at device 9.0 on pci0
atapci1: [ITHREAD]
atapci1: AHCI Version 01.10 controller with 4 ports detected
ata2: <ATA channel 0> on atapci1
ata2: [ITHREAD]
ata3: <ATA channel 1> on atapci1
ata3: [ITHREAD]
ata4: <ATA channel 2> on atapci1
ata4: [ITHREAD]
ata5: <ATA channel 3> on atapci1
ata5: [ITHREAD]
nfe0: <NVIDIA nForce MCP67 Networking Adapter> port 0xd880-0xd887 mem 0xfbe7c000-0xfbe7cfff,0xfbe7e400-0xfbe7e4ff,0xfbe7e000-0xfbe7e00f irq 20 at device 10.0 on pci0
miibus0: <MII bus> on nfe0
rgephy0: <RTL8169S/8110S/8211B media interface> PHY 3 on miibus0
rgephy0:  10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, 1000baseT, 1000baseT-FDX, auto
nfe0: Ethernet address: 00:19:66:db:c0:ec
nfe0: [FILTER]
nfe0: [FILTER]
nfe0: [FILTER]
nfe0: [FILTER]
nfe0: [FILTER]
nfe0: [FILTER]
nfe0: [FILTER]
nfe0: [FILTER]
pcib3: <ACPI PCI-PCI bridge> at device 11.0 on pci0
pci3: <ACPI PCI bus> on pcib3
pcib4: <ACPI PCI-PCI bridge> at device 12.0 on pci0
pci4: <ACPI PCI bus> on pcib4
pcib5: <ACPI PCI-PCI bridge> at device 13.0 on pci0
pci5: <ACPI PCI bus> on pcib5
pcib6: <ACPI PCI-PCI bridge> at device 14.0 on pci0
pci6: <ACPI PCI bus> on pcib6
pcib7: <ACPI PCI-PCI bridge> at device 15.0 on pci0
pci7: <ACPI PCI bus> on pcib7
pcib8: <ACPI PCI-PCI bridge> at device 16.0 on pci0
pci8: <ACPI PCI bus> on pcib8
pcib9: <ACPI PCI-PCI bridge> at device 17.0 on pci0
pci9: <ACPI PCI bus> on pcib9
vgapci0: <VGA-compatible display> mem 0xfa000000-0xfaffffff,0xe0000000-0xefffffff,0xf9000000-0xf9ffffff irq 21 at device 18.0 on pci0
nvidia0: <GeForce 7050 PV / nForce 630a> on vgapci0
vgapci0: child nvidia0 requested pci_enable_busmaster
vgapci0: child nvidia0 requested pci_enable_io
vgapci0: child nvidia0 requested pci_enable_io
nvidia0: [GIANT-LOCKED]
nvidia0: [ITHREAD]
acpi_button0: <Power Button> on acpi0
sio0: configured irq 3 not in bitmap of probed irqs 0
sio0: port may not be enabled
sio0: configured irq 3 not in bitmap of probed irqs 0
sio0: port may not be enabled
sio0: <Generic IRDA-compatible device> port 0x2f8-0x2ff irq 3 flags 0x10 on acpi0
sio0: type 16550A
sio0: [FILTER]
fdc0: <floppy drive controller (FDE)> port 0x3f0-0x3f5,0x3f7 irq 6 drq 2 on acpi0
fdc0: [FILTER]
fd0: <1440-KB 3.5" drive> on fdc0 drive 0
atkbdc0: <Keyboard controller (i8042)> port 0x60,0x64 irq 1 on acpi0
atkbd0: <AT Keyboard> irq 1 on atkbdc0
kbd0 at atkbd0
atkbd0: [GIANT-LOCKED]
atkbd0: [ITHREAD]
sio1: configured irq 4 not in bitmap of probed irqs 0
sio1: port may not be enabled
sio1: configured irq 4 not in bitmap of probed irqs 0
sio1: port may not be enabled
sio1: <16550A-compatible COM port> port 0x3f8-0x3ff irq 4 on acpi0
sio1: type 16550A
sio1: [FILTER]
cpu0: <ACPI CPU> on acpi0
cpu1: <ACPI CPU> on acpi0
pmtimer0 on isa0
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/9 bytes threshold
ppbus0: <Parallel port bus> on ppc0
ppbus0: [ITHREAD]
lpt0: <Printer> on ppbus0
lpt0: Interrupt-driven port
ppi0: <Parallel I/O> on ppbus0
plip0: <PLIP network interface> on ppbus0
plip0: WARNING: using obsoleted IFF_NEEDSGIANT flag
ppc0: [GIANT-LOCKED]
ppc0: [ITHREAD]
sc0: <System console> at flags 0x100 on isa0
sc0: VGA <16 virtual consoles, flags=0x300>
vga0: <Generic ISA VGA> at port 0x3c0-0x3df iomem 0xa0000-0xbffff on isa0
ums0: <Logitech USB Mouse, class 0/0, rev 1.10/6.20, addr 2> on uhub0
ums0: 3 buttons and Z dir.
uhub4: <vendor 0x0451 product 0x2046, class 9/0, rev 1.10/1.25, addr 2> on uhub2
uhub4: 4 ports with 4 removable, bus powered
ugen1: <SafeNet Inc. SafeNet Sentinel, class 255/0, rev 2.00/1.01, addr 3> on uhub4
ugen2: <AKS Hardlock USB 1.02, class 255/0, rev 1.00/1.00, addr 4> on uhub4
uhid0: <Logitech Logitech Extreme 3D, class 0/0, rev 1.10/2.04, addr 5> on uhub2
Timecounters tick every 1.000 msec
acd0: DVDR <Optiarc DVD RW AD-7170A/1.04> at ata0-master UDMA66
ad4: 476940MB <SAMSUNG HD502HI 1AG01118> at ata2-master SATA300
hdac0: HDA Codec #0: Realtek ALC662
pcm0: <HDA Realtek ALC662 PCM #0 Analog> at cad 0 nid 1 on hdac0
pcm1: <HDA Realtek ALC662 PCM #1 Analog> at cad 0 nid 1 on hdac0
(probe0:asr0:0:0:0): TEST UNIT READY. CDB: 0 0 0 0 0 0 
(probe0:asr0:0:0:0): CAM Status: SCSI Status Error
(probe0:asr0:0:0:0): SCSI Status: Check Condition
(probe0:asr0:0:0:0): UNIT ATTENTION asc:29,0
(probe0:asr0:0:0:0): Power on, reset, or bus device reset occurred
(probe0:asr0:0:0:0): Retrying Command (per Sense Data)
(probe0:asr0:0:0:0): TEST UNIT READY. CDB: 0 0 0 0 0 0 
(probe0:asr0:0:0:0): CAM Status: SCSI Status Error
(probe0:asr0:0:0:0): SCSI Status: Check Condition
(probe0:asr0:0:0:0): NOT READY asc:3a,0
(probe0:asr0:0:0:0): Medium not present
(probe0:asr0:0:0:0): Unretryable error
sa0 at asr0 bus 0 target 0 lun 0
sa0: <SEAGATE DAT    9SP40-000 910B> Removable Sequential Access SCSI-3 device 
SMP: AP CPU #1 Launched!
Trying to mount root from ufs:/dev/ufs/root
WARNING: / was not properly dismounted
WARNING: /usr was not properly dismounted
WARNING: /var was not properly dismounted
WARNING: /media was not properly dismounted
WARNING: /home was not properly dismounted
nfe0: link state changed to UP
fuse4bsd: version 0.3.9-pre1, FUSE ABI 7.8
linux_js: /dev/uhid0 (Logitech Logitech Extreme 3D) attached to /dev/input/js0
ad4: FAILURE - SMART status=51<READY,DSC,ERROR> error=4<ABORTED>
ad4: FAILURE - SMART status=51<READY,DSC,ERROR> error=4<ABORTED>


>Release-Note:
>Audit-Trail:
>Unformatted:



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