[This patch seems harmless enough I guess. On the other hand, the NFS implementation in AIX 3.x is known to be quite bad in just about every way. More recent NFS implementations are much more robust. Given that I haven't heard much about this sort of problem, it would seem like most unices don't have this problem. -kingdon] From: Andreas Luik Date: Mon, 20 Jan 1997 14:42:28 +0100 To: bug-cvs@prep.ai.mit.edu Subject: Lock error due to errno == ESTALE >Submitter-Id: net >Originator: Andreas Luik >Organization: net >Confidential: no >Synopsis: Lock error due to errno == ESTALE >Severity: serious >Priority: medium >Category: cvs >Class: sw-bug >Release: cvs-1.7 >Environment: System: IBM RS/6000, AIX 3.2.5 >Description: cvs update may abort with following message: cvs checkout: Updating odstb/lib/idm cvs checkout: [04:07:01] waiting for atc's lock in /project/atc/CVSMASTER/odstb/lib/idm cvs checkout: couldn't stat lock directory `/project/atc/CVSMASTER/odstb/lib/idm/#cvs.lock': Missing file or filesystem cvs checkout: failed to obtain dir lock in repository `/project/atc/CVSMASTER/odstb/lib/idm' cvs [checkout aborted]: read lock failed - giving up The reason seems to be that stat(2) call in lock.c:541 can return errno == ESTALE (our repository is mounted via NFS) if the lock directory has just been removed. Other systems correctly seem to return ENOENT. >How-To-Repeat: >Fix: Perhaps errno == ESTALE should be checked on AIX, too: *** cvs-1.7/src/lock.c.ORIG Mon Dec 18 01:55:30 1995 --- cvs-1.7/src/lock.c Mon Jan 20 14:31:29 1997 *************** *** 543,548 **** --- 543,553 ---- if (existence_error (errno)) continue; + #if defined(_AIX) && defined(ESTALE) + if (errno == ESTALE) + continue; + #endif + error (0, errno, "couldn't stat lock directory `%s'", masterlock); return (L_ERROR); }