From nobody@FreeBSD.org  Mon Jan  2 12:05:17 2006
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id 84FCF16A41F
	for <freebsd-gnats-submit@FreeBSD.org>; Mon,  2 Jan 2006 12:05:17 +0000 (GMT)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (www.freebsd.org [216.136.204.117])
	by mx1.FreeBSD.org (Postfix) with ESMTP id 324BC43D48
	for <freebsd-gnats-submit@FreeBSD.org>; Mon,  2 Jan 2006 12:05:17 +0000 (GMT)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (localhost [127.0.0.1])
	by www.freebsd.org (8.13.1/8.13.1) with ESMTP id k02C5Gds078183
	for <freebsd-gnats-submit@FreeBSD.org>; Mon, 2 Jan 2006 12:05:17 GMT
	(envelope-from nobody@www.freebsd.org)
Received: (from nobody@localhost)
	by www.freebsd.org (8.13.1/8.13.1/Submit) id k02C5GHk078182;
	Mon, 2 Jan 2006 12:05:16 GMT
	(envelope-from nobody)
Message-Id: <200601021205.k02C5GHk078182@www.freebsd.org>
Date: Mon, 2 Jan 2006 12:05:16 GMT
From: Mike M <mmcg@yahoo.com>
To: freebsd-gnats-submit@FreeBSD.org
Subject: Disk corruption with Asus K8S-LA: board doesn't support UDMA133
X-Send-Pr-Version: www-2.3

>Number:         91214
>Category:       i386
>Synopsis:       [ata] Disk corruption with Asus K8S-LA: board doesn't support UDMA133
>Confidential:   no
>Severity:       critical
>Priority:       high
>Responsible:    remko
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Mon Jan 02 12:10:06 GMT 2006
>Closed-Date:    Mon Sep 11 11:55:39 GMT 2006
>Last-Modified:  Mon Sep 11 11:55:39 GMT 2006
>Originator:     Mike M
>Release:        6.0-RELEASE
>Organization:
>Environment:
6.0-RELEASE-GENERIC (from install CD)              
>Description:
Machine is an HP Pavilion a1007w - also sold as a Compaq Presario SR1511NX -
running an athlon 64 3200+, 1G ram.  Memory is rock-solid.

/dev/ad0 is a Samsung SP1203N, which can run at UDMA133 with the right
motherboard.

The motherboard is an Asus K8S-LA.  According to its documentation, it
supports UDMA 33/66/100 - but not UDMA133.  Note that the controller itself
(SiS 964) supports UDMA133.

When 6.0-CURRENT (GENERIC) boots, it sets the ad0 channel to UDMA133,
which results in random disk write errors when the disk is under load -
about 1 bit in 10000 is flipped (usually from 1 to 0) en route to the
disk drive on my machine.  These errors usually won't show up until the
system has been rebooted (hence memory cleared).  Note that there are no
apparent read errors at this speed - the system can be rebooted multiple
times after this, and reliably reads back the erroneous files (generates
the same md5 sum every time).

Manually setting the device to UDMA100 (via atacontrol) cures the problem
(though not any prior corruption).

The write corruption becomes orders of magnitude rarer if you are _only_
writing to the device (not simultaneously reading) - so there is a good
chance that sysinstall will build a reasonably clean install, which will
start to become corrupted immediately you boot multi-user.

Cheers :)

    Mike.

ps: Interestingly enough, there is a distinct pattern to the flipped bits
(particular bits per 8-byte chunk are flipped hundreds of times more often
than others) - this probably specific to my motherboard and/or drive
terminators.


>How-To-Repeat:
Create a random binary file, around 2G
Set ata mode to UDMA6
Copy the file
Diff the two files
>Fix:
To get a clean FreeBSD install on a new machine: temporarily install a
40-wire IDE cable, install system, compile or configure kernel to force
UDMA100, replace 80-wire cable.

>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->feedback 
State-Changed-By: remko 
State-Changed-When: Mon Sep 11 11:41:11 UTC 2006 
State-Changed-Why:  
Hello, 

It seems that you specified a workaround which might help other 
people (thanks for that); can you tell me whether the problem 
still persists in 6.1 (and in the near future 6.2) so that we 
might need to look into this in more detail? 

Thanks 


Responsible-Changed-From-To: freebsd-i386->remko 
Responsible-Changed-By: remko 
Responsible-Changed-When: Mon Sep 11 11:41:11 UTC 2006 
Responsible-Changed-Why:  
Grab the PR 
aNATS: Lines beginning with "GNATS:" will be deleted. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=91214 
State-Changed-From-To: feedback->closed 
State-Changed-By: remko 
State-Changed-When: Mon Sep 11 11:55:38 UTC 2006 
State-Changed-Why:  
the mail bounces to the submitter, close the PR 

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