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

mass rearrange and berkeley db lock exhaustion

From: J Robert Ray <jrray_at_imageworks.com>
Date: 2004-10-08 01:29:37 CEST

Hi all,

I am developing a script (using the svn perl bindings) to do a mass
rearrange of a large software project. In very simple terms, my script
does many, many SVN::Client::ls() (non-recursive) calls, with the
occasional SVN::Client::mkdir() and SVN::Client::move().

These are the only calls I am making, and they are all against
respository URLs, I am not using a working copy.

As I run my script, and it is off sniffing around the repository via ls,
I am running 'watch db_stat -c' in another terminal.

""
150 Number of current lockers.
1681 Maximum number of lockers at any one time.
""

The 'Number of current lockers' count grows rapidly and eventually meets
up with the max, and the script dies with a 400 error. I can always go
to the apache server log and dig up a message like this one:

(20014)Error string not specified yet: Berkeley DB error while opening
'representations' table for filesystem
/mnt/d3/subversion/move_test/db:\nCannot allocate memory

Vital stats:
server: svn 1.0.6, apache 2.0.59
client: svn 1.1.0, perl 5.8.0, swig 1.3.21
berkeley db: 4.2.52

Any suggestions on how I can avoid running out of lockers?

I have tried creating a new SVN::Client object to use after n operations
to see if that would flush out old transactions and free up locks. This
doesn't really seem to help. Sometimes the script will run for a few
minutes before running out of locks, sometimes it dies within a few seconds.

After reading the berkeley db docs, I understand that the number of
lockers in use is akin to the number of concurrent transactions. As I
am only calling ls(), mkdir(), and move() serially, and I am operating
directly on the repository, I should in theory only ever have one active
transaction at a time.

Maybe unrelated, my script segfaults periodically in libneon _init().
Here's a sample stack trace:

#0 0x407c9cec in _init ()
    from
/net/soft_scratch/users/jrray/rpm/BUILD/subversion-1.1.0/neon/src/.libs/libneon.so.24
#1 0x407d1101 in ne_sock_readline (sock=0xc40ade8, buf=0xc404be0 "",
buflen=8192)
     at ne_socket.c:595
#2 0x407cb49c in read_status_line (req=0xc404bb8, status=0xc406cdc,
retry=0)
     at ne_request.c:921
#3 0x407cb726 in send_request (req=0xc404bb8, request=0x0) at
ne_request.c:991
#4 0x407cbee7 in ne_begin_request (req=0xc404bb8) at ne_request.c:1179
#5 0x407cc17f in ne_request_dispatch (req=0xc404bb8) at ne_request.c:1263
#6 0x406c57ee in parsed_request (sess=0xc3fe900, method=0x406c7407
"OPTIONS",
     url=0xc38e2c0 "/svn/XXXX/xxxx/tags", body=0xc408d70 "",
body_file=0x460,
     set_parser=0, elements=0x460, use_neon_shim=1,
validate_compat_cb=0x460,
     startelm_compat_cb=0x460, endelm_compat_cb=0x460, startelm_cb=0x460,
     cdata_cb=0x460, endelm_cb=0x460, baton=0xbfffd748, extra_headers=0x0,
     status_code=0x0, pool=0x83201d0) at subversion/libsvn_ra_dav/util.c:603
#7 0x406c5c3c in svn_ra_dav__parsed_request_compat (sess=0x460,
     method=0x460 <Address 0x460 out of bounds>,
     url=0x460 <Address 0x460 out of bounds>,
     body=0x460 <Address 0x460 out of bounds>, body_file=0x460,
set_parser=0x460,
     elements=0x460, validate_cb=0x460, startelm_cb=0x460, endelm_cb=0x460,
     baton=0x460, extra_headers=0x460, status_code=0x460, pool=0x460)
     at subversion/libsvn_ra_dav/util.c:716
#8 0x406c209c in svn_ra_dav__get_activity_collection (activity_coll=0x460,
     ras=0x460, url=0x460 <Address 0x460 out of bounds>, pool=0x460)
     at subversion/libsvn_ra_dav/options.c:126
#9 0x406bab8a in get_activity_collection (cc=0xc3fa650,
collection=0xbfffd7cc,
     force=0, pool=0x83201d0) at subversion/libsvn_ra_dav/commit.c:302
#10 0x406bac7b in create_activity (cc=0xc3fa650, pool=0x83201d0)
     at subversion/libsvn_ra_dav/commit.c:332
#11 0x406bc43f in svn_ra_dav__get_commit_editor (session_baton=0xc3fa5a0,
     editor=0x0, edit_baton=0x460, log_msg=0xc3fa490 "", callback=0x460,
     callback_baton=0x460, pool=0x83201d0) at
subversion/libsvn_ra_dav/commit.c:1265
#12 0x40433e49 in mkdir_urls (commit_info=0x460, paths=0x460, ctx=0xc3ac548,
     pool=0x83201d0) at subversion/libsvn_client/add.c:576
#13 0x4043412c in svn_client_mkdir (commit_info=0x460, paths=0xc3fa1b8,
     ctx=0xc3ac548, pool=0x83201d0) at subversion/libsvn_client/add.c:607
#14 0x40958677 in _wrap_svn_client_mkdir (cv=0x82ecba0) at svn_client.c:3412
#15 0x080a314f in Perl_pp_entersub ()
#16 0x0809d3aa in Perl_runops_standard ()
#17 0x0805f117 in S_run_body ()
#18 0x0805eeaa in perl_run ()
#19 0x0805c8e3 in main ()
#20 0x40064914 in __libc_start_main () from /lib/libc.so.6

Thanks,

- Robert

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Fri Oct 8 01:29:59 2004

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.