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

Re: crash when commiting

From: Stefan Küng <tortoisesvn_at_gmail.com>
Date: Fri, 09 Mar 2012 23:04:28 +0100

On 09.03.2012 20:06, Philip Martin wrote:
> Stefan Küng<tortoisesvn_at_gmail.com> writes:
>
>> I'm going through some crash reports sent for TSVN and I found a crash
>> that happens when committing, and the wc has some incomplete entries:
>>
>> libsvn_wc/node.c, svn_wc__internal_get_origin().
>>
>> SVN_ERR(svn_wc__db_scan_addition(&status,&op_root_abspath, NULL,
>> NULL, NULL,&original_repos_relpath,
>> repos_root_url,
>> repos_uuid, revision, NULL, NULL,
>> db, local_abspath,
>> result_pool, scratch_pool));
>>
>> if (status == svn_wc__db_status_added)
>> {
>> if (is_copy)
>> *is_copy = FALSE;
>> return SVN_NO_ERROR; /* Local addition */
>> }
>>
>> *repos_relpath = svn_relpath_join(
>> original_repos_relpath,
>> svn_dirent_skip_ancestor(op_root_abspath,
>> local_abspath),
>> result_pool);
>>
>>
>> when the status is svn_wc__db_status_incomplete, the
>> original_repos_relpath can be NULL, and then the svn_relpath_join()
>> crashes because of a null-pointer access.
>
> scan_addition implies the node must be added, and for that to be
> incomplete it must be the result of an interrupted wc-to-wc copy.
>
> $ svn st wc
> A + wc/X
> ! wc/X/B/C
> ! wc/X/B/f
>
> In that state a simple commit doesn't trigger a bug, but then it doesn't
> call svn_wc__internal_get_origin either. I see commit_util.c has calls
> to svn_wc__node_get_orig, which calls svn_wc__internal_get_origin, so I
> suppose that must be how it gets called, but I don't know what sort of
> commit to run to see the bug. How does TortoiseSVN commit such a tree?

I don't know how the user started the commit. There's not enough
information available from the crash dump. But here's the stack trace,
maybe this will help?

> libsvn_tsvn.dll!svn_relpath_join(const char *
base=0x000000000641edc0, const char * component=0x000000000641eca0,
apr_pool_t * pool=0x000000000641ec48) Line 1158 + 0xf bytes C
          libsvn_tsvn.dll!svn_wc__internal_get_origin(int *
is_copy=0x0000000005571b60, long * revision=0x0000000005571ae8, const
char * * repos_relpath=0x0000000000000008, const char * *
repos_root_url=0x0000000001dc4301, const char * *
repos_uuid=0x0000000000000000, const char * *
copy_root_abspath=0x000000000641edd0, svn_wc__db_t *
db=0x0000000001dc4490, const char * local_abspath=0x00000000055720d8,
int scan_deleted=0, apr_pool_t * result_pool=0x0000000005571ae8,
apr_pool_t * scratch_pool=0x0000000005571ae8) Line 1414 + 0x1c bytes C
          libsvn_tsvn.dll!svn_wc__node_get_origin(int *
is_copy=0x0000000005571b60, long * revision=0x0000000005571ae8, const
char * * repos_relpath=0x0000000000000a28, const char * *
repos_root_url=0x0000000005571b60, const char * *
repos_uuid=0x0000000000000000, const char * *
copy_root_abspath=0x000000000641edd0, svn_wc_context_t *
wc_ctx=0x0000000001dc4478, const char *
local_abspath=0x00000000055720d8, int scan_deleted=0, apr_pool_t *
result_pool=0x0000000005571ae8, apr_pool_t *
scratch_pool=0x0000000005571ae8) Line 1453 C
          libsvn_tsvn.dll!harvest_committables(svn_wc_context_t *
wc_ctx=0x0000000001dc4478, const char *
local_abspath=0x0000000005571b60, svn_client__committables_t *
committables=0x00000000055800b8, apr_hash_t *
lock_tokens=0x0000000005580258, const char *
repos_root_url=0x0000000001db7370, const char *
commit_relpath=0x0000000000000000, int copy_mode_root=0, svn_depth_t
depth=svn_depth_infinity, int just_locked=1, apr_hash_t *
changelists=0x0000000000000000, int skip_files=0, int skip_dirs=0,
apr_hash_t * danglers=0x0000000001de24b0, svn_error_t * (void *,
svn_node_kind_t *, const char *, long, apr_pool_t *)*
check_url_func=0x000007fef1d36e60, void *
check_url_baton=0x000000000641f0d0, svn_error_t * (void *)*
cancel_func=0x000000013f1b1f74, void * cancel_baton=0x000000000026e4a0,
void (void *, const svn_wc_notify_t *, apr_pool_t *)*
notify_func=0x000000013f1b1c18, void * notify_baton=0x000000000026e4a0,
apr_pool_t * result_pool=0x0000000001dd63d8, apr_pool_t *
scratch_pool=0x0000000005571ae8) Line 825 + 0x41 bytes C
 
libsvn_tsvn.dll!svn_client__harvest_committables(svn_client__committables_t
* * committables=0x0000000001dd63d8, apr_hash_t * *
lock_tokens=0x000000000641f068, const char *
base_dir_abspath=0x0000000001dd6478, const apr_array_header_t *
targets=0x0000000005580000, svn_depth_t depth=svn_depth_infinity, int
just_locked=1, const apr_array_header_t *
changelists=0x0000000001dd6450, svn_error_t * (void *, svn_node_kind_t
*, const char *, long, apr_pool_t *)* check_url_func=0x000007fef1d36e60,
void * check_url_baton=0x000000000641f0d0, svn_client_ctx_t *
ctx=0x0000000000000002, apr_pool_t * result_pool=0x0000000001dd63d8,
apr_pool_t * scratch_pool=0x0000000001de2438) Line 1146 + 0xcd bytes C
          libsvn_tsvn.dll!svn_client_commit5(const apr_array_header_t *
targets=0x0000000001dd6450, svn_depth_t depth=svn_depth_infinity, int
keep_locks=0, int keep_changelists=0, int commit_as_operations=1, const
apr_array_header_t * changelists=0x0000000001dd6450, const apr_hash_t *
revprop_table=0x0000000000000000, svn_error_t * (const svn_commit_info_t
*, void *, apr_pool_t *)* commit_callback=0x000000013f1b4f88, void *
commit_baton=0x000000000026e4a0, svn_client_ctx_t *
ctx=0x0000000001dc43c0, apr_pool_t * pool=0x0000000001dd63d8) Line 1310 C

-- 
        ___
   oo  // \\      "De Chelonian Mobile"
  (_,\/ \_/ \     TortoiseSVN
    \ \_/_\_/>    The coolest Interface to (Sub)Version Control
    /_/   \_\     http://tortoisesvn.net
Received on 2012-03-09 23:05:09 CET

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