* 2.6.X File locking on NFS stil broken
@ 2004-06-09 19:17 Ruben Puettmann
2004-06-09 20:41 ` Trond Myklebust
0 siblings, 1 reply; 3+ messages in thread
From: Ruben Puettmann @ 2004-06-09 19:17 UTC (permalink / raw)
To: linux-kernel; +Cc: nfs
hello,
I have a big iproblem with the nfs file locking on some 2.6 er kernel
Kernel Server: 2.4.9
Kernel Client: 2.6.7-rc3-bk2
2.6.6-rc3-mm2
2.6.5
mount options :
10.0.0.149:/export /mnt/server nfs rw,auto,soft,bg,timeo=12,retrans=3,in tr,rsize=8192,wsize=8192,mountvers=3,nfsvers=3,udp 0 0
nfs-utils : 1.0.6
Both Server an Client Debian Sarge. Wiht kernel 2.4.21-pre5 the locking
runs very fine against the server.
This little testscript I used ( got it from a friend):
#define _GNU_SOURCE
#include <unistd.h>
#include <stdio.h>
#include <fcntl.h>
#include <string.h>
#include <errno.h>
int main(int c, char **v)
{
for (++v, --c; c--; ++v) {
struct flock lck = {F_RDLCK, SEEK_SET, 0, 0}; /* whole file */
int fd = open(*v, O_RDONLY);
if ( fd < 0 )
fprintf(stderr, "%s: %s\n", *v, strerror(errno));
else {
if ( fcntl(fd, F_SETLK, &lck) < 0 )
fprintf(stderr, "%s[%d]: %s\n", *v, lck.l_pid, strerror(errno));
else
printf("%s..ok\n", *v);
close(fd);
}
}
return 0;
}
The programm hangs after executing ./script testfile.
Ruben
--
Ruben Puettmann
ruben@puettmann.net
http://www.puettmann.net
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: 2.6.X File locking on NFS stil broken 2004-06-09 19:17 2.6.X File locking on NFS stil broken Ruben Puettmann @ 2004-06-09 20:41 ` Trond Myklebust [not found] ` <20040609204235.GC29969@puettmann.net> 0 siblings, 1 reply; 3+ messages in thread From: Trond Myklebust @ 2004-06-09 20:41 UTC (permalink / raw) To: Ruben Puettmann; +Cc: linux-kernel, nfs P=E5 on , 09/06/2004 klokka 15:17, skreiv Ruben Puettmann: > hello, >=20 >=20 > I have a big iproblem with the nfs file locking on some 2.6 er kernel= =20 >=20 > Kernel Server: 2.4.9 > Kernel Client: 2.6.7-rc3-bk2 > 2.6.6-rc3-mm2 > 2.6.5 <snip> > This little testscript I used ( got it from a friend): That script works fine for me: I haven't seen any hangs on locking in any of the 2.6 series kernels so far. What does 'rpcinfo -p' show on the client and server? Cheers, Trond ^ permalink raw reply [flat|nested] 3+ messages in thread
[parent not found: <20040609204235.GC29969@puettmann.net>]
[parent not found: <1086814428.4078.35.camel@lade.trondhjem.org>]
[parent not found: <20040609210313.GE29969@puettmann.net>]
[parent not found: <1086815623.4078.43.camel@lade.trondhjem.org>]
* Re: 2.6.X File locking on NFS stil broken [not found] ` <1086815623.4078.43.camel@lade.trondhjem.org> @ 2004-06-09 21:24 ` Ruben Puettmann 0 siblings, 0 replies; 3+ messages in thread From: Ruben Puettmann @ 2004-06-09 21:24 UTC (permalink / raw) To: Trond Myklebust; +Cc: linux-kernel, nfs [-- Attachment #1: Type: text/plain, Size: 826 bytes --] On Wed, Jun 09, 2004 at 05:13:43PM -0400, Trond Myklebust wrote: > På on , 09/06/2004 klokka 17:03, skreiv Ruben Puettmann: > > > attached the strace and one tcpdump from the testprogramm. > > According to that tcpdump, the server is denying you the lock because it > is still in its grace period. > > During that period only clients that held locks before the server > rebooted are allowed to reclaim those locks. Your client will need to > wait until that grace period is over (usually ~ 1 minute or so). > I have done a reboot on teh server ( It was up for over 315 day's ;-( ) now all runs fine seems to be an race condition. I will take a look on it if this happend again. Thanks for your help !! Ruben -- Ruben Puettmann ruben@puettmann.net http://www.puettmann.net [-- Attachment #2: Digital signature --] [-- Type: application/pgp-signature, Size: 189 bytes --] ^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2004-06-09 21:24 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-06-09 19:17 2.6.X File locking on NFS stil broken Ruben Puettmann
2004-06-09 20:41 ` Trond Myklebust
[not found] ` <20040609204235.GC29969@puettmann.net>
[not found] ` <1086814428.4078.35.camel@lade.trondhjem.org>
[not found] ` <20040609210313.GE29969@puettmann.net>
[not found] ` <1086815623.4078.43.camel@lade.trondhjem.org>
2004-06-09 21:24 ` Ruben Puettmann
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox