info-cvs
[Top][All Lists]
Advanced

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

Stale lock files


From: Dan Peterson
Subject: Stale lock files
Date: Mon, 17 Jun 2002 13:27:58 -0700 (Pacific Daylight Time)

We often find ourselves with stale lock files hanging around and causing
problems.  (pserver, SunOS-5.8, cvs-1.11 and just recently upgraded to
1.11.2).

After poking around in the code a bit, I noticed the #define for
"CVS_FUDGELOCKS", which will remove locks older than CVSLCKAGE seconds.

I was thinking about turning this on... probably with a CVSLCKAGE longer
then the default of 1 hour (maybe more like 4-8 hours?) and was wondering
what the adverse consequences might be?

The only real problem I can see is if the process which created the lock
is still running.

Then I thought maybe it wouldn't be too tough to perform an extra check to
see if the process is still running before removing the lock.  This would
be fairly easy (assuming /proc exists) for the read/write locks but much
tougher for the master lock.  The only way I can see to do this for the
master lock would be to first check for the existence of a read/write lock
in the same directory then see if the file ctime is similar (within a few
seconds?) of the master lock.  If so, assume the master was created by the
same process that created the read/write lock.




reply via email to

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