lkml.org 
[lkml]   [1998]   [Jan]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: Data corruption with NFS in 2.1.x?
Hi!

On Sun, 18 Jan 1998, Bill Hawes wrote:

> I've tested with 'make bootstrap' and 'make compare' with no differences
> found, and will post a patch later today after a little more
> cleanup/review.

I've narrowed it down a bit:
the program t2.s, generated by cc1 from 'int a;',
---------
.file "t2.c"
.version "01.01"
gcc2_compiled.:
.comm a,4,4
.ident "GCC: (GNU) 2.7.2.1"
---------
when assembled with 'as -o t2.o t2.s', sometimes has one random byte at pos
152 (1-based) instead of a zero. The strace:
---------
execve("/usr/bin/as", ["as", "-o", "t2.o", "t2.s"], [/* 43 vars */]) = 0
brk(0) = 0x80a1a04
open("/etc/ld.so.preload", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/local/qt/lib/libc.so.6", O_RDONLY) = -1 ENOENT (No such file or directory)
open("libc.so.6", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/local/kde/lib/libc.so.6", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/etc/ld.so.cache", O_RDONLY) = 4
fstat(4, {st_mode=S_IFREG|0644, st_size=13833, ...}) = 0
mmap(0, 13833, PROT_READ, MAP_PRIVATE, 4, 0) = 0x4000c000
close(4) = 0
open("/lib/libc.so.6", O_RDONLY) = 4
mmap(0, 4096, PROT_READ, MAP_PRIVATE, 4, 0) = 0x40010000
munmap(0x40010000, 4096) = 0
mmap(0, 650060, PROT_READ|PROT_EXEC, MAP_PRIVATE, 4, 0) = 0x40010000
mprotect(0x4009f000, 64332, PROT_NONE) = 0
mmap(0x4009f000, 16384, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 4, 0x8e000) = 0x4009f000
mmap(0x400a3000, 47948, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x400a3000
close(4) = 0
mprotect(0x40010000, 585728, PROT_READ|PROT_WRITE) = 0
mprotect(0x40010000, 585728, PROT_READ|PROT_EXEC) = 0
personality(PER_LINUX) = 0
getpid() = 3041
times({tms_utime=1, tms_stime=1, tms_cutime=0, tms_cstime=0}) = 65182
brk(0) = 0x80a1a04
brk(0x80a4a24) = 0x80a4a24
brk(0x80a5000) = 0x80a5000
brk(0x80a7000) = 0x80a7000
brk(0x80ab000) = 0x80ab000
brk(0x80ad000) = 0x80ad000
brk(0x80be000) = 0x80be000
brk(0x80c2000) = 0x80c2000
unlink("t2.o") = 0
open("t2.o", O_WRONLY|O_CREAT|O_TRUNC, 0666) = 4
brk(0x80c4000) = 0x80c4000
brk(0x80c6000) = 0x80c6000
brk(0x80c8000) = 0x80c8000
brk(0x80cc000) = 0x80cc000
brk(0x80ce000) = 0x80ce000
brk(0x80d0000) = 0x80d0000
brk(0x80d2000) = 0x80d2000
brk(0x80d6000) = 0x80d6000
brk(0x80da000) = 0x80da000
open("t2.s", O_RDONLY) = 5
fstat(5, {st_mode=S_IFREG|0644, st_size=90, ...}) = 0
mmap(0, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x400af000
read(5, "\t.file\t\"t2.c\"\n\t.version\t\""..., 4096) = 90
read(5, "", 4096) = 0
read(5, "", 4096) = 0
read(5, "", 4096) = 0
close(5) = 0
munmap(0x400af000, 4096) = 0
brk(0x80db000) = 0x80db000
brk(0x80df000) = 0x80df000
brk(0x80e0000) = 0x80e0000
brk(0x80e4000) = 0x80e4000
fstat(4, {st_mode=S_IFREG|0644, st_size=0, ...}) = 0
mmap(0, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x400af000
lseek(4, 656, SEEK_SET) = 656
write(4, "\0t2.c\0gcc2_compiled.\0a\0", 23) = 23
lseek(4, 52, SEEK_SET) = 52
write(4, "\10\0\0\0\0\0\0\0\1\0\0\00001.01"..., 40) = 40
lseek(4, 512, SEEK_SET) = 512
write(4, "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 144) = 144
lseek(4, 92, SEEK_SET) = 92
write(4, "\0.symtab\0.strtab\0.shstrtab\0."..., 59) = 59
lseek(4, 0, SEEK_SET) = 0
write(4, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\1"..., 52) = 52
lseek(4, 152, SEEK_SET) = 152
write(4, "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 360) = 360
close(4) = 0
munmap(0x400af000, 4096) = 0
_exit(0) = ?
---------

I reduced this to
---------
.ident "GCC: (GNU) 2.7.2.1"
---------
execve("/usr/bin/as", ["as", "-o", "t5.o", "t5.s"], [/* 43 vars */]) = 0
brk(0) = 0x80a1a04
open("/etc/ld.so.preload", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/local/qt/lib/libc.so.6", O_RDONLY) = -1 ENOENT (No such file or directory)
open("libc.so.6", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/local/kde/lib/libc.so.6", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/etc/ld.so.cache", O_RDONLY) = 4
fstat(4, {st_mode=S_IFREG|0644, st_size=13833, ...}) = 0
mmap(0, 13833, PROT_READ, MAP_PRIVATE, 4, 0) = 0x4000c000
close(4) = 0
open("/lib/libc.so.6", O_RDONLY) = 4
mmap(0, 4096, PROT_READ, MAP_PRIVATE, 4, 0) = 0x40010000
munmap(0x40010000, 4096) = 0
mmap(0, 650060, PROT_READ|PROT_EXEC, MAP_PRIVATE, 4, 0) = 0x40010000
mprotect(0x4009f000, 64332, PROT_NONE) = 0
mmap(0x4009f000, 16384, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 4, 0x8e000) = 0x4009f000
mmap(0x400a3000, 47948, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x400a3000
close(4) = 0
mprotect(0x40010000, 585728, PROT_READ|PROT_WRITE) = 0
mprotect(0x40010000, 585728, PROT_READ|PROT_EXEC) = 0
personality(PER_LINUX) = 0
getpid() = 3045
times({tms_utime=1, tms_stime=1, tms_cutime=0, tms_cstime=0}) = 67348
brk(0) = 0x80a1a04
brk(0x80a4a24) = 0x80a4a24
brk(0x80a5000) = 0x80a5000
brk(0x80a7000) = 0x80a7000
brk(0x80ab000) = 0x80ab000
brk(0x80ad000) = 0x80ad000
brk(0x80be000) = 0x80be000
brk(0x80c2000) = 0x80c2000
unlink("t5.o") = 0
open("t5.o", O_WRONLY|O_CREAT|O_TRUNC, 0666) = 4
brk(0x80c4000) = 0x80c4000
brk(0x80c6000) = 0x80c6000
brk(0x80c8000) = 0x80c8000
brk(0x80cc000) = 0x80cc000
brk(0x80ce000) = 0x80ce000
brk(0x80d0000) = 0x80d0000
brk(0x80d2000) = 0x80d2000
brk(0x80d6000) = 0x80d6000
brk(0x80da000) = 0x80da000
open("t5.s", O_RDONLY) = 5
fstat(5, {st_mode=S_IFREG|0644, st_size=29, ...}) = 0
mmap(0, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x400af000
read(5, "\t.ident\t\"GCC: (GNU) 2.7.2.1\""..., 4096) = 29
read(5, "", 4096) = 0
read(5, "", 4096) = 0
read(5, "", 4096) = 0
close(5) = 0
munmap(0x400af000, 4096) = 0
brk(0x80de000) = 0x80de000
brk(0x80e2000) = 0x80e2000
fstat(4, {st_mode=S_IFREG|0644, st_size=0, ...}) = 0
mmap(0, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x400af000
lseek(4, 528, SEEK_SET) = 528
write(4, "\0", 1) = 1
lseek(4, 52, SEEK_SET) = 52
write(4, "\0GCC: (GNU) 2.7.2.1\0", 20) = 20
lseek(4, 448, SEEK_SET) = 448
write(4, "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 80) = 80
lseek(4, 72, SEEK_SET) = 72
write(4, "\0.symtab\0.strtab\0.shstrtab\0."..., 53) = 53
lseek(4, 0, SEEK_SET) = 0
write(4, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\1"..., 52) = 52
lseek(4, 128, SEEK_SET) = 128
write(4, "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 320) = 320
close(4) = 0
munmap(0x400af000, 4096) = 0
_exit(0) = ?
---------
This gives differences in the 126th to 128th byte; most times all three, but
sometimes only byte no 126 or 126 and 127. Looks like it always hits at holes
in the file.

MfG,
Ulrich


---
"If you were a boy I'd say are you going to seek your fortune?" "Can't girls
seek their fortune?" "I think they're supposed to seek a boy with a fortune."
T. Pratchett, "Equal Rites"


\
 
 \ /
  Last update: 2005-03-22 13:41    [W:0.730 / U:0.040 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site