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

Re: Ruby bindings 1.4.0 core dump on Ubuntu Breezy

From: Blair Zajac <blair_at_orcaware.com>
Date: 2006-10-06 05:28:13 CEST

On Oct 5, 2006, at 6:36 PM, Kouhei Sutou wrote:

> Hi,
>
> 2006/10/6, Blair Zajac <blair@orcaware.com>:
>
>> With the --with-ruby-test-verbose=verbose, I get this:
>>
>> make check-swig-rb
> ...
>> test_add_force(SvnClientTest):
>> /home/blair/Packages/ubuntu/blair/subversion/subversion-1.4.0/
>> subversion/bindings/swig/ruby/test/util.rb:47:
>> [BUG] Segmentation fault
>> ruby 1.8.3 (2005-06-23) [i486-linux]
>
>> Are there any particular swig/ruby commits we should be
>> considering for backport
>> into the 1.4.x branch?
>
> Could you try a change of r21652?

It applied cleanly to 1.4.0, but just delayed the core dump:

cd subversion/bindings/swig/ruby && /bin/sh /home/blair/Packages/
ubuntu/blair/subversion/subversion-1.4.0/BUILD/libtool --tag=CC --
silent --mode=link gcc -shrext .so -shared -rpath /usr/lib/ruby/1.8/
i486-linux/svn/ext -avoid-version -module -o wc.la
svn_wc.lo ../../../../subversion/bindings/swig/ruby/libsvn_swig_ruby/
libsvn_swig_ruby-1.la ../../../../subversion/libsvn_wc/
libsvn_wc-1.la ../../../../subversion/libsvn_subr/libsvn_subr-1.la
cd /home/blair/Packages/ubuntu/blair/subversion/subversion-1.4.0/
BUILD/subversion/bindings/swig/ruby; \
   /usr/bin/ruby1.8 -I /home/blair/Packages/ubuntu/blair/subversion/
subversion-1.4.0/subversion/bindings/swig/ruby \
     /home/blair/Packages/ubuntu/blair/subversion/subversion-1.4.0/
subversion/bindings/swig/ruby/test/run-test.rb \
     --verbose=verbose
Loaded suite test
Started
test_add_force(SvnClientTest): .
test_add_no_ignore(SvnClientTest): .
test_add_not_recurse(SvnClientTest): .
test_add_providers(SvnClientTest): .
test_add_recurse(SvnClientTest): .
test_authentication(SvnClientTest): .
test_blame(SvnClientTest): .
test_cat(SvnClientTest): /home/blair/Packages/ubuntu/blair/subversion/
subversion-1.4.0/subversion/bindings/swig/ruby/test/test_client.rb:
1289: [BUG] Segmentation fault
ruby 1.8.3 (2005-06-23) [i486-linux]

/bin/sh: line 1: 7308 Aborted (core dumped) /usr/bin/
ruby1.8 -I /home/blair/Packages/ubuntu/blair/subversion/
subversion-1.4.0/subversion/bindings/swig/ruby /home/blair/Packages/
ubuntu/blair/subversion/subversion-1.4.0/subversion/bindings/swig/
ruby/test/run-test.rb --verbose=verbose
make: *** [check-swig-rb] Error 134

Here's part of the stack trace:

#0 0xffffe410 in __kernel_vsyscall ()
#1 0xb7d439d1 in raise () from /lib/tls/i686/cmov/libc.so.6
#2 0xb7d452e9 in abort () from /lib/tls/i686/cmov/libc.so.6
#3 0xb7ecfc17 in rb_bug () from /usr/lib/libruby1.8.so.1.8
#4 0xb7f37c09 in ruby_posix_signal () from /usr/lib/libruby1.8.so.1.8
#5 <signal handler called>
#6 0xb7edbb0e in rb_thread_trap_eval () from /usr/lib/libruby1.8.so.1.8
#7 0xb7edb443 in rb_thread_trap_eval () from /usr/lib/libruby1.8.so.1.8
#8 0xb7edb5c3 in rb_thread_trap_eval () from /usr/lib/libruby1.8.so.1.8
#9 0xb7ede896 in rb_thread_trap_eval () from /usr/lib/libruby1.8.so.1.8
#10 0xb7edec42 in rb_thread_trap_eval () from /usr/lib/libruby1.8.so.1.8
#11 0xb7edf291 in rb_thread_trap_eval () from /usr/lib/libruby1.8.so.1.8
#12 0xb7ed36fa in rb_iterator_p () from /usr/lib/libruby1.8.so.1.8

>
>
>> 1) Failure:
>> test_load(SvnReposTest)
>> [/home/blair/Packages/ubuntu/blair/subversion/subversion-trunk/
>> subversion/bindings/swig/ruby/test/test_repos.rb:417]:
>> <NoMethodError> exception expected but was
>> Class: <TypeError>
>> Message: <"can't convert nil into String">
>
> I can't reproduce that.
> What SWIG version are you using? I'm using 1.3.29.

This is with 1.3.24.

>
> Could you identify where the problem is occured?
>
> * remove '-O2' option from SWIG_RB_COMPILE in Makefile
> * make clean-swig-rb
> * make swig-rb
> * cd subversion/bindings/swig/ruby
> * gdb --args ruby test/run-test.rb -n test_load
> * (gdb) b _wrap_svn_repos_load_fs2
> Function "_wrap_svn_repos_load_fs2" not defined.
> Make breakpoint pending on future shared library load? (y or [n]) y
> * (gdb) r
> * (gdb) n
> * ...
>
> In my thought, it's the fourth argument of Svn::Repos#load_fs
> (parent_dir).

Your hunch looks correct:

5857 SWIG_ConvertPtr(argv[0], &temp1,
SWIGTYPE_p_svn_repos_t, 1);
(gdb)
5861 arg1 = (svn_repos_t *)temp1;
(gdb)
5864 arg2 = svn_swig_rb_make_stream(argv[1]);
(gdb)
5867 if (NIL_P(argv[2])) {
(gdb)
5868 arg3 = NULL;
(gdb)
5873 arg4 = (enum svn_repos_load_uuid) NUM2INT(argv[3]);
(gdb)
5874 arg5 = StringValuePtr(argv[4]);
(gdb) p argv[4]
$12 = 4
(gdb) s
F
Finished in 20.417341 seconds.

   1) Failure:
test_load(SvnReposTest) [/home/blair/Packages/ubuntu/blair/subversion/
subversion-trunk/subversion/bindings/swig/ruby/test/test_repos.rb:417]:
<NoMethodError> exception expected but was
Class: <TypeError>
Message: <"can't convert nil into String">

Regards,
Blair

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Fri Oct 6 05:28:33 2006

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

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.