I have a machine with very little disk space (I've already deleted /usr/lib/locale :-). On this machine, I mount /var/tmp/portage from a server, as building most things takes *much* more space than I have locally. When emerging perl, configure hangs when running the following test code... #include <stdlib.h> #include <unistd.h> #include <fcntl.h> int main() { #if defined(F_SETLK) && defined(F_SETLKW) struct flock flock; int retval, fd; fd = open("try.c", O_RDONLY); flock.l_type = F_RDLCK; flock.l_whence = SEEK_SET; flock.l_start = flock.l_len = 0; retval = fcntl(fd, F_SETLK, &flock); close(fd); (retval < 0 ? exit(2) : exit(0)); #else exit(2); #endif } If I run this program (called try) after copying it (and try.c) to the local /tmp, it doesn't hang. If I run the program using strace, I can see that it's hanging in the fcntl() call (the actual system call is fcntl64). I'm sure this is a problem with the NFS server (another Gentoo box). The rpc.lockd program, which handles locking, is not running, but the manual page claims that the server should run it when neccessary. If you try to run it by hand anyway, it just exits. I expect the problem is a Linux kernel bug which Gentoo doesn't have a patch for. A quick google search revealed hints that there have been some recent problems in this area. My NFS server is compiled into the kernel, with NFSv3 enabled. The kernel is 2.4.19-gentoo-r7. Chris.
do you have any grsec options enabled ? ive seen a msg or 2 about people talking of weird nfs behavior w/certain grsec options turned on
No. None of the grsecurity stuff is enabled in the client or server kernels.
*** Bug 6433 has been marked as a duplicate of this bug. ***
This bug is rather old, still having this problem? tried emergeing the newest nfs-utils I committed to portage? THX
I've updated the server kernel (but not the client) to 2.4.19-gentoo-r9 and the problem seems to have gone away. The server will also have had nfs-utils updated as time passed (it's currently at 0.3.3-r1), so I'm not sure if the kernel update or the nfs-utils update is responsible for the fix. I'm doing some stress tests right now. I'll let you know how it goes. Chris.