You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Mats Nilsson <ma...@xware.se> on 2002/05/26 12:30:58 UTC

possible database corruption; need advice

Hi.

I've been toying with svn to try out different directory layouts for our
different projects. During this period, I've added and deleted files and
directories, eventually reaching a point where I would make copies of the
trunk to a /.../tags/ directory. Every thing has worked perfectly until this
point, using a svn (/trunk@1949) on windows xp. ra_local.

I first started noting problems when I tried to 'svn cp
file:///repos/x/trunk/ file:///repos/x/tags/foo', where /x/tags didn't exist
in the repo. I got a nonintuitive error message (don't remember right now),
and had to 'svnadmin rmtxn' the non-finished txn.

I 'svn mkdir'ed the missing directory and resubmitted the svn cp which then
worked.

Then I tried 'svn cp -r xxx file:///repos/x/trunk file:///repos/x/tags/bar'
which simply didn't work. In fact, svn crashed. I can reproduce this, and
post a stackdump if anyone thinks it is interesting.

Anyway, after this nothing works. Even a simple 'echo bar > foo; svn add
foo; svn ci -m ""' hangs forever. I haven't intercepted this yet.

I have not yet tried to find a reproduction sequence, and I don't really
expect to be able to, but I'll give it a shot later tonight anyway.


My questions to the list:

Do you want me to examine the state of the repository in any way? I would
need guidance.

Are there any BDB tools, or svnadmin calls that can be used? I tried
db_verify on the nodes db and it reports something, but I don't have a clue
to what it means, or if it signifies a problem:

$ ./db_verify.exe c:/mats/svn/repos/db/nodes
db_verify: Out-of-order key, page 1 item 20
db_verify: Out-of-order key, page 1 item 44
db_verify: Out-of-order key, page 1 item 108
db_verify: Out-of-order key, page 1 item 120
db_verify: Out-of-order key, page 1 item 138
db_verify: Out-of-order key, page 1 item 172
db_verify: Out-of-order key, page 1 item 210
db_verify: Out-of-order key, page 1 item 236
db_verify: Out-of-order key, page 1 item 266


I don't care much for the repository, just wanted to let you all know what
went down.

Mats





---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: possible database corruption; need advice

Posted by cm...@collab.net.
"Mats Nilsson" <ma...@xware.se> writes:

> I've managed to reproduce the crash and hang, running svn r1949. I'll build
> a HEAD svn later on and try to see if it appears there as well.

Yep, reproduce-able in my branch, too.  Hanging in select() inside a
call to allocate_txn_id() in txn-table.c.  I'm investigating now.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: possible database corruption; need advice

Posted by Ben Collins-Sussman <su...@collab.net>.
"Mats Nilsson" <ma...@xware.se> writes:

> > See revision 2019, and let the list know if this patch doesn't fix
> > the problem for you.
> 
> $ cd ~/subversion
> $ svn merge http://svn.collab.net/repos/svn/branches/issue-654-dev -r
> 2018:2019
> G  ./subversion/libsvn_fs/dag.c
> 
> Cool - except that there was some sort of line ending problem during merge,
> one version of dag.c being dos style, the other one unix style. Or maybe
> just in my wc.
> so a 'svn diff' would produce ridiculus results. well...

Heh, you're our first official "victim" of the fact that we don't have
"svn:eol-style : native" set on our C files.  

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

RE: possible database corruption; need advice

Posted by Mats Nilsson <ma...@xware.se>.
-r 2018:2019 applied to trunk seems to work! At least there are no crashes
or hangs.

Thanks!

>
> See revision 2019, and let the list know if this patch doesn't fix
> the problem for you.

$ cd ~/subversion
$ svn merge http://svn.collab.net/repos/svn/branches/issue-654-dev -r
2018:2019
G  ./subversion/libsvn_fs/dag.c

Cool - except that there was some sort of line ending problem during merge,
one version of dag.c being dos style, the other one unix style. Or maybe
just in my wc.
so a 'svn diff' would produce ridiculus results. well...


Mats





---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: possible database corruption; need advice

Posted by cm...@collab.net.
cmpilato@collab.net writes:

> cmpilato@collab.net writes:
> 
> > "Mats Nilsson" <ma...@xware.se> writes:
> > 
> > > Also managed to reproduce in svn /trunk@2018 with latest apr and
> > > apr-util.
> > 
> > Looks like svn_fs__rev_get_root() is grabbing a lock object and not
> > releasing it.  I think this is what is causing the hang, but I'm not
> > sure.  I'll be reading Berkeley docs for the next few minutes to see
> > what's up.
> 
> Ah, geez, wild goose chase.  I wasn't seeing your Subversion crash for
> a while, and then finally I ran your recipe by hand and saw the
> crash.  I'm about to commit a fix for it which makes your whole
> recipe run without fail on my box (all 7 revisions), but it'll be
> a commit to the branch I'm working on -- so someone will need to
> commit the same change to the /trunk.

See revision 2019, and let the list know if this patch doesn't fix
the problem for you.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: possible database corruption; need advice

Posted by cm...@collab.net.
cmpilato@collab.net writes:

> "Mats Nilsson" <ma...@xware.se> writes:
> 
> > Also managed to reproduce in svn /trunk@2018 with latest apr and
> > apr-util.
> 
> Looks like svn_fs__rev_get_root() is grabbing a lock object and not
> releasing it.  I think this is what is causing the hang, but I'm not
> sure.  I'll be reading Berkeley docs for the next few minutes to see
> what's up.

Ah, geez, wild goose chase.  I wasn't seeing your Subversion crash for
a while, and then finally I ran your recipe by hand and saw the
crash.  I'm about to commit a fix for it which makes your whole
recipe run without fail on my box (all 7 revisions), but it'll be
a commit to the branch I'm working on -- so someone will need to
commit the same change to the /trunk.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: possible database corruption; need advice

Posted by cm...@collab.net.
"Mats Nilsson" <ma...@xware.se> writes:

> Also managed to reproduce in svn /trunk@2018 with latest apr and
> apr-util.

Looks like svn_fs__rev_get_root() is grabbing a lock object and not
releasing it.  I think this is what is causing the hang, but I'm not
sure.  I'll be reading Berkeley docs for the next few minutes to see
what's up.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

RE: possible database corruption; need advice

Posted by Mats Nilsson <ma...@xware.se>.
Also managed to reproduce in svn /trunk@2018 with latest apr and apr-util.

Mats




---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

RE: possible database corruption; need advice

Posted by Mats Nilsson <ma...@xware.se>.
I've managed to reproduce the crash and hang, running svn r1949. I'll build
a HEAD svn later on and try to see if it appears there as well.


r=/mats/svn/repos3

svnadmin create $r
svn mkdir file://$r/trunk -m "rev 1"
svn co file://$r/trunk -d x
cd x
echo bar > bar
svn add bar
svn ci -m "rev 2"
svn mkdir file://$r/tags -m "rev 3"

# if these two lines are commented out, then the rest works
svn cp file://$r/trunk file://$r/tags/t1 -m "rev 4"
svn rm file://$r/tags/t1 -m "rev 5"

# crash
svn cp file://$r/trunk -r 3 file://$r/tags/t1 -m "crashes"

# hang
echo foo > foo
svn add foo
svn ci -m "hangs forever"


/Mats

> -----Original Message-----
> From: Mats Nilsson [mailto:mats.nilsson@xware.se]
> Sent: den 26 maj 2002 14:31
> To: dev@subversion.tigris.org
> Subject: possible database corruption; need advice
>
>
> Hi.
>
> I've been toying with svn to try out different directory layouts for our
> different projects. During this period, I've added and deleted files and
> directories, eventually reaching a point where I would make copies of the
> trunk to a /.../tags/ directory. Every thing has worked perfectly
> until this
> point, using a svn (/trunk@1949) on windows xp. ra_local.
>
> I first started noting problems when I tried to 'svn cp
> file:///repos/x/trunk/ file:///repos/x/tags/foo', where /x/tags
> didn't exist
> in the repo. I got a nonintuitive error message (don't remember
> right now),
> and had to 'svnadmin rmtxn' the non-finished txn.
>
> I 'svn mkdir'ed the missing directory and resubmitted the svn cp
> which then
> worked.
>
> Then I tried 'svn cp -r xxx file:///repos/x/trunk
> file:///repos/x/tags/bar'
> which simply didn't work. In fact, svn crashed. I can reproduce this, and
> post a stackdump if anyone thinks it is interesting.
>
> Anyway, after this nothing works. Even a simple 'echo bar > foo; svn add
> foo; svn ci -m ""' hangs forever. I haven't intercepted this yet.
>
> I have not yet tried to find a reproduction sequence, and I don't really
> expect to be able to, but I'll give it a shot later tonight anyway.
>
>
> My questions to the list:
>
> Do you want me to examine the state of the repository in any way? I would
> need guidance.
>
> Are there any BDB tools, or svnadmin calls that can be used? I tried
> db_verify on the nodes db and it reports something, but I don't
> have a clue
> to what it means, or if it signifies a problem:
>
> $ ./db_verify.exe c:/mats/svn/repos/db/nodes
> db_verify: Out-of-order key, page 1 item 20
> db_verify: Out-of-order key, page 1 item 44
> db_verify: Out-of-order key, page 1 item 108
> db_verify: Out-of-order key, page 1 item 120
> db_verify: Out-of-order key, page 1 item 138
> db_verify: Out-of-order key, page 1 item 172
> db_verify: Out-of-order key, page 1 item 210
> db_verify: Out-of-order key, page 1 item 236
> db_verify: Out-of-order key, page 1 item 266
>
>
> I don't care much for the repository, just wanted to let you all know what
> went down.
>
> Mats
>
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
> For additional commands, e-mail: dev-help@subversion.tigris.org
>
>





---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org