Re: svn client fails with Berkeley DB error Cannot allocate memor y - repository wedges
From: Martin J. Evans <martin.evans_at_easysoft.com>
Date: 2004-06-01 18:06:38 CEST
I basically agree that an ls operation should not need that many locks. We only
Berkeley DB error while opening 'transactions' table for filesystem
might be related to running out of BDB object locks (and in deed it may still
I tried doubling the locks in DB_CONFIG but it made no difference. However
You don't say if you were doing an ls() with recurse enabled - I am not. I am
Anyway, I can replicate the problem at will now by doing this (admittedly this
1. get hold of subversion sources
2. create test repository
3. import subversion tree into test repository.
4. prove the db is OK
cd /var/subversion/distribution
sh-2.05$ svnadmin recover test-martin/
Recovery completed.
5. run the attached perl program with:
/tmp/x.pl -u file:///var/subversion/distribution/test-martin
Couldn't open a repository: Unable to open an ra_local session to URL: Unable
6. demonstrate DB is now broken and unrecoverable
cd /var/subversion/distribution
sh-2.05$ svnadmin recover test-martin
This is repeatable at will for me.
I've followed the excellent hint from C. Michael Pilato and used db_stat before
before:
after:
I have never managed to recover a repository broken in this way but am open to
What I particularly don't like about it is that I can make this
Martin
-- Martin J. Evans Easysoft Ltd, UK Development On 01-Jun-2004 C. Michael Pilato wrote: > "Martin J. Evans" <martin.evans@easysoft.com> writes: >> On 01-Jun-2004 Alblas Huibert wrote: >> > Locks cannot be released until the scripts ends, >> > and the script only ends when a subprocess is done. >> > I can imagine that 4000 is a limmit way to small on >> > a medium sized repository. >> >> Fair enough but at most I would expect a read lock per ls and I >> don't see why that cannot be released when the ls completes. Since >> the depth of recursion I get to is only 9 I don't have any more than >> 9 ls's going at once. > > Locks aren't taken out per-Subversion-operation. Their granularity is > more tightly bound to Berkeley DB implementation details, something > like per-row or per-page or something. That said, these locks don't > outlive a Berkeley DB transaction, and there is usually a many-to-1 > relationship between Berkeley DB transactions and Subversion > operations. > > I said all that to say that an 'ls' shouldn't eat *that* many locks. > > You can see how many locks a particular operation consumes (roughly) > by doing this: > > svnadmin recover /path/to/repos > (do the operation) > db_stat -ch /path/to/repos/db | grep Maximum > > For example, I'm seeing about 31 locks used for a recursive 'ls' of > the entire Subversion repository's /trunk directory. > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org > For additional commands, e-mail: users-help@subversion.tigris.org
---------------------------------------------------------------------
|
This is an archived mail posted to the Subversion Users mailing list.
This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.