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

Ruby bindings core dump

From: Blair Zajac <blair_at_orcaware.com>
Date: 2007-02-16 20:32:52 CET

I've been getting consistent core dumps in a simple Ruby script using
Ruby 1.8.5-pl2 and Subversion 1.4.3 on a Centos 4.1 box. It creates a
Berkeley DB svn repository and then using a wc, just creates top level
directories in it and commits into it. At some point, it'll core:

/usr/local/lib/ruby/site_ruby/1.8/svn/util.rb:60:in
`svn_client_commit3': subversion/libsvn_client/commit.c:865 Commit
failed (details follow): (Svn::Error::RA_LOCAL_REPOS_OPEN_FAILED)
Unable to open an ra_local session to URL
Unable to open repository 'file:///tmp/repos'
Berkeley DB error for filesystem '/tmp/repos/db' while opening 'copies'
table:
Cannot allocate memory
bdb: Lock table is out of available locker entries from
/usr/local/lib/ruby/site_ruby/1.8/svn/util.rb:60:in `call'
         from /usr/local/lib/ruby/site_ruby/1.8/svn/util.rb:60:in `commit3'
         from /usr/local/lib/ruby/site_ruby/1.8/svn/client.rb:94:in `commit'
         from ./i.rb:34:in `make_dir'
         from ./i.rb:42
         from ./i.rb:39:in `each'
         from ./i.rb:39
Adding /tmp/wc/abc82...Abort (core dumped)

#0 0x001027a2 in ?? () from /lib/ld-linux.so.2
#1 0x001427d5 in raise () from /lib/tls/libc.so.6
#2 0x00144149 in abort () from /lib/tls/libc.so.6
#3 0x007a36aa in default_warning_func (baton=0x0, err=0x9dd0880)
     at subversion/libsvn_fs/fs-loader.c:307
#4 0x00336f75 in cleanup_fs_apr (data=0x9dcf7d8)
     at subversion/libsvn_fs_base/fs.c:298
#5 0x003c4fc5 in run_cleanups (cref=0x9dae8a8) at apr_pools.c:1959
#6 0x003c5ade in apr_pool_destroy (pool=0x9dae898) at apr_pools.c:731
#7 0x00ca1e24 in apr_pool_wrapper_destroy (self=0x9dae868)
     at ./subversion/bindings/swig/ruby/core.c:1199
#8 0x00caf7f1 in free_apr_pool_wrapper_t (arg1=0x9dae868)
     at ./subversion/bindings/swig/ruby/core.c:11802
#9 0x00ea8a75 in rb_gc_call_finalizer_at_exit () at gc.c:1884
#10 0x00e876f5 in ruby_finalize_1 () at eval.c:1542
#11 0x00e9cf38 in ruby_cleanup (ex=1) at eval.c:1577
#12 0x00e9d01d in ruby_stop (ex=0) at eval.c:1608
#13 0x00e9d07f in ruby_run () at eval.c:1629
#14 0x08048644 in main ()

Below is the script. Is there something that the Ruby bindings are not
cleaning up?

Regards,
Blair

-- 
Blair Zajac, Ph.D.
<blair@orcaware.com>
Subversion training, consulting and support
http://www.orcaware.com/svn/
#!/usr/local/bin/ruby
require 'fileutils'
require 'svn/client'
$root_repos = "#{Dir.getwd}/repos"
$root_wc = "#{Dir.getwd}/wc"
FileUtils.remove_dir($root_repos, true)
FileUtils.remove_dir($root_wc, true)
system("svnadmin create --fs-type bdb #{$root_repos}")
$ctx = Svn::Client::Context.new
$ctx.add_simple_provider
$ctx.add_username_prompt_provider(0) do |cred, realm, username, may_save|
   cred.username = 'blairzajac'
   cred.may_save = false
end
$ctx.checkout("file://#{$root_repos}", $root_wc)
global_log_message = ""
def make_dir(show_name)
   show_dir = "#{$root_wc}/#{show_name}"
   unless File.directory?(show_dir)
     print "Adding #{show_dir}..."
     $ctx.mkdir(show_dir)
     global_log_message = "Adding show '#{show_name}'."
     $ctx.set_log_msg_func do |items|
       [true, "Adding show '#{show_name}'."]
     end
     $ctx.commit([$root_wc])
     puts ''
   end
end
(0..1000).each do |i|
   d = "abc#{i}"
   puts d
   make_dir(d)
end
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Fri Feb 16 20:33:13 2007

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