File corruption linux 2.4 nfs client to freebsd server
Subsystems (2)
Hi all..
I'm having a nasty problem where files seem to be corrupted by the linux 2.4 nfs client. Of course I cannot rule out the possibility that the FreeBSD nfs server is to blame, but the problem did not appear before upgrading to Redhat 9.
My setup:
Server: FreeBSD 4.8-STABLE (SMP)
Client: Redhat 9 (UP) with standard RH kernel which as far as I can see is Linus kernel 2.4.20 plus: linux-2.4.20-irixnfs.patch, linux-2.4.18-nfs-default-size.patch & linux-2.4.19-nfs-nosvc.patch.
Directory is mounted with options:
udp,nfsvers=3,rsize=8192,wsize=8192,nosuid, nodev, hard, intr
I couldn't make nfs over tcp work, although the bsd server should support it.
Network is fully switched and unloaded, as is the server.
The problem seem to be related to caching, although I cannot say for sure. It is very consistent so timing does not seem to play a big part in this.
copy a largish source tree (from the client)
create a tar archive from the freshly copied (from the same client)
The archiving fails at the _exact_ same file every time with the rather strange message:
tar: evncserver-0.4.4/programs/Xserver/mi/mipolycon.c: File shrank by 0 bytes; padding with zeros
I don't think one should get hung up on the 0 bytes shrinkage, that is apparently a bug in the calculation in tar. Also I can make gcc fail with an internal compiler error on another large source tree freshly checked out from cvs, with the error appearing on the same file every time. Restarting the compilation then succeeds.
I've tried most combinations of mount options, but problem persist.
I can send tcpdumps or output from nfs layer debugging if necessary. It is quite strange, the particular file does not show up in the debug messages at all, but it _is_ present in the directory.
I hope somebody have an idea of what goes wrong.
- Morten
Signature · 19 lines
Morten Sylvest Olsen System Developer Medical Insight A/S Hovedgaden 451 C DK-2640 Hedehusene, Denmark Phone: +45-46550444, Mobile: +45-51573092 E-mail: [email protected] ------------------------------------------------------- This SF.net email is sponsored by: SF.net Giveback Program. Does SourceForge.net help you be more productive? Does it help you create better code? SHARE THE LOVE, and help us help YOU! Click Here: http://sourceforge.net/donate/ _______________________________________________ NFS maillist - [email protected] https://lists.sourceforge.net/lists/listinfo/nfs
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
" " == Morten Sylvest Olsen <[email protected]> writes:
> I hope somebody have an idea of what goes wrong.
Have you tried running memtest86 (see http://www.memtest86.com/)? If you are seeing gcc internal errors, then that is usually the very first thing you want to do.
If you machine passes memtest86, then try downloading fsx-linux
(http://www.codemonkey.org.uk/cruft/fsx-linux.c) and running that. That should be able to give a more precise picture of what is going wrong ("File shrank by 0 bytes" isn't one of the usual kernel errors 8-)).
The other thing that comes to mind is to check if you've been playing with setting disk quotas on the server.
Cheers,
Trond
-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program. Does SourceForge.net help you be more productive? Does it help you create better code? SHARE THE LOVE, and help us help YOU! Click Here: http://sourceforge.net/donate/
_______________________________________________
NFS maillist - [email protected]
https://lists.sourceforge.net/lists/listinfo/nfs
ons, 2003-11-19 kl. 16:37 skrev Trond Myklebust:
Quoted 8 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
" " == Morten Sylvest Olsen <[email protected]> writes:
> I hope somebody have an idea of what goes wrong.
Have you tried running memtest86 (see http://www.memtest86.com/)? If you are seeing gcc internal errors, then that is usually the very first thing you want to do.
Quoted 5 lines
If you machine passes memtest86, then try downloading fsx-linux
(http://www.codemonkey.org.uk/cruft/fsx-linux.c) and running that. That should be able to give a more precise picture of what is going wrong ("File shrank by 0 bytes" isn't one of the usual kernel errors 8-)).
Yeah, sorry thats not very clear I guess.. :) I didn't really have a small test-case, and had forgot about the filesystem exerciser.
I have a range of clients, from laptops to 3 identical IBM Intellistations, which all exhibit the behavior. (which have ECC memory, although thats probably no guarantee). I guess the gcc internal error stems from it not responding well to I/O errors.
There are no quotas on the server, and no kernel messages or anything to indicate disk trouble. I can run fsx locally and over a loopback nfs mount on the server without errors.
I can reproduce the problem on the clients using fsx. The error occurs after 25407 fsx operations with an I/O error, with no difference between test file and fsxgood file. (default options to fsx)
- Morten
Signature · 19 lines
Morten Sylvest Olsen System Developer Medical Insight A/S Hovedgaden 451 C DK-2640 Hedehusene, Denmark Phone: +45-46550444, Mobile: +45-51573092 E-mail: [email protected] ------------------------------------------------------- This SF.net email is sponsored by: SF.net Giveback Program. Does SourceForge.net help you be more productive? Does it help you create better code? SHARE THE LOVE, and help us help YOU! Click Here: http://sourceforge.net/donate/ _______________________________________________ NFS maillist - [email protected] https://lists.sourceforge.net/lists/listinfo/nfs
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
" " == Morten Sylvest Olsen <[email protected]> writes:
> I can reproduce the problem on the clients using fsx. The error > occurs after 25407 fsx operations with an I/O error, with no > difference between test file and fsxgood file. (default options > to fsx)
Could you show us the output of the last 20 lines or so from the fsx logfile? As I said, I'd like to know which operation is failing.
Cheers,
Trond
-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program. Does SourceForge.net help you be more productive? Does it help you create better code? SHARE THE LOVE, and help us help YOU! Click Here: http://sourceforge.net/donate/
_______________________________________________
NFS maillist - [email protected]
https://lists.sourceforge.net/lists/listinfo/nfs
Quoting Trond Myklebust <[email protected]>:
Quoted 9 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
" " == Morten Sylvest Olsen <[email protected]> writes:
> I can reproduce the problem on the clients using fsx. The error > occurs after 25407 fsx operations with an I/O error, with no > difference between test file and fsxgood file. (default options > to fsx)
Could you show us the output of the last 20 lines or so from the fsx logfile? As I said, I'd like to know which operation is failing.
It fails in read:
..
truncating to largest ever: 0x3ff9d
truncating to largest ever: 0x3ffff
doread: read: Input/output error
LOG DUMP (25407 total operations):
25408(64 mod 256): MAPREAD 0x324b6 thru 0x346b4 (0x21ff bytes) 25409(65 mod 256): WRITE 0x24755 thru 0x2bd12 (0x75be bytes)
25410(66 mod 256): TRUNCATE DOWN from 0x40000 to 0x3a9da
..
..
25397(53 mod 256): MAPWRITE 0x1bdd0 thru 0x22566 (0x6797 bytes)
25398(54 mod 256): WRITE 0xc250 thru 0xdf81 (0x1d32 bytes)
25399(55 mod 256): READ 0x4623 thru 0xccbb (0x8699 bytes)
25400(56 mod 256): TRUNCATE UP from 0x27a7b to 0x35bd2
25401(57 mod 256): MAPWRITE 0x27a6a thru 0x29c1d (0x21b4 bytes)
25402(58 mod 256): TRUNCATE UP from 0x35bd2 to 0x3ffff 25403(59 mod 256): MAPWRITE 0x1aac thru 0xf308 (0xd85d bytes)
25404(60 mod 256): READ 0x3138b thru 0x3561c (0x4292 bytes)
25405(61 mod 256): MAPREAD 0x25daa thru 0x32ef9 (0xd150 bytes)
25406(62 mod 256): READ 0x3064b thru 0x33366 (0x2d1c bytes)
25407(63 mod 256): READ 0x3f973 thru 0x3fffe (0x68c bytes)
- Morten
-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program. Does SourceForge.net help you be more productive? Does it help you create better code? SHARE THE LOVE, and help us help YOU! Click Here: http://sourceforge.net/donate/
_______________________________________________
NFS maillist - [email protected]
https://lists.sourceforge.net/lists/listinfo/nfs
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
" " == Morten Olsen <[email protected]> writes:
> 0x27a7b to 0x35bd2 25401(57 mod 256): MAPWRITE 0x27a6a thru
> 0x29c1d (0x21b4 bytes) 25402(58 mod 256): TRUNCATE UP from
> 0x35bd2 to 0x3ffff 25403(59 mod 256): MAPWRITE 0x1aac thru
> 0xf308 (0xd85d bytes) 25404(60 mod 256): READ 0x3138b thru
> 0x3561c (0x4292 bytes) 25405(61 mod 256): MAPREAD 0x25daa thru
> 0x32ef9 (0xd150 bytes) 25406(62 mod 256): READ 0x3064b thru
> 0x33366 (0x2d1c bytes) 25407(63 mod 256): READ 0x3f973 thru
> 0x3fffe (0x68c bytes)I strongly suspect a server bug. This one looks so obvious that I would have caught it on my own testrigs.
Just to make sure, though, could you please send me a tcpdump of those last few seconds when doing fsx? A binary dump, with snaplen=9000.
tcpdump -w dump.out -s 9000 host freebsd.server and port 2049
Cheers,
Trond
-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program. Does SourceForge.net help you be more productive? Does it help you create better code? SHARE THE LOVE, and help us help YOU! Click Here: http://sourceforge.net/donate/
_______________________________________________
NFS maillist - [email protected]
https://lists.sourceforge.net/lists/listinfo/nfs