Hi,

I run OpenBSD 3.7 on a i686 box and discovered following problem using it as 
an nfs client.

Scenario:
NFS Server: GNU/Linux (Debian unstable), Athlon 1.3GHz, kernel 2.6.11.10, 
kernelspace nfs server, NFSv3 enabled, TCP disabled.
NFS Client 1: OpenBSD 3.7 on a P3-733MHz, NFSv3, UDP, generic kernel
NFS Client 2: GNU/Linux (Arch current), AthlonXP 3200+, kernel 2.6.11.x
All computers are connected to a local private ethernet network.

Simple test case: (using the OpenBSD box)
cp /mnt/nfs_share/path_to_file/source_file /localdisk/path/target_file
where sizeof (source_file) > 2^32 bytes

Observed behaviour:
( sizeof( source_file ) - sizeof( target_file ) )
= 2^32 bytes
!=sizeof( source_file )

Example: A file copied from the nfs mount with a size of 4,428,851,200 bytes 
results in a copy that has a size of 133,883,904 bytes.

4,428,851,200 - 133,883,904 = 4,294,967,296 = 2^32

2nd test case (using the OpenBSD box):
cp /mnt/nfs_share/path_to_file/source_file /localdisk/path/target_file
where 2^31 bytes < sizeof (source_file) <= 2^32 bytes

Observed behaviour:
sizeof ( target_file ) = 0 bytes

Example: A file copied from the nfs mount with a size of 3,363,543,040 bytes 
results in a copy that has zero bytes size without getting an error message 
from cp.

X-check test case (using the GNU/Linux NFS client):
Repeat test cases 1 and 2.

Observed behaviour: Everthing works as it should, file copies are complete, 
md5sums and file sizes of original and copy match.

Further notes: 
Similiar problems could be observed with other userland programs that are 
reading a file from the nfs mount, e.g. a BitTorrent client downloading a 
torrent containing a sufficiently large file, or using wget to download a 
large file onto the nfs mount.

Writing, however, does not seem to be affected, cp'ing a large file onto the 
nfs share works. Dealing with very large files on the OpenBSD box locally did 
not reveal anything problematic, either.

/etc/fstab line for the nfs mount is:
machine_name:/path /mnt/mountpoint nfs noauto,rw,noexec,nodev,nosuid 0 0
(real names and paths substituted with generic terms)

Advice is appreciated.

Regards,
Dominik
-- 
The duration of passion is proportionate with the original resistance
of the woman.
                -- Honor'e DeBalzac

Reply via email to