[prev in list] [next in list] [prev in thread] [next in thread] 

List:       svk-devel
Subject:    [svk-devel] svk 2.0.0 does not work over NFS due to locking (flock)
From:       guillonc () free ! fr (Guillon Christophe)
Date:       2007-01-19 13:24:32
Message-ID: 007901c73bf6$f003c140$0100a8c0 () Paddy
[Download RAW message or body]

 Hi everybody,
on linux systems, svk 2.0.0 does not work when SVKROOT points to a NFS directory.
The symptom is that the giant lock can never be acquired and thus no command can be run.
For instance:
> svk ls //
Another svk might be running; remove /home/guillon/.svk/locked if not.
> rm /home/guillon/.svk/locked 
> svk ls //
Another svk might be running; remove /home/guillon/.svk/locked if not.

The work around is to set SVKROOT to a non-NFS path which is not convenient.
This bug was not present in svk 1.08, as atomic locking is only present since 2.0.0.

This is a problem known on Linux and BSD systems where flock() does not work on NFS mounted
directories.
I suggest to use the very useful LockFile::Simple from Raphael Manfredi (ref CPAN) which solves the
problem by providing a simple and portable locking scheme that also works for Win32 and Cygwin.

I Attached a patch to svk 2.0.0 (rev 2282) that uses LockFile::Simple instead of flock().
I have tested the patch under Linux, Win32 and Cygwin. 

   Hope it will be useful.
    Regards,
    -- Christophe

-------------- next part --------------
A non-text attachment was scrubbed...
Name: svk-lock.patch
Type: application/octet-stream
Size: 5588 bytes
Desc: not available
Url : http://lists.bestpractical.com/pipermail/svk-devel/attachments/20070119/c60a612f/svk-lock.obj

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic