You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Nelson Elhage <ne...@MIT.EDU> on 2007/03/26 21:19:28 UTC

svn commit bug over NFS

Hi,

I'm experiencing a repeatable bug with svn 1.4.2 checking into a
NFS-mounted repository via a file:// path.

Any attempts to commit to the repository yield the following error:

Transmitting file data .svn: Commit failed (details follow):
svn: Cannot write to the prototype revision file of transaction '14-1' because a previous representation is currently being written by another process

The repository is NFS-mounted:

$ mount | grep /data
lunatique.local:/data on /data type nfs (rw,addr=10.0.1.1)

$ grep /data /etc/fstab
lunatique.local:/data   /data   nfs     defaults,noauto 0       0

svn is 1.4.2:

$ svn --version
svn, version 1.4.2 (r22196)
   compiled Nov 10 2006, 17:39:50

Copyright (C) 2000-2006 CollabNet.
Subversion is open source software, see http://subversion.tigris.org/
This product includes software developed by CollabNet (http://www.Collab.Net/).

The following repository access (RA) modules are available:

* ra_dav : Module for accessing a repository via WebDAV (DeltaV) protocol.
  - handles 'http' scheme
  - handles 'https' scheme
* ra_svn : Module for accessing a repository using the svn network protocol.
  - handles 'svn' scheme
* ra_local : Module for accessing a repository on local disk.
  - handles 'file' scheme

The repository information is:

$svn info
Path: .
URL: file:///data/svn/auth.mit.edu
Repository Root: file:///data/svn/auth.mit.edu
Repository UUID: 48c81eb8-0036-439c-8de2-9e4937d4e0d3
Revision: 14
Node Kind: directory
Schedule: normal
Last Changed Author: nelhage
Last Changed Rev: 14
Last Changed Date: 2007-03-26 16:41:18 -0400 (Mon, 26 Mar 2007)

I've talked to David Glasser about the problem, and he mentioned he
believes it to be related to subversion r21738.

A strace of the failing commit attempt is attached.

Please let me know if I can provide any more information that might be
helpful.

- Nelson Elhage

Re: svn commit bug over NFS

Posted by Malcolm Rowe <ma...@farside.org.uk>.
On Mon, Mar 26, 2007 at 06:22:43PM -0400, David Glasser wrote:
> On 3/26/07, David Glasser <gl...@mit.edu> wrote:
> >On 3/26/07, Nelson Elhage <ne...@mit.edu> wrote:
> >> Transmitting file data .svn: Commit failed (details follow):
> >> svn: Cannot write to the prototype revision file of transaction '14-1' 
> >because a previous representation is currently being written by another 
> >process
> >
> 
> fcntl64(6, F_SETLK, {type=F_WRLCK, whence=SEEK_SET, start=0, len=0}) =
> -1 EACCES (Permission denied)
> 
> I know very little about NFS... do you need to specially allow users
> to lock files (like in AFS)?
> 

Not that I'm aware of, and yes, that's the line that's causing the problem.

Nelson, could you try repeating your test with 1.4.0 and capture the
strace output again?  What _should_ happen is you get a failure slightly
later on in the commit, when trying to lock the write-lock file that
serialises writers to the filesystem, but it's always possible that
there's a subtle differences between the two locking calls that I'm not
aware of.

Regards,
Malcolm

Re: svn commit bug over NFS

Posted by Nelson Elhage <ne...@MIT.EDU>.
Ah, thanks for the pointer. Some googling reveals that lockd is not
supported by the userspace NFS server, which is what I had been
running. Switching over to the kernelspace server appears to have
resolved the issue.

Thanks for looking into, and sorry for bothering you with an unrelated
problem.

- Nelson Elhage

On Tue, Mar 27, 2007 at 10:11:09AM +0200, Erik Huelsmann wrote:
> On 3/27/07, David Glasser <gl...@mit.edu> wrote:
> >On 3/26/07, David Glasser <gl...@mit.edu> wrote:
> >> On 3/26/07, Nelson Elhage <ne...@mit.edu> wrote:
> >> > Transmitting file data .svn: Commit failed (details follow):
> >> > svn: Cannot write to the prototype revision file of transaction '14-1' 
> >because a previous representation is currently being written by another 
> >process
> >>
> >> One question: is the transaction id (14-1) consistent?
> >
> >Ah, I guess it make sense if it does because from the strace it looks
> >like it cleans up the entire transaction after it fails.
> >
> >The key line seems to be:
> >
> >fcntl64(6, F_SETLK, {type=F_WRLCK, whence=SEEK_SET, start=0, len=0}) =
> >-1 EACCES (Permission denied)
> >
> >I know very little about NFS... do you need to specially allow users
> >to lock files (like in AFS)?
> 
> I think you need to run the locking daemon lockd. Is he?
> 
> bye,
> 
> Erik.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: svn commit bug over NFS

Posted by Erik Huelsmann <eh...@gmail.com>.
On 3/27/07, David Glasser <gl...@mit.edu> wrote:
> On 3/26/07, David Glasser <gl...@mit.edu> wrote:
> > On 3/26/07, Nelson Elhage <ne...@mit.edu> wrote:
> > > Transmitting file data .svn: Commit failed (details follow):
> > > svn: Cannot write to the prototype revision file of transaction '14-1' because a previous representation is currently being written by another process
> >
> > One question: is the transaction id (14-1) consistent?
>
> Ah, I guess it make sense if it does because from the strace it looks
> like it cleans up the entire transaction after it fails.
>
> The key line seems to be:
>
> fcntl64(6, F_SETLK, {type=F_WRLCK, whence=SEEK_SET, start=0, len=0}) =
> -1 EACCES (Permission denied)
>
> I know very little about NFS... do you need to specially allow users
> to lock files (like in AFS)?

I think you need to run the locking daemon lockd. Is he?

bye,

Erik.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: svn commit bug over NFS

Posted by David Glasser <gl...@mit.edu>.
On 3/26/07, David Glasser <gl...@mit.edu> wrote:
> On 3/26/07, Nelson Elhage <ne...@mit.edu> wrote:
> > Transmitting file data .svn: Commit failed (details follow):
> > svn: Cannot write to the prototype revision file of transaction '14-1' because a previous representation is currently being written by another process
>
> One question: is the transaction id (14-1) consistent?

Ah, I guess it make sense if it does because from the strace it looks
like it cleans up the entire transaction after it fails.

The key line seems to be:

fcntl64(6, F_SETLK, {type=F_WRLCK, whence=SEEK_SET, start=0, len=0}) =
-1 EACCES (Permission denied)

I know very little about NFS... do you need to specially allow users
to lock files (like in AFS)?

--dave

-- 
David Glasser | glasser@mit.edu | http://www.davidglasser.net/

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: svn commit bug over NFS

Posted by David Glasser <gl...@mit.edu>.
On 3/26/07, Nelson Elhage <ne...@mit.edu> wrote:
> Transmitting file data .svn: Commit failed (details follow):
> svn: Cannot write to the prototype revision file of transaction '14-1' because a previous representation is currently being written by another process

One question: is the transaction id (14-1) consistent?

--dave

-- 
David Glasser | glasser@mit.edu | http://www.davidglasser.net/

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org