info-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: CVS commit failure and lock files (under windows with cygwin)


From: Larry Jones
Subject: Re: CVS commit failure and lock files (under windows with cygwin)
Date: Thu, 12 Sep 2002 12:03:56 -0400 (EDT)

David Marshburn writes:
> 
> If I may draw this point out slightly (I've had the same problem), can you
> tell us what CVS would be doing at the time?  In what way does it try to
> create this lock file?  Is there anything special or different about that?
> Any clue as to what would make this fail?  I believe (from private
> corresopndence) that Seth is using AFS, as am I.  This is the only case
> I've found in which AFS fails to correctly create a file.  What I'm
> looking for is any suggestions or guesses as to what may be different in
> CVS' case...

"Lock file" is a bit of a misnomer in this case -- it's actually the new
RCS file.  RCS uses the existence of the new file to prevent multiple
updates at the same time and thus accurately calls it a lock file.  CVS
uses the same terminology even though it uses a completely different
locking scheme.  It does, however, create the file the same way that RCS
does so that it will act as a lock against updating the file with RCS
and CVS at the same time.  (Because of the different locking schemes,
however, it is extremely dangerous to use RCS on a CVS file.  Since RCS
doesn't honor CVS's locks, it's possible for CVS to wipe out RCS's
changes.)

What makes this error interesting is that *creating* the file is
apparently successful; it's writing to it afterwards that fails
somewhere along the way.  If would be interesting to know from one of
you that has the problem whether the file is actually created and, if
so, what size it is.  The relevant code is rcs_internal_lockfile() and
rcs_internal_unlockfile() in src/rcs.c  My guess is that the problem is
that the file is opened for write, but the permissions are set to read
only -- that should allow the opened file to be written to but not allow
any subsequent opens to write to it, but perhaps that doesn't work right
in AFS.  Alternatively, the permissions of the open file are set
immediately after opening it (provided your system has the fchmod()
function); perhaps that has some unusual affect in AFS.

-Larry Jones

I stand FIRM in my belief of what's right!  I REFUSE to
compromise my principles! -- Calvin




reply via email to

[Prev in Thread] Current Thread [Next in Thread]