[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: FSFS Corruption and missing Rev files

From: Malcolm Rowe <malcolm-svn-dev_at_farside.org.uk>
Date: 2006-12-05 00:55:24 CET

On Tue, Nov 28, 2006 at 01:10:28AM -0200, Daniel Jurado wrote:
> "svnadmin: No such revision 761"
>
> Taking a closer look to my db tree I could see that the 761 file is
> missing on db\revs, but not just it. 762, 796, 801 and some other
> ones.
>

"Uh oh".

> Can someone tell me if i missed something here?
>

No, you've not missed anything - if those files are gone, you have a
problem (and it'll be a bigger one once you hit a revision that wants to
use one of those missing revisions as a delta base).

Conceivably, it might be possible (but pretty hard) to piece together a
working filesystem by recreating those revisions as empty commits (that
touch the right files with a no-change delta), but at best you'd have
lost all the versions of the files whose delta path travels through one
of those revisions. Your best bet by far is to restore the missing
files from a backup.

Is there any chance that something else could have interfered with the
revision files? A virus scanner? A user, perhaps (if you're using a
file:/// URL)? The only reason I ask is that I've not heard of random
revision files being deleted before.

> PS: One interesting point here is that those missing revs was probably
> committed through a network share. BUT, as I am using fsfs, I should
> not fear this, though. Am I correct?
>

That's right. In this area, FSFS depends only on POSIX-style (fcntl)
locks to serialise concurrent access to the filesystem, and atomic
renames to move the new revision files into place. As far as I was
aware, that's all the common network filesystems in use save NFSv2
(which I'm pretty sure doesn't support locking).

We also re-open and fsync() the new revision file after writing (and, on
Linux clients, the containing directory as well) to ensure that the file
is correctly written to disk, so you'd have to have a pretty odd error
for the network filesystem to report the file as written and then later
as missing.

If I had to guess a cause I'd guess either something interfered with the
db/ directory, or you had/have a problem with your on-disk filesystem,
and fsck or similar has removed the revision files.

Regards,
Malcolm

  • application/pgp-signature attachment: stored
Received on Tue Dec 5 00:55:42 2006

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.