From owner-freebsd-bugs Wed Feb 14 14:40:20 2001 Delivered-To: freebsd-bugs@hub.freebsd.org Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id 6F8DC37B491 for ; Wed, 14 Feb 2001 14:40:01 -0800 (PST) Received: (from gnats@localhost) by freefall.freebsd.org (8.11.1/8.11.1) id f1EMe1V79657; Wed, 14 Feb 2001 14:40:01 -0800 (PST) (envelope-from gnats) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id ECB6037B4EC for ; Wed, 14 Feb 2001 14:35:47 -0800 (PST) Received: (from nobody@localhost) by freefall.freebsd.org (8.11.1/8.11.1) id f1EMZlP79180; Wed, 14 Feb 2001 14:35:47 -0800 (PST) (envelope-from nobody) Message-Id: <200102142235.f1EMZlP79180@freefall.freebsd.org> Date: Wed, 14 Feb 2001 14:35:47 -0800 (PST) From: mjh@aciri.org To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-1.0 Subject: kern/25104: file corruption with Adaptec 29160 SCSI adapter Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org >Number: 25104 >Category: kern >Synopsis: file corruption with Adaptec 29160 SCSI adapter >Confidential: no >Severity: critical >Priority: high >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Wed Feb 14 14:40:01 PST 2001 >Closed-Date: >Last-Modified: >Originator: Mark Handley >Release: 4.2-RELEASE >Organization: ACIRI >Environment: gaur.aciri.org: uname -a FreeBSD gaur.aciri.org 4.2-RELEASE FreeBSD 4.2-RELEASE #1: Sat Jan 20 20:49:54 PST 2001 root@gaur.aciri.org:/usr/src/sys/compile/ACIRI-4.2-USB i386 >Description: I've got five 1.1GHz Athlon systems, running FreeBSD 4.2R with 512MB RAM, Asus A7V motherboards, Adaptec 29160 U160 SCSI adaptors, and SEAGATE ST318451LW 18GB drives. The problem is I'm seeing file corruption when I write large (approx 512Mb or larger) files, especially when I write them rapidly. I can't guarantee it doesn't happen with smaller files, but I wrote a thousand 100MB files, and not one of them was corrupted. The problem basically is that the files get 64-byte chunks (usally 64, sometimes smaller)of other data in the middle of them. I first noticed the problem with scp, but the problem also happens with moderate repeatability when simply rapidly writing a big file by redirecting stdout. Here's the quick-hack test program: #include #define FSIZE 1000*1024*1024 main() { int i,j; int buf[1024]; j=0; for(i=0;i #define FSIZE 1000*1024*1024 main() { int i; int j, prev; int mode=0; for(i=0;i AMD Features=0xc0440000<,AMIE,DSP,3DNow!> real memory = 536788992 (524208K bytes) avail memory = 518864896 (506704K bytes) Preloaded elf kernel "kernel" at 0xc03c8000. Pentium Pro MTRR support enabled md0: Malloc disk npx0: on motherboard npx0: INT 16 interface pcib0: on motherboard pci0: on pcib0 pcib2: at device 1.0 on pci0 pci1: on pcib2 isab0: at device 4.0 on pci0 isa0: on isab0 atapci0: port 0xd800-0xd80f at device 4.1 on pci0 ata1: at 0x170 irq 15 on atapci0 pci0: at 4.2 irq 12 pci0: at 4.3 irq 12 fxp0: port 0xa400-0xa43f mem 0xd6800000-0xd68fffff,0xd7000000-0xd7000fff irq 10 at device 11.0 on pci0 fxp0: Ethernet address 00:02:b3:10:b4:67 pci0: <3D Labs model 000a graphics accelerator> at 12.0 irq 11 ahc0: port 0xa000-0xa0ff mem 0xd5800000-0xd5800fff irq 12 at device 13.0 on pci0 aic7892: Wide Channel A, SCSI Id=7, 32/255 SCBs atapci1: port 0x8400-0x843f,0x8800-0x8803,0x9000-0x9007,0x9400-0x9403,0x9800-0x9807 mem 0xd5000000-0xd501ffff irq 10 at device 17.0 on pci0 pcib1: on motherboard pci2: on pcib1 fdc0: at port 0x3f0-0x3f5,0x3f7 irq 6 drq 2 on isa0 fdc0: FIFO enabled, 8 bytes threshold fd0: <1440-KB 3.5" drive> on fdc0 drive 0 atkbdc0: at port 0x60,0x64 on isa0 vga0: at port 0x3c0-0x3df iomem 0xa0000-0xbffff on isa0 sc0: at flags 0x100 on isa0 sc0: VGA <16 virtual consoles, flags=0x300> sio0 at port 0x3f8-0x3ff irq 4 flags 0x10 on isa0 sio0: type 16550A sio1 at port 0x2f8-0x2ff irq 3 on isa0 sio1: type 16550A DUMMYNET initialized (000608) IP packet filtering initialized, divert disabled, rule-based forwarding disabled, default to deny, logging disabled acd0: CDROM at ata1-master using PIO4 Waiting 5 seconds for SCSI devices to settle Mounting root from ufs:/dev/da0s1a da0 at ahc0 bus 0 target 0 lun 0 da0: Fixed Direct Access SCSI-3 device da0: 160.000MB/s transfers (80.000MHz, offset 63, 16bit), Tagged Queueing Enabled da0: 17501MB (35843671 512 byte sectors: 255H 63S/T 2231C) >How-To-Repeat: Write several very large files rapidly (see above). Some fraction of them will be corrupted (I see between 5% and 25% of 512MB files get corrupted). >Fix: >Release-Note: >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message