Our use of PVCS is primarily by way CLI commands embedded with various other tools (ex. Perl scripts).
We had a user report that they were checking out a file from PVCS and pressed Ctrl-c, thinking that something was hung. The net result was that the PVCS archive was left in an inconsistent state (not in the PVCS sense, but in our code management sense). So I had planned to unlock the programmers lock on the source file and remove a 'Dev' promotion group. Unfortunately, this was the result:
vcs -u 5007FCA12.sdm
PVCS Version Manager (vcs) v8.6.3.0 (Build 421) for Linux/x86_64
(C) Copyright 2021 Micro Focus or one of its affiliates. All Rights Reserved.
vcs: waiting for archive "/home/pvcs/cefms/archives/5007FCA12.vdm" (2).
vcs: waiting for archive "/home/pvcs/cefms/archives/5007FCA12.vdm" (1).
vcs: error, archive "/home/pvcs/cefms/archives/5007FCA12.vdm" is in use.
For other PVCS actions I also saw this:
get: error, journal "/home/pvcs/cefms/archives/journal.vcs" is in use.
I looked in the designated ARCHIVEWORK directory and found a .tmp file that was related to this PVCS archive and removed it This did not remedy the situation.
I'm now told that code checkout and in is being prevented for any files stored in the PVCS project. And the symptom points to the journal.vcs file that is co-located with the PVCS archives files. I've always seen this file as a simple journal of any PVCS actions (ex. add label, checkout w/lock, assign promotion group, etc) for all the PVCS archives in the project. But for all the years I've worked with PVCS, I've never seen this file locked. It always seemed more like a log that was only updated by appending new actions.
Anyhow, checking the timestamps on the original source file and on the journal.vcs, I found they were the same! And that would be a pretty big coincidence late on a Sunday night with only the single programmer likely working.
I found within the defined SEMAPHOREDIR, entries for both the above source file and for the journal.vcs. Based on information in the PVCS VM Admin Guide, it appears that these semaphore files are used to coordinate 'shared access' to PVCS archives and the journal.vcs file.
My question are:
- Can I safely remove the files from the SEMAPHOREDIR for the purpose of regaining available use of these files?
- What would be the best method to handle situations like these, if they occur in the future?
- What would be the best way to prevent the need for administrative actions like these?
Thanks,
Mark