You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by "Hyrum K. Wright" <hy...@mail.utexas.edu> on 2008/01/16 20:16:12 UTC
svnsync funniness with bdb repositories
Ran across this little beauty while trying to set up a mirror of the gcc
repository. (Using the 1.4.x branch)
$ svnadmin create gcc.bdb --fs-type bdb
$ cat <<'EOF' > gcc.bdb/hooks/pre-revprop-change
> #!/bin/sh
> exit 0
> EOF
$ chmod +x gcc.bdb/hooks/pre-revprop-change
$ svnsync init file://`pwd`/gcc.bdb/ svn://gcc.gnu.org/svn/gcc/
Segmentation fault (core dumped)
So, I tried it with FSFS:
$ svnadmin create gcc.fsfs
$ cat <<'EOF' > gcc.fsfs/hooks/pre-revprop-change
> #!/bin/sh
> exit 0
> EOF
$ chmod +x gcc.fsfs/hooks/pre-revprop-change
$ svnsync init file://`pwd`/gcc.fsfs/ svn://gcc.gnu.org/svn/gcc/
Copied properties for revision 0.
And it works! When I try with a recent trunk build, with
--enable-maintainer-mode, I get the following results with a bdb repository:
$ svnadmin create gcc.bdb --fs-type bdb
$ cat <<'EOF' > gcc.bdb/hooks/pre-revprop-change> #!/bin/sh
> exit 0
> EOF
$ chmod +x gcc.bdb/hooks/pre-revprop-change
$ ~/dev/svn-trunk/subversion/svnsync/svnsync init file://`pwd`/gcc.bdb/
svn://gcc.gnu.org/svn/gcc/
subversion/libsvn_fs_base/err.c:60: (apr_err=160006)
svnsync: Reference to non-existent revision 0 in filesystem
'/home/hwright/test/gcc.bdb/db'
But, when I create the repo with a trunk build, and then try it, it works:
$ ~/dev/svn-trunk/subversion/svnadmin/svnadmin create gcc.bdb --fs-type bdb
$ cat <<'EOF' > gcc.bdb/hooks/pre-revprop-change
> #!/bin/sh
> exit 0
> EOF
$ chmod +x gcc.bdb/hooks/pre-revprop-change
$ ~/dev/svn-trunk/subversion/svnsync/svnsync init file://`pwd`/gcc.bdb/
svn://gcc.gnu.org/svn/gcc/
Copied properties for revision 0.
So, it works when using a trunk-created svnadmin, and a trunk-created
svnsync. But, if the repo was created with 1.4.x, the sync won't be
initialized for bdb repositories. Was there a bug fixed in trunk
regarding creation of bdb repositories? Should that fix be backported?
-Hyrum
Re: svnsync funniness with bdb repositories
Posted by "Hyrum K. Wright" <hy...@mail.utexas.edu>.
Lieven Govaerts wrote:
>
>
> Hyrum K. Wright wrote:
>> Added to the issue tracker as issue #3079.
>>
>
> [..]
>
>>>
>>>> Can you successfully run the svnsync tests over svn with a bdb
>>>> repository?
>>> No. I get an failure in test 19:
>>>
>>> EXCEPTION: SVNUnexpectedStderr: ['subversion/libsvn_repos/hooks.c:228:
>>> (apr_err=165001)\n', "svnsync: Failed to start
>>> '/home/hwright/dev/svn-apache/subversion/tests/cmdline/svn-test-work/repositories/svnsync_tests-19-1/hooks/pre-revprop-change'
>>>
>>> hook\n", 'subversion/libsvn_subr/utf.c:632: (apr_err=22)\n', 'svnsync:
>>> Valid UTF-8 data\n', '(hex: 18)\n', 'followed by invalid UTF-8
>>> sequence\n', '(hex: fd 09 08)\n']
>>> Traceback (most recent call last):
>>> File
>>> "/home/hwright/dev/svn-apache/subversion/tests/cmdline/svntest/main.py",
>>> line 1059, in run
>>> rc = apply(self.pred.run, (), kw)
>>> File
>>> "/home/hwright/dev/svn-apache/subversion/tests/cmdline/svntest/testcase.py",
>>>
>>> line 121, in run
>>> return self.func(sandbox)
>>> File "./svnsync_tests.py", line 638, in no_author
>>> run_test(sbox, "no-author.dump")
>>> File "./svnsync_tests.py", line 114, in run_test
>>> run_sync(dest_sbox.repo_url)
>>> File "./svnsync_tests.py", line 56, in run_sync
>>> raise SVNUnexpectedStderr(errput)
>>> SVNUnexpectedStderr: ['subversion/libsvn_repos/hooks.c:228:
>>> (apr_err=165001)\n', "svnsync: Failed to start
>>> '/home/hwright/dev/svn-apache/subversion/tests/cmdline/svn-test-work/repositories/svnsync_tests-19-1/hooks/pre-revprop-change'
>>>
>>> hook\n", 'subversion/libsvn_subr/utf.c:632: (apr_err=22)\n', 'svnsync:
>>> Valid UTF-8 data\n', '(hex: 18)\n', 'followed by invalid UTF-8
>>> sequence\n', '(hex: fd 09 08)\n']
>>> FAIL: svnsync_tests.py 19: test copying revs with no svn:author
>>> revprops
>
> Hyrum,
>
> r28995 fixes this test with bdb. Can you check if it also fixes the
> other issues you encountered?
Seems to work. I was able to leaving it running overnight, and didn't
wake up to a crash. :)
I am still seeing a failure of svnsync test 23 with bdb, though:
$ ./svnsync_tests.py --fs-type bdb 23
Aborted (core dumped)
Traceback (most recent call last):
File
"/home/hwright/dev/svn-javahl/subversion/tests/cmdline/svntest/main.py",
line 1059, in run
rc = apply(self.pred.run, (), kw)
File
"/home/hwright/dev/svn-javahl/subversion/tests/cmdline/svntest/testcase.py",
line 121, in run
return self.func(sandbox)
File "./svnsync_tests.py", line 657, in
move_and_modify_in_the_same_revision
run_test(sbox, "svnsync-move-and-modify.dump")
File "./svnsync_tests.py", line 93, in run_test
svntest.actions.run_and_verify_load(sbox.repo_dir,
master_dumpfile_contents)
File
"/home/hwright/dev/svn-javahl/subversion/tests/cmdline/svntest/actions.py",
line 203, in run_and_verify_load
'load', '--force-uuid', '--quiet', repo_dir)
File
"/home/hwright/dev/svn-javahl/subversion/tests/cmdline/svntest/main.py",
line 435, in run_command_stdin
raise Failure
Failure
FAIL: svnsync_tests.py 23: test move parent and modify child file in
same rev
-Hyrum
Re: svnsync funniness with bdb repositories
Posted by Lieven Govaerts <sv...@mobsol.be>.
Hyrum K. Wright wrote:
> Added to the issue tracker as issue #3079.
>
[..]
>>
>>> Can you successfully run the svnsync tests over svn with a bdb repository?
>> No. I get an failure in test 19:
>>
>> EXCEPTION: SVNUnexpectedStderr: ['subversion/libsvn_repos/hooks.c:228:
>> (apr_err=165001)\n', "svnsync: Failed to start
>> '/home/hwright/dev/svn-apache/subversion/tests/cmdline/svn-test-work/repositories/svnsync_tests-19-1/hooks/pre-revprop-change'
>> hook\n", 'subversion/libsvn_subr/utf.c:632: (apr_err=22)\n', 'svnsync:
>> Valid UTF-8 data\n', '(hex: 18)\n', 'followed by invalid UTF-8
>> sequence\n', '(hex: fd 09 08)\n']
>> Traceback (most recent call last):
>> File
>> "/home/hwright/dev/svn-apache/subversion/tests/cmdline/svntest/main.py",
>> line 1059, in run
>> rc = apply(self.pred.run, (), kw)
>> File
>> "/home/hwright/dev/svn-apache/subversion/tests/cmdline/svntest/testcase.py",
>> line 121, in run
>> return self.func(sandbox)
>> File "./svnsync_tests.py", line 638, in no_author
>> run_test(sbox, "no-author.dump")
>> File "./svnsync_tests.py", line 114, in run_test
>> run_sync(dest_sbox.repo_url)
>> File "./svnsync_tests.py", line 56, in run_sync
>> raise SVNUnexpectedStderr(errput)
>> SVNUnexpectedStderr: ['subversion/libsvn_repos/hooks.c:228:
>> (apr_err=165001)\n', "svnsync: Failed to start
>> '/home/hwright/dev/svn-apache/subversion/tests/cmdline/svn-test-work/repositories/svnsync_tests-19-1/hooks/pre-revprop-change'
>> hook\n", 'subversion/libsvn_subr/utf.c:632: (apr_err=22)\n', 'svnsync:
>> Valid UTF-8 data\n', '(hex: 18)\n', 'followed by invalid UTF-8
>> sequence\n', '(hex: fd 09 08)\n']
>> FAIL: svnsync_tests.py 19: test copying revs with no svn:author revprops
Hyrum,
r28995 fixes this test with bdb. Can you check if it also fixes the
other issues you encountered?
Lieven
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: svnsync funniness with bdb repositories
Posted by "Hyrum K. Wright" <hy...@mail.utexas.edu>.
Added to the issue tracker as issue #3079.
-Hyrum
Hyrum K. Wright wrote:
> Lieven Govaerts wrote:
>> Hyrum K. Wright wrote:
>>> Hyrum K. Wright wrote:
>> ..
>>> More weirdness with svnsync. In trying to sync the gcc repository, I get
>>> consistent segfaults using a trunk build of svnsync. This is a transcript of
>>> the session:
>>> $ ~/dev/svn-trunk/subversion/svnsync/svnsync sync \
>>> file:///home/hwright/test/gcc.bdb
>>> Copied properties for revision 8132.
>>> Transmitting file data
>>> Committed revision 8133.
>>> Segmentation fault (core dumped)
>>> $ svnd pd --revprop -r 0 svn:sync-lock file:///home/hwright/test/gcc.bdb
>>> property 'svn:sync-lock' deleted from repository revision 0
>>> $ ~/dev/svn-trunk/subversion/svnsync/svnsync sync \
>>> file:///home/hwright/test/gcc.bdb
>>> Copied properties for revision 8133.
>>> Transmitting file data
>>> Committed revision 8134.
>>> Segmentation fault (core dumped)
>>> $ svnd pd --revprop -r 0 svn:sync-lock file:///home/hwright/test/gcc.bdb
>>> property 'svn:sync-lock' deleted from repository revision 0
>>> $ ~/dev/svn-trunk/subversion/svnsync/svnsync sync \
>>> file:///home/hwright/test/gcc.bdb
>>> Copied properties for revision 8134.
>>> Transmitting file data
>>> Committed revision 8135.
>>> Segmentation fault (core dumped)
>>>
>>> It gets through one revision, and then crashes. It doesn't crash on *every*
>>> revision, but for this repository in this case it is behaving that way. This is
>>> a transcript of a gdb session.
>>>
>>> (gdb) r
>>> [Thread debugging using libthread_db enabled]
>>> [New Thread -1216358736 (LWP 30619)]
>>> Copied properties for revision 8138.
>>> Transmitting file data
>>> Committed revision 8139.
>>>
>> ..
>>
>> Do you have the same issue with fsfs? I starting syncing the gcc
>> repository over svn to a local fsfs repository, but the first 100
>> revisions or so sync without problem.
>
> I haven't tried that yet. I'll let you know what (if anything) I come
> up with.
>
>> I don't see anything special about the revisions, besides the fact that
>> the svn:author revprop isn't set, but that shouldn't be a problem.
>> Seeing that after you restart svnsync it manages to correctly copy the
>> revision properties I assume it's a local bug in the new svnsync
>> callback code.
>
> Possibly. I've noticed that all the revisions where I'm getting
> segfaults don't have the svn:author revprop set. (Also, see the test
> failure below.)
>
>> Can you successfully run the svnsync tests over svn with a bdb repository?
>
> No. I get an failure in test 19:
>
> EXCEPTION: SVNUnexpectedStderr: ['subversion/libsvn_repos/hooks.c:228:
> (apr_err=165001)\n', "svnsync: Failed to start
> '/home/hwright/dev/svn-apache/subversion/tests/cmdline/svn-test-work/repositories/svnsync_tests-19-1/hooks/pre-revprop-change'
> hook\n", 'subversion/libsvn_subr/utf.c:632: (apr_err=22)\n', 'svnsync:
> Valid UTF-8 data\n', '(hex: 18)\n', 'followed by invalid UTF-8
> sequence\n', '(hex: fd 09 08)\n']
> Traceback (most recent call last):
> File
> "/home/hwright/dev/svn-apache/subversion/tests/cmdline/svntest/main.py",
> line 1059, in run
> rc = apply(self.pred.run, (), kw)
> File
> "/home/hwright/dev/svn-apache/subversion/tests/cmdline/svntest/testcase.py",
> line 121, in run
> return self.func(sandbox)
> File "./svnsync_tests.py", line 638, in no_author
> run_test(sbox, "no-author.dump")
> File "./svnsync_tests.py", line 114, in run_test
> run_sync(dest_sbox.repo_url)
> File "./svnsync_tests.py", line 56, in run_sync
> raise SVNUnexpectedStderr(errput)
> SVNUnexpectedStderr: ['subversion/libsvn_repos/hooks.c:228:
> (apr_err=165001)\n', "svnsync: Failed to start
> '/home/hwright/dev/svn-apache/subversion/tests/cmdline/svn-test-work/repositories/svnsync_tests-19-1/hooks/pre-revprop-change'
> hook\n", 'subversion/libsvn_subr/utf.c:632: (apr_err=22)\n', 'svnsync:
> Valid UTF-8 data\n', '(hex: 18)\n', 'followed by invalid UTF-8
> sequence\n', '(hex: fd 09 08)\n']
> FAIL: svnsync_tests.py 19: test copying revs with no svn:author revprops
>
>>> This is the point that I get lost, not having any experience with svnsync.
>>> Could somebody with more knowledge take a look? Would it be better filed as an
>>> issue in the the bug tracker?
>>>
>> The faulty code was all rewritten on trunk, still, better to create an
>> issue for 1.5 so we don't forget. I'll have a look once I have more time
>> (this weekend at the latest). I tried to get a bdb build on my ubuntu
>> laptop, but that seemed to be a problem (keeps complaining apr-util
>> isn't linked with bdb).
>
> You've just hit Ubuntu bug #96980 [1]. I have a custom apr build
> sitting in /usr/local/ which I use to work around this issue.
>
> [1] https://bugs.launchpad.net/ubuntu/+source/apr-util/+bug/96980
>
> Thanks for the help,
> -Hyrum
>
Re: svnsync funniness with bdb repositories
Posted by "Hyrum K. Wright" <hy...@mail.utexas.edu>.
Lieven Govaerts wrote:
> Hyrum K. Wright wrote:
>> Hyrum K. Wright wrote:
> ..
>> More weirdness with svnsync. In trying to sync the gcc repository, I get
>> consistent segfaults using a trunk build of svnsync. This is a transcript of
>> the session:
>> $ ~/dev/svn-trunk/subversion/svnsync/svnsync sync \
>> file:///home/hwright/test/gcc.bdb
>> Copied properties for revision 8132.
>> Transmitting file data
>> Committed revision 8133.
>> Segmentation fault (core dumped)
>> $ svnd pd --revprop -r 0 svn:sync-lock file:///home/hwright/test/gcc.bdb
>> property 'svn:sync-lock' deleted from repository revision 0
>> $ ~/dev/svn-trunk/subversion/svnsync/svnsync sync \
>> file:///home/hwright/test/gcc.bdb
>> Copied properties for revision 8133.
>> Transmitting file data
>> Committed revision 8134.
>> Segmentation fault (core dumped)
>> $ svnd pd --revprop -r 0 svn:sync-lock file:///home/hwright/test/gcc.bdb
>> property 'svn:sync-lock' deleted from repository revision 0
>> $ ~/dev/svn-trunk/subversion/svnsync/svnsync sync \
>> file:///home/hwright/test/gcc.bdb
>> Copied properties for revision 8134.
>> Transmitting file data
>> Committed revision 8135.
>> Segmentation fault (core dumped)
>>
>> It gets through one revision, and then crashes. It doesn't crash on *every*
>> revision, but for this repository in this case it is behaving that way. This is
>> a transcript of a gdb session.
>>
>> (gdb) r
>> [Thread debugging using libthread_db enabled]
>> [New Thread -1216358736 (LWP 30619)]
>> Copied properties for revision 8138.
>> Transmitting file data
>> Committed revision 8139.
>>
> ..
>
> Do you have the same issue with fsfs? I starting syncing the gcc
> repository over svn to a local fsfs repository, but the first 100
> revisions or so sync without problem.
I haven't tried that yet. I'll let you know what (if anything) I come
up with.
> I don't see anything special about the revisions, besides the fact that
> the svn:author revprop isn't set, but that shouldn't be a problem.
> Seeing that after you restart svnsync it manages to correctly copy the
> revision properties I assume it's a local bug in the new svnsync
> callback code.
Possibly. I've noticed that all the revisions where I'm getting
segfaults don't have the svn:author revprop set. (Also, see the test
failure below.)
> Can you successfully run the svnsync tests over svn with a bdb repository?
No. I get an failure in test 19:
EXCEPTION: SVNUnexpectedStderr: ['subversion/libsvn_repos/hooks.c:228:
(apr_err=165001)\n', "svnsync: Failed to start
'/home/hwright/dev/svn-apache/subversion/tests/cmdline/svn-test-work/repositories/svnsync_tests-19-1/hooks/pre-revprop-change'
hook\n", 'subversion/libsvn_subr/utf.c:632: (apr_err=22)\n', 'svnsync:
Valid UTF-8 data\n', '(hex: 18)\n', 'followed by invalid UTF-8
sequence\n', '(hex: fd 09 08)\n']
Traceback (most recent call last):
File
"/home/hwright/dev/svn-apache/subversion/tests/cmdline/svntest/main.py",
line 1059, in run
rc = apply(self.pred.run, (), kw)
File
"/home/hwright/dev/svn-apache/subversion/tests/cmdline/svntest/testcase.py",
line 121, in run
return self.func(sandbox)
File "./svnsync_tests.py", line 638, in no_author
run_test(sbox, "no-author.dump")
File "./svnsync_tests.py", line 114, in run_test
run_sync(dest_sbox.repo_url)
File "./svnsync_tests.py", line 56, in run_sync
raise SVNUnexpectedStderr(errput)
SVNUnexpectedStderr: ['subversion/libsvn_repos/hooks.c:228:
(apr_err=165001)\n', "svnsync: Failed to start
'/home/hwright/dev/svn-apache/subversion/tests/cmdline/svn-test-work/repositories/svnsync_tests-19-1/hooks/pre-revprop-change'
hook\n", 'subversion/libsvn_subr/utf.c:632: (apr_err=22)\n', 'svnsync:
Valid UTF-8 data\n', '(hex: 18)\n', 'followed by invalid UTF-8
sequence\n', '(hex: fd 09 08)\n']
FAIL: svnsync_tests.py 19: test copying revs with no svn:author revprops
>> This is the point that I get lost, not having any experience with svnsync.
>> Could somebody with more knowledge take a look? Would it be better filed as an
>> issue in the the bug tracker?
>>
> The faulty code was all rewritten on trunk, still, better to create an
> issue for 1.5 so we don't forget. I'll have a look once I have more time
> (this weekend at the latest). I tried to get a bdb build on my ubuntu
> laptop, but that seemed to be a problem (keeps complaining apr-util
> isn't linked with bdb).
You've just hit Ubuntu bug #96980 [1]. I have a custom apr build
sitting in /usr/local/ which I use to work around this issue.
[1] https://bugs.launchpad.net/ubuntu/+source/apr-util/+bug/96980
Thanks for the help,
-Hyrum
Re: svnsync funniness with bdb repositories
Posted by Lieven Govaerts <sv...@mobsol.be>.
Hyrum K. Wright wrote:
> Hyrum K. Wright wrote:
..
>
> More weirdness with svnsync. In trying to sync the gcc repository, I get
> consistent segfaults using a trunk build of svnsync. This is a transcript of
> the session:
> $ ~/dev/svn-trunk/subversion/svnsync/svnsync sync \
> file:///home/hwright/test/gcc.bdb
> Copied properties for revision 8132.
> Transmitting file data
> Committed revision 8133.
> Segmentation fault (core dumped)
> $ svnd pd --revprop -r 0 svn:sync-lock file:///home/hwright/test/gcc.bdb
> property 'svn:sync-lock' deleted from repository revision 0
> $ ~/dev/svn-trunk/subversion/svnsync/svnsync sync \
> file:///home/hwright/test/gcc.bdb
> Copied properties for revision 8133.
> Transmitting file data
> Committed revision 8134.
> Segmentation fault (core dumped)
> $ svnd pd --revprop -r 0 svn:sync-lock file:///home/hwright/test/gcc.bdb
> property 'svn:sync-lock' deleted from repository revision 0
> $ ~/dev/svn-trunk/subversion/svnsync/svnsync sync \
> file:///home/hwright/test/gcc.bdb
> Copied properties for revision 8134.
> Transmitting file data
> Committed revision 8135.
> Segmentation fault (core dumped)
>
> It gets through one revision, and then crashes. It doesn't crash on *every*
> revision, but for this repository in this case it is behaving that way. This is
> a transcript of a gdb session.
>
> (gdb) r
> [Thread debugging using libthread_db enabled]
> [New Thread -1216358736 (LWP 30619)]
> Copied properties for revision 8138.
> Transmitting file data
> Committed revision 8139.
>
..
Do you have the same issue with fsfs? I starting syncing the gcc
repository over svn to a local fsfs repository, but the first 100
revisions or so sync without problem.
I don't see anything special about the revisions, besides the fact that
the svn:author revprop isn't set, but that shouldn't be a problem.
Seeing that after you restart svnsync it manages to correctly copy the
revision properties I assume it's a local bug in the new svnsync
callback code.
Can you successfully run the svnsync tests over svn with a bdb repository?
>
> This is the point that I get lost, not having any experience with svnsync.
> Could somebody with more knowledge take a look? Would it be better filed as an
> issue in the the bug tracker?
>
The faulty code was all rewritten on trunk, still, better to create an
issue for 1.5 so we don't forget. I'll have a look once I have more time
(this weekend at the latest). I tried to get a bdb build on my ubuntu
laptop, but that seemed to be a problem (keeps complaining apr-util
isn't linked with bdb).
Lieven
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: svnsync funniness with bdb repositories
Posted by "Hyrum K. Wright" <hy...@mail.utexas.edu>.
Hyrum K. Wright wrote:
> Ran across this little beauty while trying to set up a mirror of the gcc
> repository. (Using the 1.4.x branch)
>
> $ svnadmin create gcc.bdb --fs-type bdb
> $ cat <<'EOF' > gcc.bdb/hooks/pre-revprop-change
>> #!/bin/sh
>> exit 0
>> EOF
> $ chmod +x gcc.bdb/hooks/pre-revprop-change
> $ svnsync init file://`pwd`/gcc.bdb/ svn://gcc.gnu.org/svn/gcc/
> Segmentation fault (core dumped)
>
> So, I tried it with FSFS:
>
> $ svnadmin create gcc.fsfs
> $ cat <<'EOF' > gcc.fsfs/hooks/pre-revprop-change
>> #!/bin/sh
>> exit 0
>> EOF
> $ chmod +x gcc.fsfs/hooks/pre-revprop-change
> $ svnsync init file://`pwd`/gcc.fsfs/ svn://gcc.gnu.org/svn/gcc/
> Copied properties for revision 0.
>
> And it works! When I try with a recent trunk build, with
> --enable-maintainer-mode, I get the following results with a bdb repository:
>
> $ svnadmin create gcc.bdb --fs-type bdb
> $ cat <<'EOF' > gcc.bdb/hooks/pre-revprop-change> #!/bin/sh
>> exit 0
>> EOF
> $ chmod +x gcc.bdb/hooks/pre-revprop-change
> $ ~/dev/svn-trunk/subversion/svnsync/svnsync init file://`pwd`/gcc.bdb/
> svn://gcc.gnu.org/svn/gcc/
> subversion/libsvn_fs_base/err.c:60: (apr_err=160006)
> svnsync: Reference to non-existent revision 0 in filesystem
> '/home/hwright/test/gcc.bdb/db'
>
> But, when I create the repo with a trunk build, and then try it, it works:
>
> $ ~/dev/svn-trunk/subversion/svnadmin/svnadmin create gcc.bdb --fs-type bdb
> $ cat <<'EOF' > gcc.bdb/hooks/pre-revprop-change
>> #!/bin/sh
>> exit 0
>> EOF
> $ chmod +x gcc.bdb/hooks/pre-revprop-change
> $ ~/dev/svn-trunk/subversion/svnsync/svnsync init file://`pwd`/gcc.bdb/
> svn://gcc.gnu.org/svn/gcc/
> Copied properties for revision 0.
>
> So, it works when using a trunk-created svnadmin, and a trunk-created
> svnsync. But, if the repo was created with 1.4.x, the sync won't be
> initialized for bdb repositories. Was there a bug fixed in trunk
> regarding creation of bdb repositories? Should that fix be backported?
More weirdness with svnsync. In trying to sync the gcc repository, I get
consistent segfaults using a trunk build of svnsync. This is a transcript of
the session:
$ ~/dev/svn-trunk/subversion/svnsync/svnsync sync \
file:///home/hwright/test/gcc.bdb
Copied properties for revision 8132.
Transmitting file data
Committed revision 8133.
Segmentation fault (core dumped)
$ svnd pd --revprop -r 0 svn:sync-lock file:///home/hwright/test/gcc.bdb
property 'svn:sync-lock' deleted from repository revision 0
$ ~/dev/svn-trunk/subversion/svnsync/svnsync sync \
file:///home/hwright/test/gcc.bdb
Copied properties for revision 8133.
Transmitting file data
Committed revision 8134.
Segmentation fault (core dumped)
$ svnd pd --revprop -r 0 svn:sync-lock file:///home/hwright/test/gcc.bdb
property 'svn:sync-lock' deleted from repository revision 0
$ ~/dev/svn-trunk/subversion/svnsync/svnsync sync \
file:///home/hwright/test/gcc.bdb
Copied properties for revision 8134.
Transmitting file data
Committed revision 8135.
Segmentation fault (core dumped)
It gets through one revision, and then crashes. It doesn't crash on *every*
revision, but for this repository in this case it is behaving that way. This is
a transcript of a gdb session.
(gdb) r
[Thread debugging using libthread_db enabled]
[New Thread -1216358736 (LWP 30619)]
Copied properties for revision 8138.
Transmitting file data
Committed revision 8139.
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread -1216358736 (LWP 30619)]
apr_hash_next (hi=0x8199330) at tables/apr_hash.c:130
/home/hwright/dev/apr-1.2.12/tables/apr_hash.c:130:3539:beg:0xb7d9fb8f
(gdb) p hi
$1 = (apr_hash_index_t *) 0x8199330
(gdb) p hi->this
$2 = (apr_hash_entry_t *) 0x77682f65
(gdb) p hi->next
$3 = (apr_hash_entry_t *) 0x0
(gdb) p hi->this->next
Cannot access memory at address 0x77682f65
(gdb) backtrace
#0 apr_hash_next (hi=0x8199330) at tables/apr_hash.c:130
#1 0x0804e1d7 in remove_props_not_in_source (session=0x8153248, rev=8139,
source_props=0x818ea78, target_props=0x81d1428, pool=0x818e690) at
subversion/svnsync/main.c:362
#2 0x0804fc11 in replay_rev_finished (revision=8139, replay_baton=0x818d880,
editor=0x8198af0, edit_baton=0x8198b30, rev_props=0x818ea78, pool=0x818e690) at
subversion/svnsync/main.c:1305
#3 0x0805347e in svn_ra_replay_range (session=0x8156238, start_revision=8139,
end_revision=131585, low_water_mark=0, text_deltas=1, revstart_func=0x804f8a7
<replay_rev_started>, revfinish_func=0x804fa8b <replay_rev_finished>,
replay_baton=0x818d880, pool=0x8143170) at subversion/libsvn_ra/ra_loader.c:1203
#4 0x080500f4 in do_synchronize (to_session=0x8153248, b=0x8153180,
pool=0x8143170) at subversion/svnsync/main.c:1455
#5 0x0804df68 in with_locked (session=0x8153248, func=0x804fd27
<do_synchronize>, baton=0x8153180, pool=0x8143170) at subversion/svnsync/main.c:284
#6 0x0805032a in synchronize_cmd (os=0x8143288, b=0xbfdade5c, pool=0x8143170)
at subversion/svnsync/main.c:1494
#7 0x080513dc in main (argc=3, argv=0xbfdadf84) at subversion/svnsync/main.c:1967
This is the point that I get lost, not having any experience with svnsync.
Could somebody with more knowledge take a look? Would it be better filed as an
issue in the the bug tracker?
-Hyrum