[svk-devel] svk 2.0.0 does not work over NFS due to locking (flock)
implementation
Guillon Christophe
guillonc at free.fr
Fri Jan 19 13:23:37 EST 2007
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
More information about the svk-devel
mailing list