Monday, September 8, 2008

When CVS just won't cooperate...

Last week was pretty hectic for me. It all started Tuesday when our CVS server would freeze on a CVS add. The whole machine would lock up and the only thing that could be done was a hard reboot. Needless to say, this was a less than desirable method of development. It was really weird too. CVS commits and updates of files that already existed worked great, but the CVS add function would freeze the server almost every time. Seeing as how I couldn't find ANYTHING (I literally mean that) on my specific problem on google, I thought I would post my solution.

First I tried simply building a new Gentoo Linux server since that is my preferred Linux distro. I migrated all of the CVS data over to the new server along with all the permissions and ACLs that were assigned to the repositories so that it would be a simple migration process. Unfortunately, this didn't work. The new server exhibited the same behavior as the old one. This pointed me in the direction of three things possibly being wrong
1. The CVS repository was corrupt (I really hoped it wasn't that one)
2. The ACLs were somehow all screwed up
3. Some library or binary in Gentoo had a bug that was causing the problem

Since I was mostly interested in just getting things working again, I decided to go the route of 2 & 3. I spent part of a day building a Fedora Core 9 server and again copied the CVS repository to the new server, but this time I left out all the ACLs. It was somewhat of a pain, but I went through and recreated the ACL structure on the whole repository. The end result was a working stable CVS that I haven't had problems with since I migrated it to Fedora. I still don't know exactly what the problem was, but at least this worked for me. I hope it does for someone else as well.

No comments: