waiting for module's lock in /var/cvs/module - str

chris (2006-02-20 10:45:57)
3093 views
0 replies
I killed a CVS commit using kill -9. I guess that was a bit harsh. The result was that I couldn't commit. The connection would just return the message: waiting for module's lock in /var/cvs/module - strace fix. I went into the repository under /var/cvs/modulename to see if I could find a lock file, but couldn't. A friend suggested that I use strace to trace the system calls conducted during a cvs commit, and to look for attempts to access a lock file. Various attempts later, this appeared to be the nicest approach:
strace cvs commit *php  2>&1 | grep lock

this calls strace on the command and redirects stderr to stdin. If you don't do this the grep will still be mucky, because it will only filter stdout.

The result is as follows:
modulename@ser-6:/export/modulename/admin$ strace cvs commit *php  2>&1|grep lock
stat64("/var/lock/cvs/modulename/admin", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
mkdir("/var/lock/cvs/modulename/admin/#cvs.lock", 0777) = 0
stat64("/var/lock/cvs/modulename/admin", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
open("/var/lock/cvs/modulename/admin/#cvs.wfl.ser-6.31926", O_RDWR|O_CREAT|O_TRUNC, 0666) = 3
stat64("/var/lock/cvs/modulename/admin", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
unlink("/var/lock/cvs/modulename/admin/#cvs.wfl.ser-6.31926") = 0
stat64("/var/lock/cvs/modulename/admin", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
rmdir("/var/lock/cvs/modulename/admin/#cvs.lock") = 0

and there are the lock files plain to see. All I had to do was remove them and then re-try the commit

christo
comment