Date: Mon, 15 Aug 2005 14:38:03 GMT From: Vladimir Sharun <sharun@ukr.net> To: freebsd-gnats-submit@FreeBSD.org Subject: misc/84953: NFS locking issue in RELENG_6/i386/SMP Message-ID: <200508151438.j7FEc3HN074052@www.freebsd.org> Resent-Message-ID: <200508151440.j7FEeDN2038362@freefall.freebsd.org>
index | next in thread | raw e-mail
>Number: 84953
>Category: misc
>Synopsis: NFS locking issue in RELENG_6/i386/SMP
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: freebsd-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: sw-bug
>Submitter-Id: current-users
>Arrival-Date: Mon Aug 15 14:40:13 GMT 2005
>Closed-Date:
>Last-Modified:
>Originator: Vladimir Sharun
>Release: FreeBSD6
>Organization:
UkrNet ISP
>Environment:
FreeBSD krokodil.ukr.net 6.0-BETA2 FreeBSD 6.0-BETA2 #5: Sun Aug 7 19:15:28 EEST 2005 root@krokodil.ukr.net:/usr/obj/usr/src/sys/FISH.MP i386
>Description:
While setting a lock via fcntl on NFSv3 mount point, we stuck in uninterruptible wait (ps axc show D state for process.
Mounting NFS share without rpcbind/rpc.statd/rpc.lockd gaves errno 45 EOPNOTSUPP Operation not supported
>How-To-Repeat:
#include <stdio.h>
#include <errno.h>
#include <fcntl.h>
int main() {
int lockfd;
char* tempfile="/mnt/nfs/testfile";
lockfd=open(tempfile,O_CREAT);
printf("Open errno: %d\n",errno);
if (flock(lockfd, LOCK_SH|LOCK_NB)==-1) {
printf("ERROR shared lock: %d\n",errno);
}
if (flock(lockfd, LOCK_EX|LOCK_NB)==-1) {
printf("ERROR exclusive lock: %d\n",errno);
}
close(lockfd);
}
>Fix:
Rollback to RELENG_5
>Release-Note:
>Audit-Trail:
>Unformatted:
help
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200508151438.j7FEc3HN074052>
