Subject: kern/36548: Trailing NULs written to files over NFS
To: None <,,>
From: None <>
List: netbsd-bugs
Date: 06/24/2007 15:50:00
>Number:         36548
>Category:       kern
>Synopsis:       Trailing NULs written to files over NFS
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    kern-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sun Jun 24 15:50:00 +0000 2007
>Originator:     Steve Woodford
>Release:        NetBSD 4.99.20
System: NetBSD 4.99.20 NetBSD 4.99.20 (NSLU2) #9: Sun Jun 24 15:48:32 BST 2007 steve@horace:/export/netbsd/sys/arch/evbarm/compile/NSLU2 evbarm
Architecture: armeb
Machine: evbarm
Using -current from a couple of days ago on an NFS client (root on NFS too),
some trailing NUL bytes are showing up on some newly-written files.

ktrace(1) on the client shows correct data being written over a number of
calls to write(2). However, tcpdump(8) on the server shows the trailing
NUL bytes.

Interestingly, it's the data from the final call to write(2) which is being
replaced by the NUL bytes. Immediately after the write(2), the process
invokes exit(2). The file size is correct.

I can provide kdump(1) output if necessary.
Try to build pkgsrc/pkgtools/digest over NFS. The work/.*
will be corrupted as described.

 Under certain circumstances, trailing NULs are written to files over NFS