From sec@yoda.pi.musin.de  Mon Mar  2 10:02:47 1998
Received: from ewok.pi.musin.de (ewok.pi.musin.de [194.246.250.2])
          by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id KAA16051
          for <FreeBSD-gnats-submit@freebsd.org>; Mon, 2 Mar 1998 10:02:43 -0800 (PST)
          (envelope-from sec@yoda.pi.musin.de)
Received: from yoda.pi.musin.de (yoda.pi.musin.de [194.246.250.12])
	by ewok.pi.musin.de (8.8.5/8.8.7) with ESMTP id TAA17499
	for <FreeBSD-gnats-submit@freebsd.org>; Mon, 2 Mar 1998 19:03:54 +0100 (CET)
Received: (from root@localhost)
	by yoda.pi.musin.de (8.8.8/8.8.5) id TAA15078;
	Mon, 2 Mar 1998 19:02:09 +0100 (CET)
Message-Id: <199803021802.TAA15078@yoda.pi.musin.de>
Date: Mon, 2 Mar 1998 19:02:09 +0100 (CET)
From: Stefan `Sec` Zehl <sec@yoda.pi.musin.de>
Reply-To: sec@yoda.pi.musin.de
To: FreeBSD-gnats-submit@freebsd.org
Subject: cvsup problem/corrupt files.
X-Send-Pr-Version: 3.2

>Number:         5900
>Category:       misc
>Synopsis:       cvsup problem/corrupt files.
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    jdp
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Mon Mar  2 10:10:01 PST 1998
>Closed-Date:    Mon Mar 2 22:47:49 PST 1998
>Last-Modified:  Mon Mar  2 22:56:42 PST 1998
>Originator:     
>Release:        FreeBSD 2.2.5-STABLE i386
>Organization:
>Environment:

recent 2.2.5-STABLE. "cvsup"ing every night with the follofing supfile:

*default host=cvsup.uk.freebsd.org
*default prefix=/usr/CVSup
*default base=/usr/local/sup/status
*default delete use-rel-suffix compress
*default release=cvs
cvs-all

>Description:

on checking our the source tree with:

cvs -R -q -r checkout -r RELENG_2_2 src

I get errors again and again.

cvs checkout: `/usr/CVSup/src/gnu/usr.bin/groff/devX100-12/Attic/S,v' does not appear to be a valid rcs file
cvs checkout: `/usr/CVSup/src/gnu/usr.bin/groff/devX100-12/Attic/S,v' does not appear to be a valid rcs file
cvs [checkout aborted]: `/usr/CVSup/src/gnu/usr.bin/perl/perl/spat.h,v' does not appear to be a valid rcs file

Blowing them away (rm) and re-cvsup'ing cures the problem.

By looking at this files with less, it's obvious that they're broken. They contain lots of 0-bytes. Sometimes even some other junk between the NUL's.

I kept the two above-mentioned files. In case anyone wants them.

>How-To-Repeat:

don't know exactly. But this re-occurs always. If you need more information
(such as dmesg) let me know.

>Fix:
	
>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-bugs->jdp 
Responsible-Changed-By: steve 
Responsible-Changed-When: Mon Mar 2 10:35:00 PST 1998 
Responsible-Changed-Why:  
CVSup is John's area of expertise. 

From: "Jordan K. Hubbard" <jkh@time.cdrom.com>
To: sec@yoda.pi.musin.de
Cc: FreeBSD-gnats-submit@FreeBSD.ORG
Subject: Re: misc/5900: cvsup problem/corrupt files. 
Date: Mon, 02 Mar 1998 14:26:20 -0800

 You're not doing this over NFS, are you?

From: Stefan `Sec` Zehl <sec@yoda.pi.musin.de>
To: "Jordan K. Hubbard" <jkh@time.cdrom.com>
Cc: FreeBSD-gnats-submit@FreeBSD.ORG
Subject: Re: misc/5900: cvsup problem/corrupt files.
Date: Mon, 2 Mar 1998 23:51:29 +0100

 On Mon, Mar 02, 1998 at 02:26:20PM -0800, Jordan K. Hubbard wrote:
 > You're not doing this over NFS, are you?
 
 No. The only thing which is nfs mounted are /usr/ports (which arent
 touched by this process.) - And occasionally i mount /usr async
 (especially for doing large "rm -rf"'s)
 
 yoda:~>mount
 /dev/sd0a on / (local)
 /dev/sd0s1f on /home (NFS exported, local)
 /dev/sd0s1g on /usr (local)
 /dev/sd0s1e on /var (local)
 procfs on /proc (local)
 /dev/sd1e on /opt (asynchronous, local)
 ewok:/usr/ports on /ewok/ports
 
 CU,
     Sec
 -- 
 Komme wieder
State-Changed-From-To: open->closed 
State-Changed-By: jdp 
State-Changed-When: Mon Mar 2 22:47:49 PST 1998 
State-Changed-Why:  
This is not a bug in CVSup.  I hate to be the person to deliver the 
bad news, but you have either a hardware problem or some sort of VM related 
software problem in your kernel.  It is almost certainly a hardware 
problem, because many people are successfully running CVSup under 
2.2.5-stable. 

If you look at the corrupted files with "hd", you will find that the 
blocks of 0 bytes begin at offsets which are multiples of 512, i.e., on 
sector boundaries.  I have seen this same problem on other systems, and 
it is always a hardware problem. 

Whenever CVSup updates any file, it calculates the MD5 checksum as it 
is writing the file.  If the checksum comes out wrong, CVSup complains 
loudly.  Since it did not complain, the file was valid at the time CVSup 
wrote it.  It either got corrupted on the way from the kernel to the 
disk, or it got corrupted some time later. 

Check your cabling, check your disk controller, check your BIOS settings, 
check your power supply, and check your hard disk.  The problem could 
be in any of these components, or even in others. 

John 

PS - And if it's a SCSI system, check your termination. 
>Unformatted:
