Bug 138967 - [ata] HDD write error: g_vfs_done(): ... ]error = 1
Summary: [ata] HDD write error: g_vfs_done(): ... ]error = 1
Status: Open
Alias: None
Product: Base System
Classification: Unclassified
Component: kern (show other bugs)
Version: 7.2-STABLE
Hardware: Any Any
: Normal Affects Only Me
Assignee: freebsd-bugs (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-09-19 17:10 UTC by Martin Laabs
Modified: 2018-01-03 05:14 UTC (History)
0 users

See Also:


Attachments
file.txt (10.31 KB, text/plain)
2009-09-19 17:10 UTC, Martin Laabs
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Laabs 2009-09-19 17:10:00 UTC
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

Fix: Patch attached with submission follows:
Comment 1 Eitan Adler freebsd_committer freebsd_triage 2017-12-31 07:59:01 UTC
For bugs matching the following criteria:

Status: In Progress Changed: (is less than) 2014-06-01

Reset to default assignee and clear in-progress tags.

Mail being skipped