On Tue, Sep 07, 2010 at 11:19:21AM -0400, Patrick Fletcher wrote:
> I would really really appreciate anyone who has any information they can
> give me on this? I have not had any reply except for the "please don't
> attach images", which I replied to with full text explanation and apology
> for my ignorance (sry again!!)...

I think your problem sounds like corrupted revisions, but I'm not sure.

Please try to verify each revision of the repository with fsfsverify.py.
http://svn.apache.org/repos/asf/subversion/trunk/contrib/server-side/fsfsverify.py

fsfsverify.py can find corruptions that svnadmin verify doesn't report.
If fsfsverify.py finds a corrupt revision, you can try to fix the revision
file with the -f option. But keep a backup of it before attempting to fix.

I've attached a helper script that you can use to run fsfsverify.py
across multiple repositories.

Also, which version of Subversion are you running on the server?
The pictures attached to your first post contain a screenshot of Subversion
reporting itself as 1.6.3. Are you using that on your server?
If so, upgrade to 1.6.12 ASAP!!! (yes, 3 exclamation marks)
1.6.3 has a known security issue that led to error messages similar to
what you are seeing, if my memory isn't playing tricks on me.

In general, please try to reproduce problems with the lastest version
of the software, always, on both clients and servers. We get quite a
few reports for old problems which have been fixed, but people missed
the fix because they didn't upgrade.

Thanks,
Stefan
#!/bin/sh
# $Id: verify-revisions.sh 280 2010-08-19 15:57:27Z stsp $

# Copyright 2010 Stefan Sperling <s...@elego.de>, elego Software Solutions GmbH
#
# Permission to use, copy, modify, and/or distribute this software for any
# purpose with or without fee is hereby granted, provided that the above
# copyright notice and this permission notice appear in all copies.
#
# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.

# This script checks all revisions in one or more Subversion FSFS repositories,
# using fsfsverify.py.

if [ -z "$1" ]
then
        echo "Usage: `basename $0` repos1 [repos2 ...]"
        exit 1
fi

# Select a UNIX tool to produce numerical sequences
if which seq >/dev/null 2>/dev/null
then
        _seq="`which seq`"
elif which jot >/dev/null 2>/dev/null
then
        _seq="`which jot`"
else
        echo "No tool for producing numerical sequences found in \$PATH"
        echo "Please install one of these tools: seq, jot"
        exit 1
fi

# Make sure fsfsverify.py is in $PATH
if ! which fsfsverify.py >/dev/null 2>/dev/null
then
        echo -n "fsfsverify.py not found in \$PATH - "
        echo -n "please get fsfsverify.py from "
        echo 
"http://svn.apache.org/repos/asf/subversion/trunk/contrib/server-side/fsfsverify.py";
        exit 1
fi

let n_repos=0

for repository in "$@"
do
        head_rev="`svnlook youngest \"$repository\"`"
        if [ -z "$head_rev" ]
        then
                echo -n "Cannot determine HEAD revision of repository "
                echo "$repository - skipping"
                continue
        fi

        if [ "$head_rev" == "0" ]
        then
                echo "Repository $repository has zero revisions - skipping"
                continue
        fi

        if [ "`cat $repository/db/fs-type`" != "fsfs" ]
        then
                echo -n "Repository $repository "
                echo "does not use an FSFS database - skipping"
                continue
        fi

        # Check if the repository is sharded
        layout_sharded=`grep "^layout sharded" "$repository/db/format"`
        if [ -n "$layout_sharded" ]
        then
                shards="`echo $layout_sharded | \
                        sed -e 's/layout sharded \([0-9]*\)/\1/'`"
                if [ -z "$shards" ]
                then
                        echo -n "Repository $repository seems to be shared, "
                        echo -n "but could not determine number of shards - "
                        echo "skipping"
                        continue
                fi
        else
                shards=""
        fi

        bad_revs=""
        for revision in `$_seq $head_rev`
        do
                if [ -n "$shards" ]
                then
                        shard_dir="`expr $revision / $shards`"
                else
                        shard_dir=""
                fi

                if [ -f "$repository/db/revs/${shard_dir}.pack" ]
                then
                        echo -n "Repository $repository has packing enabled "
                        echo "but fsfsverify.py does not support packed FSFS "
                        echo "repositories - skipping"
                        break
                fi

                echo -n "Checking $repository r${revision}: "
                fsfsverify.py "$repository/db/revs/$shard_dir/$revision" 
>/dev/null
                if [ "$?" != "0" ]
                then
                        echo "BAD"
                        bad_revs="$bad_revs $revision"
                else
                        echo "ok"
                fi
                
        done

        let n_repos="`expr $n_repos + 1`"

        if [ -n "$bad_revs" ]
        then
                this_bad_repos="The following revisions of $repository"
                this_bad_repos="$this_bad_repos are bad: $bad_revs"
                echo "$this_bad_repos"
                all_bad_repos="${all_bad_repos}$this_bad_repos\n"
        fi
done

if [ $n_repos -gt 1 ]
then
        echo
        echo "Summary:"
        echo "$all_bad_repos"
fi

Reply via email to