On 6 Jul 2011, at 15:53, Hyrum K Wright wrote:

> Can you reproduce this with a non-optimized build of Subversion?  Many
> of the function arguments in the stack trace appear to be optimized
> out, making it less than useful.
> 
> -Hyrum

svn built with ./configure --prefix=/usr/local --enable-debug on Fedora 15 
x86_64.

Let me know if you want to run this yourself. I can provide a tarball with the 
pysvn sources
that trigger this and easy instructions to reproduce.


I'm testing 1.7-alpha2 against pysvn and I'm seeing an assert
when calling svn_client_merge3. This has all works against 1.6.

Is this a bug in svn or pysvn calling svn?


Here is what was printed:

Info: pysvn command: merge --revision 16:17 
file:///home/barry/wc/svn/pysvn/Extension/Tests/testroot-01/root/repos/trunk/test
 /home/barry/wc/svn/pysvn/Extension/Tests/testroot-01/wc3/test-branch
subversion/libsvn_subr/mergeinfo.c:801: (apr_err=235000)
svn: E235000: In file 'subversion/libsvn_subr/mergeinfo.c' line 801: assertion 
failed (IS_VALID_FORWARD_RANGE(first))
./test-01-qqq.sh: line 16:  9958 Aborted                 (core dumped) ${PYSVN} 
"$@"

And gdb output of the stack, the call site and the variables passed into 
svn_client_merge3.

(gdb) bt
(gdb) bt
#0  0x00000039fba36415 in raise (sig=6) at 
../nptl/sysdeps/unix/sysv/linux/raise.c:64
#1  0x00000039fba37d2b in abort () at abort.c:92
#2  0x00007f6515b177ce in svn_error_abort_on_malfunction (can_return=0, file=
    0x7f6515b4eae0 "subversion/libsvn_subr/mergeinfo.c", line=801, 
expr=0x7f6515b4ee31 "IS_VALID_FORWARD_RANGE(first)")
    at subversion/libsvn_subr/error.c:648
#3  0x00007f6515b17822 in svn_error__malfunction (can_return=0, 
file=0x7f6515b4eae0 "subversion/libsvn_subr/mergeinfo.c", 
    line=801, expr=0x7f6515b4ee31 "IS_VALID_FORWARD_RANGE(first)") at 
subversion/libsvn_subr/error.c:671
#4  0x00007f6515b24832 in range_contains (first=0x19c32b8, 
second=0x7fff0a765490, consider_inheritance=0)
    at subversion/libsvn_subr/mergeinfo.c:801
#5  0x00007f6515b24c36 in rangelist_intersect_or_remove (output=0x19bf500, 
rangelist1=0x19c3290, rangelist2=0x19c1410, 
    do_remove=0, consider_inheritance=0, pool=0x19c1728) at 
subversion/libsvn_subr/mergeinfo.c:959
#6  0x00007f6515b251bb in svn_rangelist_intersect (output=0x19bf500, 
rangelist1=0x19c3290, rangelist2=0x19c1410, 
    consider_inheritance=0, pool=0x19c1728) at 
subversion/libsvn_subr/mergeinfo.c:1107
#7  0x00007f65177aa872 in adjust_deleted_subtree_ranges (child=0x19bf4e0, 
parent=0x194c1d8, mergeinfo_path=
    0x19c1900 "/trunk/test/file-merge-1.txt", revision1=16, revision2=17, 
primary_url=
    0x19c1858 
"file:///home/barry/wc/svn/pysvn/Extension/Tests/testroot-01/root/repos/trunk/test/file-merge-1.txt",
 
    ra_session=0x1985598, ctx=0x19084e0, result_pool=0x194b0e8, 
scratch_pool=0x19c1728)
    at subversion/libsvn_client/merge.c:2908
#8  0x00007f65177ab328 in fix_deleted_subtree_ranges (url1=
    0x191ba48 
"file:///home/barry/wc/svn/pysvn/Extension/Tests/testroot-01/root/repos/trunk/test",
 revision1=16, url2=
    0x191bad0 
"file:///home/barry/wc/svn/pysvn/Extension/Tests/testroot-01/root/repos/trunk/test",
 revision2=17, ra_session=
    0x1985598, notify_b=0x7fff0a765a00, merge_b=0x7fff0a765a60, 
result_pool=0x194b0e8, scratch_pool=0x19c3738)
    at subversion/libsvn_client/merge.c:3140
#9  0x00007f65177b5fda in do_directory_merge (result_catalog=0x0, url1=
    0x191ba48 
"file:///home/barry/wc/svn/pysvn/Extension/Tests/testroot-01/root/repos/trunk/test",
 revision1=16, url2=
    0x191bad0 
"file:///home/barry/wc/svn/pysvn/Extension/Tests/testroot-01/root/repos/trunk/test",
 revision2=17, 
    target_abspath=0x191ace8 
"/home/barry/wc/svn/pysvn/Extension/Tests/testroot-01/wc3/test-branch", 
depth=svn_depth_files, 
    squelch_mergeinfo_notifications=0, abort_on_conflicts=0, 
notify_b=0x7fff0a765a00, merge_b=0x7fff0a765a60, scratch_pool=
    0x194b0e8) at subversion/libsvn_client/merge.c:8246
#10 0x00007f65177b6f55 in do_merge (modified_subtrees=0x0, result_catalog=0x0, 
merge_sources=0x191b890, target_abspath=
    0x191ace8 
"/home/barry/wc/svn/pysvn/Extension/Tests/testroot-01/wc3/test-branch", 
sources_ancestral=1, 
    sources_related=1, same_repos=1, ignore_ancestry=0, force=0, dry_run=1, 
record_only=0, record_only_paths=0x0, 
    reintegrate_merge=0, squelch_mergeinfo_notifications=0, 
depth=svn_depth_files, merge_options=0x0, use_sleep=
    0x7fff0a765ccc, ctx=0x19084e0, result_pool=0x191a4d8, 
scratch_pool=0x191a4d8) at subversion/libsvn_client/merge.c:8766
#11 0x00007f65177b8df0 in merge_locked (source1=
    0x19261b8 
"file:///home/barry/wc/svn/pysvn/Extension/Tests/testroot-01/root/repos/trunk/test",
 revision1=
---Type <return> to continue, or q <return> to quit---
    0x7fff0a766190, source2=0x1926238 
"file:///home/barry/wc/svn/pysvn/Extension/Tests/testroot-01/root/repos/trunk/test",
 
    revision2=0x7fff0a766170, target_abspath=
    0x191ace8 
"/home/barry/wc/svn/pysvn/Extension/Tests/testroot-01/wc3/test-branch", 
depth=svn_depth_files, 
    ignore_ancestry=0, force=0, record_only=0, dry_run=1, allow_mixed_rev=1, 
merge_options=0x0, ctx=0x19084e0, scratch_pool=
    0x191a4d8) at subversion/libsvn_client/merge.c:9374
#12 0x00007f65177b8f1e in merge_cb (baton=0x7fff0a765ef0, 
result_pool=0x191a4d8, scratch_pool=0x191a4d8)
    at subversion/libsvn_client/merge.c:9411
#13 0x00007f65177b91dc in svn_client_merge4 (source1=
    0x19261b8 
"file:///home/barry/wc/svn/pysvn/Extension/Tests/testroot-01/root/repos/trunk/test",
 revision1=
    0x7fff0a766190, source2=0x1926238 
"file:///home/barry/wc/svn/pysvn/Extension/Tests/testroot-01/root/repos/trunk/test",
 
    revision2=0x7fff0a766170, target_wcpath=
    0x19262b8 
"/home/barry/wc/svn/pysvn/Extension/Tests/testroot-01/wc3/test-branch", 
depth=svn_depth_files, 
    ignore_ancestry=0, force=0, record_only=0, dry_run=1, allow_mixed_rev=1, 
merge_options=0x0, ctx=0x19084e0, pool=
    0x191a4d8) at subversion/libsvn_client/merge.c:9483
#14 0x00007f651779227e in svn_client_merge3 (source1=
    0x19261b8 
"file:///home/barry/wc/svn/pysvn/Extension/Tests/testroot-01/root/repos/trunk/test",
 revision1=
    0x7fff0a766190, source2=0x1926238 
"file:///home/barry/wc/svn/pysvn/Extension/Tests/testroot-01/root/repos/trunk/test",
 
    revision2=0x7fff0a766170, target_wcpath=
    0x19262b8 
"/home/barry/wc/svn/pysvn/Extension/Tests/testroot-01/wc3/test-branch", 
depth=svn_depth_files, 
    ignore_ancestry=0, force=0, record_only=0, dry_run=1, merge_options=0x0, 
ctx=0x19084e0, pool=0x191a4d8)
    at subversion/libsvn_client/deprecated.c:1425
#15 0x00007f6517b72f41 in pysvn_client::cmd_merge (this=0x19081d0, a_args=..., 
a_kws=...) at pysvn_client_cmd_merge.cpp:124


(gdb) l 108
103
104             checkThreadPermission();
105
106             PythonAllowThreads permission( m_context );
107
108     #if defined( PYSVN_HAS_CLIENT_MERGE3 )
109             svn_error_t *error = svn_client_merge3
110                 (
111                 norm_path1.c_str(),
112                 &revision1,
(gdb) 
113                 norm_path2.c_str(),
114                 &revision2,
115                 norm_local_path.c_str(),
116                 depth,
117                 !notice_ancestry,
118                 force,
119                 record_only,
120                 dry_run,
121                 merge_options,
122                 m_context,
(gdb) 
123                 pool
124                 );
(gdb) p norm_path1
$1 = 
"file:///home/barry/wc/svn/pysvn/Extension/Tests/testroot-01/root/repos/trunk/test"
(gdb) p revision1
$2 = {kind = svn_opt_revision_number, value = {number = 16, date = 16}}
(gdb) p norm_path2
$3 = 
"file:///home/barry/wc/svn/pysvn/Extension/Tests/testroot-01/root/repos/trunk/test"
(gdb) p revision2
$4 = {kind = svn_opt_revision_number, value = {number = 17, date = 17}}
(gdb) p depth
$5 = svn_depth_files
(gdb) p notice_ancestry
$6 = true
(gdb) p dry_run
$7 = true
(gdb) p merge_options
$8 = (apr_array_header_t *) 0x0
(gdb) p m_context
$9 = {<SvnContext> = {_vptr.SvnContext = 0x7f6517dfcdf0, m_pool = 0x1908468, 
m_context = 0x19084e0, m_config_dir = 
    0x1907910 
"/home/barry/wc/svn/pysvn/Extension/Tests/testroot-01/configdir"}, 
m_pyfn_GetLogin = {_vptr.Object = 
    0x7f6517dfc050, p = <instancemethod at remote 0x7f651e91d280>}, 
m_pyfn_Notify = {_vptr.Object = 0x7f6517dfc050, p = 
    <instancemethod at remote 0x7f6517e26780>}, m_pyfn_Progress = {_vptr.Object 
= 0x7f6517dfc050, p = None}, 
  m_pyfn_ConflictResolver = {_vptr.Object = 0x7f6517dfc050, p = <instancemethod 
at remote 0x7f6517e26820>}, 
  m_pyfn_Cancel = {_vptr.Object = 0x7f6517dfc050, p = <instancemethod at remote 
0x7f6517fda050>}, m_pyfn_GetLogMessage = {
    _vptr.Object = 0x7f6517dfc050, p = <instancemethod at remote 
0x7f6517e26730>}, m_pyfn_SslServerPrompt = {_vptr.Object = 
    0x7f6517dfc050, p = <instancemethod at remote 0x7f6517fda0f0>}, 
m_pyfn_SslServerTrustPrompt = {_vptr.Object = 
    0x7f6517dfc050, p = <instancemethod at remote 0x7f6517fda140>}, 
m_pyfn_SslClientCertPrompt = {_vptr.Object = 
    0x7f6517dfc050, p = <instancemethod at remote 0x7f6517fda0a0>}, 
m_pyfn_SslClientCertPwPrompt = {_vptr.Object = 
    0x7f6517dfc050, p = <instancemethod at remote 0x7f6517e267d0>}, 
m_default_username = "", m_default_password = "", 
  m_permission = 0x7fff0a7660d0, m_error_message = "", m_log_message = ""}
(gdb) p pool
$10 = {m_pool = 0x191a4d8}
(gdb) p pool.m_pool
$11 = (apr_pool_t *) 0x191a4d8
(gdb) 


Reply via email to