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

Re: [--enable-runtime-module-search] Segmentation fault when accessing BDB repositories

From: Arfrever Frehtes Taifersar Arahesis <arfrever.fta_at_gmail.com>
Date: Fri, 18 Jul 2008 14:58:09 +0200

2008-07-18 14:36:59 Julian Foad napisaƂ(a):
> On Tue, 2008-07-08 at 23:46 +0200, Arfrever Frehtes Taifersar Arahesis
> wrote:
> > Steps to reproduce:
> > 1. Configure Subversion with the --enable-runtime-module-search option.
> >
> > 2. Run:
> > svnadmin create --fs-type bdb repo
> > svn co file:///`pwd`/repo wc
>
> Thanks for the report.
>
> What version were you using?

Trunk. (This problem also exists in the 1.5.x branch.)
I think that this problem might be related to pool lifetime.

$ cd /tmp/
$ svnadmin create --fs-type bdb repo
$ gdb --args svn co file:///`pwd`/repo wc
GNU gdb 6.8
Copyright (C) 2008 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "i686-pc-linux-gnu"...
(gdb) br base_open
Function "base_open" not defined.
Make breakpoint pending on future shared library load? (y or [n]) y
Breakpoint 1 (base_open) pending.
(gdb) r
Starting program: /usr/bin/svn co file:////tmp/repo wc
[Thread debugging using libthread_db enabled]
[New Thread 0xb7f86700 (LWP 26356)]
[Switching to Thread 0xb7f86700 (LWP 26356)]

Breakpoint 1, base_open (fs=0x9835238, path=0x9832d80 "/tmp/repo/db", pool=0x9832b08, common_pool=0x9835b10) at subversion/libsvn_fs_base/fs.c:712
712 svn_boolean_t write_format_file = FALSE;
(gdb) bt
#0 base_open (fs=0x9835238, path=0x9832d80 "/tmp/repo/db", pool=0x9832b08, common_pool=0x9835b10) at subversion/libsvn_fs_base/fs.c:712
#1 0xb7d69eb7 in svn_fs_open (fs_p=0x9832d30, path=0x9832d80 "/tmp/repo/db", fs_config=0x0, pool=0x9832b08) at subversion/libsvn_fs/fs-loader.c:396
#2 0xb7d8a710 in get_repos (repos_p=0x9832c14, path=0x9832c28 "/tmp/repo", exclusive=0, nonblocking=0, open_fs=1, pool=0x9832b08) at subversion/libsvn_repos/repos.c:1321
#3 0xb7d8a825 in svn_repos_open (repos_p=0x9832c14, path=0x9832c28 "/tmp/repo", pool=0x9832b08) at subversion/libsvn_repos/repos.c:1366
#4 0xb7d9e560 in svn_ra_local__split_URL (repos=0x9832c14, repos_url=0x9832c0c, fs_path=0xbf999994, URL=0x983ab70 "file:///tmp/repo", pool=0x9832b08) at subversion/libsvn_ra_local/split_url.c:139
#5 0xb7d9b86e in svn_ra_local__open (session=0x9832bf8, repos_URL=0x983ab70 "file:///tmp/repo", callbacks=0x9832b48, callback_baton=0x9832b70, config=0x9814398, pool=0x9832b08)
    at subversion/libsvn_ra_local/ra_plugin.c:452
#6 0xb800b97d in svn_ra_open3 (session_p=0xbf999b70, repos_URL=0x983ab70 "file:///tmp/repo", uuid=0x0, callbacks=0x9832b48, callback_baton=0x9832b70, config=0x9814398, pool=0x9832b08)
    at subversion/libsvn_ra/ra_loader.c:595
#7 0xb808da1a in svn_client__open_ra_session_internal (ra_session=0xbf999b70, base_url=0x983ab70 "file:///tmp/repo", base_dir=0x0, base_access=0x0, commit_items=0x0, use_admin=0, read_only_wc=0,
    ctx=0x9814348, pool=0x9832b08) at subversion/libsvn_client/ra.c:324
#8 0xb808de82 in svn_client__ra_session_from_path (ra_session_p=0xbf999bf8, rev_p=0xbf999c04, url_p=0xbf999bfc, path_or_url=0x983ab70 "file:///tmp/repo", base_access=0x0, peg_revision_p=0xbf999cd4,
    revision=0xbf999ce0, ctx=0x9814348, pool=0x9832b08) at subversion/libsvn_client/ra.c:446
#9 0xb8062db0 in svn_client__checkout_internal (result_rev=0x0, url=0x983ab70 "file:///tmp/repo", path=0x98154a0 "wc", peg_revision=0xbf999cd4, revision=0xbf999ce0, depth=svn_depth_unknown,
    ignore_externals=0, allow_unver_obstructions=0, timestamp_sleep=0x0, ctx=0x9814348, pool=0x983ab18) at subversion/libsvn_client/checkout.c:82
#10 0xb806340d in svn_client_checkout3 (result_rev=0x0, URL=0x983ab58 "file:///tmp/repo", path=0x98154a0 "wc", peg_revision=0xbf999cd4, revision=0xbf999ce0, depth=svn_depth_unknown, ignore_externals=0,
    allow_unver_obstructions=0, ctx=0x9814348, pool=0x983ab18) at subversion/libsvn_client/checkout.c:213
#11 0x0804cf67 in svn_cl__checkout (os=0x9813b20, baton=0xbf999e24, pool=0x9813978) at subversion/svn/checkout-cmd.c:160
#12 0x08056a74 in main (argc=4, argv=0xbf99a044) at subversion/svn/main.c:1999
(gdb) print bdb_cache
$1 = (apr_hash_t *) 0x982da98
(gdb) cont
Continuing.

Breakpoint 1, base_open (fs=0x9834d18, path=0x983cfc0 "/tmp/repo/db", pool=0x983ab18, common_pool=0x984aa50) at subversion/libsvn_fs_base/fs.c:712
712 svn_boolean_t write_format_file = FALSE;
(gdb) bt
#0 base_open (fs=0x9834d18, path=0x983cfc0 "/tmp/repo/db", pool=0x983ab18, common_pool=0x984aa50) at subversion/libsvn_fs_base/fs.c:712
#1 0xb7d69eb7 in svn_fs_open (fs_p=0x983cf70, path=0x983cfc0 "/tmp/repo/db", fs_config=0x0, pool=0x983ab18) at subversion/libsvn_fs/fs-loader.c:396
#2 0xb7d8a710 in get_repos (repos_p=0x983ce54, path=0x983ce68 "/tmp/repo", exclusive=0, nonblocking=0, open_fs=1, pool=0x983ab18) at subversion/libsvn_repos/repos.c:1321
#3 0xb7d8a825 in svn_repos_open (repos_p=0x983ce54, path=0x983ce68 "/tmp/repo", pool=0x983ab18) at subversion/libsvn_repos/repos.c:1366
#4 0xb7d9e560 in svn_ra_local__split_URL (repos=0x983ce54, repos_url=0x983ce4c, fs_path=0xbf9998e4, URL=0x983cca8 "file:///tmp/repo", pool=0x983ab18) at subversion/libsvn_ra_local/split_url.c:139
#5 0xb7d9b86e in svn_ra_local__open (session=0x983ce38, repos_URL=0x983cca8 "file:///tmp/repo", callbacks=0x983cd88, callback_baton=0x983cdb0, config=0x9814398, pool=0x983ab18)
    at subversion/libsvn_ra_local/ra_plugin.c:452
#6 0xb800b97d in svn_ra_open3 (session_p=0xbf999b00, repos_URL=0x983cca8 "file:///tmp/repo", uuid=0x983cd38 "c7f93571-5b89-49c9-9b52-35ba7b531933", callbacks=0x983cd88, callback_baton=0x983cdb0,
    config=0x9814398, pool=0x983ab18) at subversion/libsvn_ra/ra_loader.c:595
#7 0xb808da1a in svn_client__open_ra_session_internal (ra_session=0xbf999b00, base_url=0x983cca8 "file:///tmp/repo", base_dir=0x983cb98 "wc", base_access=0x983cb70, commit_items=0x0, use_admin=1,
    read_only_wc=1, ctx=0x9814348, pool=0x983ab18) at subversion/libsvn_client/ra.c:324
#8 0xb80938ec in svn_client__update_internal (result_rev=0x0, path=0x98154a0 "wc", revision=0xbf999ce0, depth=svn_depth_infinity, depth_is_sticky=1, ignore_externals=0, allow_unver_obstructions=0,
    timestamp_sleep=0xbf999c00, send_copyfrom_args=0, ctx=0x9814348, pool=0x983ab18) at subversion/libsvn_client/update.c:182
#9 0xb80630f9 in svn_client__checkout_internal (result_rev=0x0, url=0x983ab70 "file:///tmp/repo", path=0x98154a0 "wc", peg_revision=0xbf999cd4, revision=0xbf999ce0, depth=svn_depth_infinity,
    ignore_externals=0, allow_unver_obstructions=0, timestamp_sleep=0x0, ctx=0x9814348, pool=0x983ab18) at subversion/libsvn_client/checkout.c:135
#10 0xb806340d in svn_client_checkout3 (result_rev=0x0, URL=0x983ab58 "file:///tmp/repo", path=0x98154a0 "wc", peg_revision=0xbf999cd4, revision=0xbf999ce0, depth=svn_depth_unknown, ignore_externals=0,
    allow_unver_obstructions=0, ctx=0x9814348, pool=0x983ab18) at subversion/libsvn_client/checkout.c:213
#11 0x0804cf67 in svn_cl__checkout (os=0x9813b20, baton=0xbf999e24, pool=0x9813978) at subversion/svn/checkout-cmd.c:160
#12 0x08056a74 in main (argc=4, argv=0xbf99a044) at subversion/svn/main.c:1999
(gdb) print bdb_cache
$2 = (apr_hash_t *) 0x0
(gdb) cont
Continuing.

Program received signal SIGSEGV, Segmentation fault.
0x42e13b22 in find_entry (ht=0x0, key=0xbf999680, klen=12, val=0x0) at tables/apr_hash.c:260
260 tables/apr_hash.c: No such file or directory.
        in tables/apr_hash.c
(gdb) bt
#0 0x42e13b22 in find_entry (ht=0x0, key=0xbf999680, klen=12, val=0x0) at tables/apr_hash.c:260
#1 0x42e13dd4 in apr_hash_get (ht=0x0, key=0xbf999680, klen=12) at tables/apr_hash.c:330
#2 0xb7d40b69 in bdb_cache_get (keyp=0xbf999680, panicp=0xbf999678) at subversion/libsvn_fs_base/bdb/env.c:453
#3 0xb7d40fd2 in svn_fs_bdb__open (bdb_batonp=0x9834e08, path=0x983cfc0 "/tmp/repo/db", flags=17873, mode=438, pool=0x983ab18) at subversion/libsvn_fs_base/bdb/env.c:622
#4 0xb7d4a386 in open_databases (fs=0x9834d18, create=0, format=3, path=0x983cfc0 "/tmp/repo/db", pool=0x983ab18) at subversion/libsvn_fs_base/fs.c:526
#5 0xb7d4acd1 in base_open (fs=0x9834d18, path=0x983cfc0 "/tmp/repo/db", pool=0x983ab18, common_pool=0x984aa50) at subversion/libsvn_fs_base/fs.c:731
#6 0xb7d69eb7 in svn_fs_open (fs_p=0x983cf70, path=0x983cfc0 "/tmp/repo/db", fs_config=0x0, pool=0x983ab18) at subversion/libsvn_fs/fs-loader.c:396
#7 0xb7d8a710 in get_repos (repos_p=0x983ce54, path=0x983ce68 "/tmp/repo", exclusive=0, nonblocking=0, open_fs=1, pool=0x983ab18) at subversion/libsvn_repos/repos.c:1321
#8 0xb7d8a825 in svn_repos_open (repos_p=0x983ce54, path=0x983ce68 "/tmp/repo", pool=0x983ab18) at subversion/libsvn_repos/repos.c:1366
#9 0xb7d9e560 in svn_ra_local__split_URL (repos=0x983ce54, repos_url=0x983ce4c, fs_path=0xbf9998e4, URL=0x983cca8 "file:///tmp/repo", pool=0x983ab18) at subversion/libsvn_ra_local/split_url.c:139
#10 0xb7d9b86e in svn_ra_local__open (session=0x983ce38, repos_URL=0x983cca8 "file:///tmp/repo", callbacks=0x983cd88, callback_baton=0x983cdb0, config=0x9814398, pool=0x983ab18)
    at subversion/libsvn_ra_local/ra_plugin.c:452
#11 0xb800b97d in svn_ra_open3 (session_p=0xbf999b00, repos_URL=0x983cca8 "file:///tmp/repo", uuid=0x983cd38 "c7f93571-5b89-49c9-9b52-35ba7b531933", callbacks=0x983cd88, callback_baton=0x983cdb0,
    config=0x9814398, pool=0x983ab18) at subversion/libsvn_ra/ra_loader.c:595
#12 0xb808da1a in svn_client__open_ra_session_internal (ra_session=0xbf999b00, base_url=0x983cca8 "file:///tmp/repo", base_dir=0x983cb98 "wc", base_access=0x983cb70, commit_items=0x0, use_admin=1,
    read_only_wc=1, ctx=0x9814348, pool=0x983ab18) at subversion/libsvn_client/ra.c:324
#13 0xb80938ec in svn_client__update_internal (result_rev=0x0, path=0x98154a0 "wc", revision=0xbf999ce0, depth=svn_depth_infinity, depth_is_sticky=1, ignore_externals=0, allow_unver_obstructions=0,
    timestamp_sleep=0xbf999c00, send_copyfrom_args=0, ctx=0x9814348, pool=0x983ab18) at subversion/libsvn_client/update.c:182
#14 0xb80630f9 in svn_client__checkout_internal (result_rev=0x0, url=0x983ab70 "file:///tmp/repo", path=0x98154a0 "wc", peg_revision=0xbf999cd4, revision=0xbf999ce0, depth=svn_depth_infinity,
    ignore_externals=0, allow_unver_obstructions=0, timestamp_sleep=0x0, ctx=0x9814348, pool=0x983ab18) at subversion/libsvn_client/checkout.c:135
#15 0xb806340d in svn_client_checkout3 (result_rev=0x0, URL=0x983ab58 "file:///tmp/repo", path=0x98154a0 "wc", peg_revision=0xbf999cd4, revision=0xbf999ce0, depth=svn_depth_unknown, ignore_externals=0,
    allow_unver_obstructions=0, ctx=0x9814348, pool=0x983ab18) at subversion/libsvn_client/checkout.c:213
#16 0x0804cf67 in svn_cl__checkout (os=0x9813b20, baton=0xbf999e24, pool=0x9813978) at subversion/svn/checkout-cmd.c:160
#17 0x08056a74 in main (argc=4, argv=0xbf99a044) at subversion/svn/main.c:1999
(gdb)

As you can see, bdb_cache_get() calls apr_hash_get() with a NULL pointer
(bdb_cache) to apr_hash_t.

> The following change is nominated for back-port to 1.5.x:
>
> > * r31425, r31722, r32071
> > Support the 'http-library' option when Subversion was configured
> > with the '--enable-runtime-module-search' option.
> > Notes:
> > r32071 isn't required, but minimizes the difference against trunk.
> > Votes:
> > +1: arfrever
>
> Could this be related to the seg-fault?

It isn't related.

-- 
Arfrever Frehtes Taifersar Arahesis

Received on 2008-07-18 15:02:27 CEST

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.