[Top][All Lists]

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

Re: CVS repository corruption

From: Phi-Long Tran
Subject: Re: CVS repository corruption
Date: Tue, 02 Jan 2001 16:07:58 -0800

Hi Fran,

I ran into the problem you described a while back (4-5 years ago, I think). At
that time, I was using CVS on Solaris and the repository was accessed via NFS.
I was able to repair the files in CVS that were corrupted.  It's possible, but
it involves somewhat delicate examination and hand-surgery of the corrupted
",v" files in the CVS repository.

The process requires that you're comfortable hand-editing the ",v" files inside
the repository and are somewhat familiar with the RCS-style ",v" files that CVS
uses.  You should definitely work on a copy of the corrupted ",v" file and then
overwrite the original once you confirmed no changes have been made since you
made a copy of the corrupted ",v" file.

The basic process flows like this ...

  * Examine the ",v" file that corresponds to the corrupted file.
    Typically, a corrupted file will contain one or more groups of null

  * Look at the lines of text before the first null (the editor I used
    displayed null characters, ASCII 0, with "@" characters) and after the
    last null character within a group to gauge the affected revisions.

    For example, you might see the beginning lines of the delta for version
    1.13, then a large number of nulls.  Then you'll see some text, then the
    beginning of the delta for version 1.8.  In this example, you've lost
    the deltas for revisions 1.9 through 1.13.

  * Once you know the deltas you've lost, you can see if you have a backup
    of the ",v" containing the missing deltas.  In my situation, I contacted
    the company's system administrators to restore backups and I also
    rummaged through some mirrors of the CVS repository.

  * Copy and paste the portions from the good copy of the ",v" file
    to the corrupted ",v" file, replacing the corresponding groups of nulls.
    This step requires care to ensure the result in correct and preserves
    the proper structure of the ",v" file.

If you found one file with this corruption, then there may be more.  I had
written a script to scan for this type of corruption, but I no longer have it
around.  It was probably a Perl script that scanned for ",v" files contain 8 or
16 consecutive null characters.

I've intentionally glossed over various details to keep this response to a
reasonable length. This process only repairs the damage and will not address
why the corruption occurred.  Send me e-mail (address@hidden) if you'd like to
pursue this route and would like more details.

------- Original Message Dated: Tue, 02 Jan 2001 12:28:34 -0500
| ... 
| We recently have seen some weird behavior from our CVS (v. 1.11)
| repository.  Here are the symptoms we are observing with our repository:
| * Upon doing a checkout, some lines in our source files will be
| truncated or have strange characters like '@' inserted or appended. One
| example of what is happening repeatedly:
| ...
------- End of Original Message

reply via email to

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