Re: mmap over NFS fails on binaries and shared libs in 2.1.61?

Richard Jones (rjones@imcl.com)
Tue, 11 Nov 1997 12:23:05 +0000


Some more information on this bug ... I've got two identically
configured machines here, except that one's running 2.1.61 + CVS
patches and one's running plain 2.0.31.

Here are some extracts from strace running on both machines. I'm
trying to run ``idraw'' which is trying to mmap ``libUnidraw.so'':

On whistler (2.1.61 + vger CVS patches):

open("/usr/local/i386-unknown-linux/lib/libUnidraw.so", O_RDONLY) = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3"..., 4096) = 4096
mmap(0, 983040, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x40042000
mmap(0x40042000, 882556, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED, 3, 0) = 0x40042000
mmap(0x4011a000, 96332, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 3, 0xd7000) = -1 EINVAL (Invalid argument)

On chamonix (2.0.31):

open("/usr/local/i386-unknown-linux/lib/libUnidraw.so", O_RDONLY) = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3"..., 4096) = 4096
mmap(0, 983040, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x40042000
mmap(0x40042000, 882556, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED, 3, 0) = 0x40042000
mmap(0x4011a000, 96332, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 3, 0xd7000) = 0x4011a000
close(3) = 0

On whistler with libUnidraw copied to local drive
/tmp first:

open("/tmp/libUnidraw.so", O_RDONLY) = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3"..., 4096) = 4096
mmap(0, 983040, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x40042000
mmap(0x40042000, 882556, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED, 3, 0) = 0x40042000
mmap(0x4011a000, 96332, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 3, 0xd7000) = 0x4011a000
close(3) = 0

Strange! Note that not all NFS-mounted libraries fail,
but libUnidraw.so fails consistently from NFS.

Rich.

----------

Richard Jones wrote:
>
> I don't know if anyone's seen this. Apologies in advance if
> it is a well-known bug.
>
> Since installing 2.1.61 + Dave's CVS patches (971103), some
> binaries and shared libraries fail to work, but only when
> they are on NFS-mounted drives.
[...]

-- 
Richard Jones  rjones@imcl.com  Tel: +44 171 460 6141  Fax: .. 4461
ABLE INmEDIA Ltd.  262a Fulham Rd.  London  SW10 9EL.  "you'll write in
PGP: www.four11.com     telegraphic, or you won't write at all" [Céline]