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

Re: Symmetric Merge

From: Paul Burba <ptburba_at_gmail.com>
Date: Wed, 28 Mar 2012 10:46:55 -0400

On Wed, Mar 28, 2012 at 3:40 AM, Julian Foad <julianfoad_at_btopenworld.com> wrote:
> Paul Burba wrote:
>
>> I tweaked run_and_verify_svn2 in a manner similar to what you did to
>> run_and_verify_merge.  This picks up a lot of other 'svn merge' uses
>> and several test failures.  These failures fall into 4 basic
>> categories as detailed below.  I'll be trying some ad hoc testing
>> tomorrow, but wanted to give you what I found thus far.
>
> [...]
>
> Hi Paul.  This is a great help.  Thank you for finding these issues.  I'll get onto them right away.
>
> - Julian

Hi Julian,

Another bug I spotted yesterday but couldn't reproduce until now:
Segfault if a sync merge has nothing to merge due to an *uncommited*
merge:

### Some eligible revs to merge:
C:\SVN\src-trunk-3\Debug\subversion\tests\cmdline\svn-test-work\working_copies\merge_tests-128>svn
mergeinfo --show-revs eligible ^^/A A_COPY
r3
r4
r5
r6

### Do a sync merge, but don't commit:
C:\SVN\src-trunk-3\Debug\subversion\tests\cmdline\svn-test-work\working_copies\merge_tests-128>svn
merge ^^/A A_COPY --symmetric
DBG: merge.c:11188: base on source:
file:///C:/SVN/src-trunk-3/Debug/subversion/tests/cmdline/svn-test-work/repositories/merge_tests-128/A_at_1
DBG: merge.c:11190: base on target:
file:///C:/SVN/src-trunk-3/Debug/subversion/tests/cmdline/svn-test-work/repositories/merge_tests-128/A_at_1
DBG: merge.c:11303: yca
file:///C:/SVN/src-trunk-3/Debug/subversion/tests/cmdline/svn-test-work/repositories/merge_tests-128/A_at_1
DBG: merge.c:11304: base
file:///C:/SVN/src-trunk-3/Debug/subversion/tests/cmdline/svn-test-work/repositories/merge_tests-128/A_at_1
DBG: merge.c:11306: mid
file:///C:/SVN/src-trunk-3/Debug/subversion/tests/cmdline/svn-test-work/repositories/merge_tests-128/A_at_6
DBG: merge.c:11307: right
file:///C:/SVN/src-trunk-3/Debug/subversion/tests/cmdline/svn-test-work/repositories/merge_tests-128/A_at_6
--- Merging differences between repository URLs into 'A_COPY':
U A_COPY\B\E\beta
U A_COPY\D\G\rho
U A_COPY\D\H\psi
U A_COPY\D\H\omega
--- Recording mergeinfo for merge between repository URLs into 'A_COPY':
 U A_COPY

### No eligible revs:
C:\SVN\src-trunk-3\Debug\subversion\tests\cmdline\svn-test-work\working_copies\merge_tests-128>svn
mergeinfo --show-revs eligible ^^/A A_COPY

### Repeat merge:

C:\SVN\src-trunk-3\Debug\subversion\tests\cmdline\svn-test-work\working_copies\merge_tests-128>svn
merge ^^/A A_COPY --symmetric
This application has halted due to an unexpected error.
A crash report and minidump file were saved to disk, you can find them here:
C:\Users\pburba\AppData\Local\Temp\svn-crash-log20120328103841.log
C:\Users\pburba\AppData\Local\Temp\svn-crash-log20120328103841.dmp
Please send the log file to users_at_subversion.apache.org to help us analyze
and solve this problem.

NOTE: The crash report and minidump files can contain some sensitive information
(filenames, partial file content, usernames and passwords etc.)

C:\SVN\src-trunk-3\Debug\subversion\tests\cmdline\svn-test-work\working_copies\merge_tests-128>type
C:\Users\pburba\AppData\Local\Temp\svn-crash-log201203281038
41.log

Process info:
Cmd line: svn merge ^/A A_COPY --symmetric
Working Dir: C:\SVN\src-trunk-3\Debug\subversion\tests\cmdline\svn-test-work\working_copies\merge_tests-128
Version: 1.8.0-dev (under development), compiled Mar 27 2012, 09:24:20
Platform: Windows OS version 6.1 build 7601 Service Pack 1

Exception: ACCESS_VIOLATION

Registers:
eax=00b29120 ebx=7efde000 ecx=00b292d8 edx=00000000 esi=003af81c edi=003af7a4
eip=01563875 esp=003af748 ebp=003af7a4 efl=00010246
cs=0023 ss=002b ds=002b es=002b fs=0053 gs=002b

Stacktrace:
#1 0x01563875 in find_base_on_source(base_p=(repo_location_t **)
0x003af7ac, s_t=(source_and_target_t *) 0x00b28f08,
ctx=(svn_client_ctx_t *) 0x00af57a0, resul
t_pool=(apr_pool_t *) 0x00af50a0, scratch_pool=(apr_pool_t *)
0x00af50a0) at c:\svn\src-trunk-3\subversion\libsvn_client\merge.c:11098
        base_p = (repo_location_t **) 0x003af7ac
        s_t = (source_and_target_t *) 0x00b28f08
        ctx = (svn_client_ctx_t *) 0x00af57a0
        result_pool = (apr_pool_t *) 0x00af50a0
        scratch_pool = (apr_pool_t *) 0x00af50a0
        source = (merge_source_t) 0x003af764
        r = (svn_merge_range_t *) 0x00000000
   ^^^^^
### We try to dereference this at libsvn_client/merge.c:line 11098
###
### /* ### WRONG: need historical URL instead of s_t->source->url. */
### *base_p = repo_location_create(s_t->source->repos_root_url,
### s_t->source->repos_uuid,
### r->start, s_t->source->url, result_pool);

        loc1 = (repo_location_t) 0x003af774
        inherited = 0
        target_mergeinfo = (apr_hash_t *) 0x03be1538
        merge_target = (svn_client__merge_path_t *) 0x03be1140
#2 0x0156352d in find_symmetric_merge(yca_p=(repo_location_t **)
0x003af800, base_p=(repo_location_t **) 0x003af804,
mid_p=(repo_location_t **) 0x003af808, s_t
=(source_and_target_t *) 0x00b28f08, ctx=(svn_client_ctx_t *)
0x00af57a0, result_pool=(apr_pool_t *) 0x00af50a0,
scratch_pool=(apr_pool_t *) 0x00af50a0) at c:\s
vn\src-trunk-3\subversion\libsvn_client\merge.c:11183
        svn_err__temp = (svn_error_t *) 0xcccccccc
        yca_p = (repo_location_t **) 0x003af800
        base_p = (repo_location_t **) 0x003af804
        mid_p = (repo_location_t **) 0x003af808
        s_t = (source_and_target_t *) 0x00b28f08
        ctx = (svn_client_ctx_t *) 0x00af57a0
        result_pool = (apr_pool_t *) 0x00af50a0
        scratch_pool = (apr_pool_t *) 0x00af50a0
        base_on_source = (repo_location_t *) 0xcccccccc
        base_on_target = (repo_location_t *) 0xcccccccc
        mid = (repo_location_t *) 0xcccccccc
#3 0x01563243 in
svn_client__find_symmetric_merge(merge_p=(svn_client__symmetric_merge_t
**) 0x003af85c, source_path_or_url=0x00b284b8 "file:///C:/SVN/src-trun
k-3/Debug/subversion/tests/cmdline/svn-test-work/repositories/merge_tests-128/A",
source_revision=(svn_opt_revision_t *) 0x003af978,
target_wcpath=0x00b66ff0 "A
_COPY", allow_mixed_rev=0, allow_local_mods=1,
allow_switched_subtrees=1, ctx=(svn_client_ctx_t *) 0x00af57a0,
result_pool=(apr_pool_t *) 0x00af50a0, scratch_po
ol=(apr_pool_t *) 0x00af50a0) at
c:\svn\src-trunk-3\subversion\libsvn_client\merge.c:11244
        svn_err__temp = (svn_error_t *) 0xcccccccc
        merge_p = (svn_client__symmetric_merge_t **) 0x003af85c
        source_path_or_url = 0x00b284b8
"file:///C:/SVN/src-trunk-3/Debug/subversion/tests/cmdline/svn-test-work/repositories/merge_tests-128/A"
        source_revision = (svn_opt_revision_t *) 0x003af978
        target_wcpath = 0x00b66ff0 "A_COPY"
        allow_mixed_rev = 0
        allow_local_mods = 1
        allow_switched_subtrees = 1
        ctx = (svn_client_ctx_t *) 0x00af57a0
        result_pool = (apr_pool_t *) 0x00af50a0
        scratch_pool = (apr_pool_t *) 0x00af50a0
        merge = (svn_client__symmetric_merge_t *) 0x00b28d50
        s_t = (source_and_target_t *) 0x00b28f08
        target_abspath = 0x00b28ea0
"C:/SVN/src-trunk-3/Debug/subversion/tests/cmdline/svn-test-work/working_copies/merge_tests-128/A_COPY"
#4 0x013c6ec7 in symmetric_merge(source_path_or_url=0x00b284b8
"file:///C:/SVN/src-trunk-3/Debug/subversion/tests/cmdline/svn-test-work/repositories/merge_test
s-128/A", source_revision=(svn_opt_revision_t *) 0x003af978,
target_wcpath=0x00b66ff0 "A_COPY", depth=-2, ignore_ancestry=0,
force=0, record_only=0, dry_run=0,
allow_mixed_rev=0, allow_local_mods=1, allow_switched_subtrees=1,
merge_options=(apr_array_header_t *) 0x00000000, ctx=(svn_client_ctx_t
*) 0x00af57a0, scratch_
pool=(apr_pool_t *) 0x00af50a0) at
c:\svn\src-trunk-3\subversion\svn\merge-cmd.c:126
        svn_err__temp = (svn_error_t *) 0xcccccccc
        source_path_or_url = 0x00b284b8
"file:///C:/SVN/src-trunk-3/Debug/subversion/tests/cmdline/svn-test-work/repositories/merge_tests-128/A"
        source_revision = (svn_opt_revision_t *) 0x003af978
        target_wcpath = 0x00b66ff0 "A_COPY"
        depth = -2
        ignore_ancestry = 0
        force = 0
        record_only = 0
        dry_run = 0
        allow_mixed_rev = 0
        allow_local_mods = 1
        allow_switched_subtrees = 1
        merge_options = (apr_array_header_t *) 0x00000000
        ctx = (svn_client_ctx_t *) 0x00af57a0
        scratch_pool = (apr_pool_t *) 0x00af50a0
        merge = (svn_client__symmetric_merge_t *) 0xcccccccc
#5 0x013c638d in svn_cl__merge(os=(apr_getopt_t *) 0x00af5250,
baton=0x003afb60, pool=(apr_pool_t *) 0x00af50a0) at
c:\svn\src-trunk-3\subversion\svn\merge-cmd
.c:411
        allow_local_mods = 1
        allow_switched_subtrees = 1
        os = (apr_getopt_t *) 0x00af5250
        baton = 0x003afb60
        pool = (apr_pool_t *) 0x00af50a0
        targets = (apr_array_header_t *) 0x00b282d8
        sourcepath1 = 0x00b284b8
"file:///C:/SVN/src-trunk-3/Debug/subversion/tests/cmdline/svn-test-work/repositories/merge_tests-128/A"
        err = (svn_error_t *) 0xcccccccc
        two_sources_specified = 0
        ranges_to_merge = (apr_array_header_t *) 0x00af5230
        first_range_start = (svn_opt_revision_t) 0x003af9a8
        peg_revision2 = (svn_opt_revision_t) 0x003af960
        unspecified = (svn_opt_revision_t) 0x003af940
        ctx = (svn_client_ctx_t *) 0x00af57a0
        targetpath = 0x00b66ff0 "A_COPY"
        first_range_end = (svn_opt_revision_t) 0x003af990
        options = (apr_array_header_t *) 0x00000000
        sourcepath2 = 0x00b284b8
"file:///C:/SVN/src-trunk-3/Debug/subversion/tests/cmdline/svn-test-work/repositories/merge_tests-128/A"
        peg_revision1 = (svn_opt_revision_t) 0x003af978
        opt_state = (svn_cl__opt_state_t *) 0x003afb90
#6 0x013c49cc in main(argc=5, argv=0x00aedaf8) at
c:\svn\src-trunk-3\subversion\svn\main.c:2699
        argc = 5
        argv = 0x00aedaf8
        pool = (apr_pool_t *) 0x00af50a0
        os = (apr_getopt_t *) 0x00af5250
        err = (svn_error_t *) 0x00000000
        dash_m_arg = 0x00000000 "(null)"
        cfg_config = (svn_config_t *) 0x00b1ce20
        descend = 1
        use_notifier = 1
        ctx = (svn_client_ctx_t *) 0x00af57a0
        subcommand = (svn_opt_subcommand_desc2_t *) 0x017386a0
        ab = (svn_auth_baton_t *) 0x00b66c08
        opt_id = 317
        i = 1
        dash_F_arg = 0x00000000 "(null)"
        changelists = (apr_hash_t *) 0x00af51c0
        allocator = (apr_allocator_t *) 0x006afe98
        received_opts = (apr_array_header_t *) 0x00af50e0
        command_baton = (svn_cl__cmd_baton_t) 0x003afb60
        interactive_conflicts = 1
        opt_state = (svn_cl__opt_state_t) 0x003afb90
#7 0x01587578 in __tmainCRTStartup() at
f:\dd\vctools\crt_bld\self_x86\crt\src\crtexe.c:586
        lock_free = 0x00000000
        fiberid = 0x003b0000
        nested = 0
#8 0x015873bf in mainCRTStartup() at
f:\dd\vctools\crt_bld\self_x86\crt\src\crtexe.c:403
#9 0x768b339a in BaseThreadInitThunk()
#10 0x772a9ef2 in RtlInitializeExceptionChain()
#11 0x772a9ec5 in RtlInitializeExceptionChain()

Loaded modules:
0x01220000 C:\SVN\src-trunk-3\Debug\subversion\svn\svn.exe (1.8.0.0,
6934528 bytes)
0x77270000 C:\Windows\SysWOW64\ntdll.dll (6.1.7601.17725, 1572864 bytes)
0x768a0000 C:\Windows\SysWOW64\kernel32.dll (6.1.7601.17651, 1114112 bytes)
0x75a30000 C:\Windows\SysWOW64\KERNELBASE.dll (6.1.7601.17651, 286720 bytes)
0x6eec0000 C:\SVN\httpd-2.2.22\srclib\apr\Debug\libapr-1.dll
(1.4.6.0, 208896 bytes)
0x75de0000 C:\Windows\SysWOW64\ws2_32.dll (6.1.7601.17514, 217088 bytes)
0x765d0000 C:\Windows\SysWOW64\msvcrt.dll (7.0.7601.17744, 704512 bytes)
0x76130000 C:\Windows\SysWOW64\rpcrt4.dll (6.1.7601.17514, 983040 bytes)
0x74950000 C:\Windows\SysWOW64\sspicli.dll (6.1.7601.17725, 393216 bytes)
0x74940000 C:\Windows\SysWOW64\CRYPTBASE.dll (6.1.7600.16385, 49152 bytes)
0x75a10000 C:\Windows\SysWOW64\sechost.dll (6.1.7600.16385, 102400 bytes)
0x75780000 C:\Windows\SysWOW64\nsi.dll (6.1.7600.16385, 24576 bytes)
0x733f0000 C:\Windows\System32\mswsock.dll (6.1.7601.17514, 245760 bytes)
0x75e20000 C:\Windows\SysWOW64\user32.dll (6.1.7601.17514, 1048576 bytes)
0x76540000 C:\Windows\SysWOW64\gdi32.dll (6.1.7601.17514, 589824 bytes)
0x77240000 C:\Windows\SysWOW64\lpk.dll (6.1.7600.16385, 40960 bytes)
0x75970000 C:\Windows\SysWOW64\usp10.dll (1.626.7601.17514, 643072 bytes)
0x76690000 C:\Windows\SysWOW64\advapi32.dll (6.1.7601.17514, 655360 bytes)
0x74b30000 C:\Windows\SysWOW64\shell32.dll (6.1.7601.17755, 12886016 bytes)
0x749e0000 C:\Windows\SysWOW64\shlwapi.dll (6.1.7601.17514, 356352 bytes)
0x60500000 C:\Windows\winsxs\x86_microsoft.vc90.debugcrt_1fc8b3b9a1e18e3b_9.0.30729.6161_none_2a4f639a55563668\msvcr90d.dll
(9.0.30729.6161, 1191936 bytes)
0x6ee60000 C:\SVN\httpd-2.2.22\srclib\apr-util\Debug\libaprutil-1.dll
(1.4.1.0, 290816 bytes)
0x6ee50000 C:\SVN\httpd-2.2.22\srclib\apr-iconv\Debug\libapriconv-1.dll
(1.2.1.0, 45056 bytes)
0x72f30000 C:\Windows\System32\shfolder.dll (6.1.7600.16385, 20480 bytes)
0x763e0000 C:\Windows\SysWOW64\ole32.dll (6.1.7601.17514, 1425408 bytes)
0x75cc0000 C:\Windows\SysWOW64\crypt32.dll (6.1.7601.17514, 1167360 bytes)
0x76680000 C:\Windows\SysWOW64\msasn1.dll (6.1.7601.17514, 49152 bytes)
0x10000000 C:\SVN\openssl\out32dll\libeay32.dll (0.9.8.17, 1044480 bytes)
0x74450000 C:\Windows\System32\wsock32.dll (6.1.7600.16385, 28672 bytes)
0x71c00000 C:\Windows\winsxs\x86_microsoft.vc90.crt_1fc8b3b9a1e18e3b_9.0.30729.6161_none_50934f2ebcb7eb57\msvcr90.dll
(9.0.30729.6161, 667648 bytes)
0x003e0000 C:\SVN\openssl\out32dll\ssleay32.dll (0.9.8.17, 221184 bytes)
0x00430000 C:\SVN\bdb\bin\libdb48d.dll (4.0.8.30, 1904640 bytes)
0x60820000 C:\Windows\winsxs\x86_microsoft.vc90.debugcrt_1fc8b3b9a1e18e3b_9.0.30729.6161_none_2a4f639a55563668\msvcp90d.dll
(9.0.30729.6161, 880640 bytes)
0x75900000 C:\Windows\System32\imm32.dll (6.1.7601.17514, 393216 bytes)
0x76730000 C:\Windows\SysWOW64\msctf.dll (6.1.7600.16385, 835584 bytes)
0x74170000 C:\Windows\System32\profapi.dll (6.1.7600.16385, 45056 bytes)
0x742b0000 C:\Windows\System32\dbghelp.dll (6.1.7601.17514, 962560 bytes)
0x74280000 C:\Windows\System32\powrprof.dll (6.1.7600.16385, 151552 bytes)
0x75f50000 C:\Windows\SysWOW64\setupapi.dll (6.1.7601.17514, 1691648 bytes)
0x75f20000 C:\Windows\SysWOW64\cfgmgr32.dll (6.1.7601.17621, 159744 bytes)
0x74a40000 C:\Windows\SysWOW64\oleaut32.dll (6.1.7601.17676, 585728 bytes)
0x76880000 C:\Windows\SysWOW64\devobj.dll (6.1.7601.17621, 73728 bytes)

Paul
Received on 2012-03-28 16:47:29 CEST

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