Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 22 Jan 2003 10:30:03 -0800 (PST)
From:      Stas Kysel <stas_k_freebsd@tiger.unisquad.com>
To:        freebsd-bugs@FreeBSD.org
Subject:   Re: kern/39043: Corrupted files on a FAT32 partition
Message-ID:  <200301221830.h0MIU3na082002@freefall.freebsd.org>

index | next in thread | raw e-mail

The following reply was made to PR kern/39043; it has been noted by GNATS.

From: Stas Kysel <stas_k_freebsd@tiger.unisquad.com>
To: freebsd-gnats-submit@FreeBSD.org, kesor@ulp.co.il
Cc:  
Subject: Re: kern/39043: Corrupted files on a FAT32 partition
Date: Wed, 22 Jan 2003 20:21:10 +0200

 Hi.
 
 Looks like samba guys are right - this is a bug in kernel, not in samba or
 windows :(
 ktrace/kdump shows that file (which appears corrupt on disk) was:
 1. opened:    CALL  open(0x81c1220,0xa02,0x1f4)
 2. truncated: CALL  ftruncate(0x13,0,0xbb0fb,0)
 then several times
   3. seeked to corresponding offset (0,0x10000,0x20000,...):
               CALL  lseek(0x13,0,0,0,0)
               CALL  lseek(0x13,0,0x10000,0,0)
               ...
   4. written by 64k chunks of data (not zeroes), except last write which was
      smaller of course:
               CALL  write(0x13,0x8229045,0x10000)
               CALL  write(0x13,0x8229045,0x10000)
               ...
 5. Then closed
 
 write() was always successful:
               RET   write 65536/0x10000
 
 Corruption is another type this time on all checked files - only first 32k
 are filled with data, the rest of file is zeroed.
 
 In addition it was stat()-ed several times and chmod() was tried on it,
 but unsuccessfully, because FAT32 does not support it.
 
 Not posting full kdump output here for brevity, but if someone wants
 to check me, I'll E-mail him corresponding parts of it.
 
 df output:
 ...
 /dev/ad2s1   39108736 7708608 31400128    20%    /share
 
 What can I do to help you to resolve this issue?
 
 Thank you for your attention.
 
 I've heard dmesg output is necessary. Not sure if it can help here, but
 just in case:
 ---------------------------------------------------------------------------
 Copyright (c) 1992-2002 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 4.7-RELEASE #3: Thu Jan  9 12:23:15 EET 2003
     stas@localhost:/usr/src/sys/compile/kernel
 Timecounter "i8254"  frequency 1193182 Hz
 CPU: Pentium II/Pentium II Xeon/Celeron (434.32-MHz 686-class CPU)
   Origin = "GenuineIntel"  Id = 0x665  Stepping = 5
   Features=0x183f9ff<FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,MMX,FXSR>
 real memory  = 133103616 (129984K bytes)
 config> di pcic0
 No such device: pcic0
 Invalid command or syntax.  Type `?' for help.
 config> di sn0
 No such device: sn0
 Invalid command or syntax.  Type `?' for help.
 config> di lnc0
 No such device: lnc0
 Invalid command or syntax.  Type `?' for help.
 config> di ie0
 No such device: ie0
 Invalid command or syntax.  Type `?' for help.
 config> di fe0
 No such device: fe0
 Invalid command or syntax.  Type `?' for help.
 config> di ed0
 No such device: ed0
 Invalid command or syntax.  Type `?' for help.
 config> di cs0
 No such device: cs0
 Invalid command or syntax.  Type `?' for help.
 config> di bt0
 No such device: bt0
 Invalid command or syntax.  Type `?' for help.
 config> di aic0
 No such device: aic0
 Invalid command or syntax.  Type `?' for help.
 config> di aha0
 No such device: aha0
 Invalid command or syntax.  Type `?' for help.
 config> di adv0
 No such device: adv0
 Invalid command or syntax.  Type `?' for help.
 config> q
 avail memory = 126320640 (123360K bytes)
 Preloaded elf kernel "kernel" at 0xc0326000.
 Preloaded userconfig_script "/boot/kernel.conf" at 0xc032609c.
 Pentium Pro MTRR support enabled
 npx0: <math processor> on motherboard
 npx0: INT 16 interface
 pcib0: <Intel 82810 (i810 GMCH) Host To Hub bridge> on motherboard
 pci0: <PCI bus> on pcib0
 pci0: <Intel 82810 (i810 GMCH) SVGA controller> at 1.0 irq 7
 pcib1: <Intel 82801AA (ICH) Hub to PCI bridge> at device 30.0 on pci0
 pci1: <PCI bus> on pcib1
 dc0: <Macronix 98715/98715A 10/100BaseTX> port 0xc000-0xc0ff mem 0xdd000000-0xdd0000ff irq 7 at device 0.0 on pci1
 dc0: Ethernet address: 00:80:ad:7e:2e:a4
 miibus0: <MII bus> on dc0
 dcphy0: <Intel 21143 NWAY media interface> on miibus0
 dcphy0:  10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto
 rl0: <RealTek 8139 10/100BaseTX> port 0xc400-0xc4ff mem 0xdd001000-0xdd0010ff irq 5 at device 2.0 on pci1
 rl0: Ethernet address: 00:50:ba:83:6d:54
 miibus1: <MII bus> on rl0
 rlphy0: <RealTek internal media interface> on miibus1
 rlphy0:  10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto
 isab0: <Intel 82801AA (ICH) PCI to LPC bridge> at device 31.0 on pci0
 isa0: <ISA bus> on isab0
 atapci0: <Intel ICH ATA66 controller> port 0xf000-0xf00f at device 31.1 on pci0
 ata0: at 0x1f0 irq 14 on atapci0
 ata1: at 0x170 irq 15 on atapci0
 pci0: <Intel 82801AA (ICH) USB controller> at 31.2 irq 12
 pcm0: <Intel 82801AA (ICH)> port 0xdc00-0xdc3f,0xd800-0xd8ff irq 11 at device 31.5 on pci0
 orm0: <Option ROM> at iomem 0xc0000-0xc7fff on isa0
 fdc0: ready for input in output
 fdc0: cmd 3 failed at out byte 1 of 3
 atkbdc0: <Keyboard controller (i8042)> at port 0x60,0x64 on isa0
 vga0: <Generic ISA VGA> at port 0x3c0-0x3df iomem 0xa0000-0xbffff on isa0
 sc0: <System console> 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 (011031)
 IP packet filtering initialized, divert enabled, rule-based forwarding enabled, default to accept, logging limited to 100 packets/entry by default
 ad0: 2060MB <SAMSUNG WU32163A (2.16GB)> [4186/16/63] at ata0-master UDMA33
 ad2: 38204MB <SAMSUNG SV4012H> [77622/16/63] at ata1-master UDMA66
 Mounting root from ufs:/dev/ad0s1a
 WARNING: / was not properly dismounted
 ---------------------------------------------------------------------------
 
 -- 
 Stas Kysel, UNIX Systems Administrator

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-bugs" in the body of the message



help

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