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

Re: SVN_ERR_ASSERT with reintegrate

From: Julian Foad <julianfoad_at_btopenworld.com>
Date: Tue, 27 Mar 2012 11:06:40 +0100 (BST)

Stefan Küng <tortoisesvn_at_gmail.com> wrote:

> There's an SVN_ERR_ASSERT when reintegrating. From the crash statistics I
> get this happens quite often. The stack trace:
> libsvn_tsvn!svn_ra_get_location_segments+0x12
> libsvn_tsvn!svn_client__repos_location_segments+0x9f
> libsvn_tsvn!svn_client_merge4+0xff8
> libsvn_tsvn!svn_client_merge4+0x172e
> libsvn_tsvn!svn_client_merge_reintegrate+0x113
> tortoiseproc!SVN::MergeReintegrate+0x12c
> in ra_loader.c, function svn_ra_get_location_segments() the
>   SVN_ERR_ASSERT(*path != '/');
> is hit.

Hi Stefan.  Thanks for that.  I'll take a look.

> the crash dumps I got (8 of them as of now) are not very clear: I'm not sure
> if it's the assert that's triggered or whether 'path' is
> actually NULL. Because the crash dump result in:
> 0xC0000005: Access violation reading location 0x0000000000000000.

That pretty much guarantees that 'path' was NULL, I would say.

> From looking at the code I think this would happen if someone tries to merge
> from or to a repo root. So instead of asserting or segfaulting, maybe returning
> an error like "you can't merge from/to a repo root" or something
> like that would be much better.

Yup.  In trunk there is such a check in find_reintegrate_merge:

  /* Can't reintegrate to or from the root of the repository. */
  if (strcmp(source_loc->url, source_loc->repo->url) == 0
      || strcmp(target->loc.url, target->loc.repo->url) == 0)
    return svn_error_createf(SVN_ERR_CLIENT_NOT_READY_TO_MERGE, NULL,
                             _("Neither the reintegrate source nor target "
                               "can be the root of the repository"));

This was added in r877459 - pburba 20-Apr-2009:
  Return an error if attempting to reintegrate from/to the repository root.

  * subversion/libsvn_client/merge.c
    (svn_client_merge_reintegrate): Error out as soon as an attempt is made to
    reintegrate to or from the repository root rather than attempting this
    and getting a cryptic assertion, see

Merged to 1.6.x in r877630 | hwright | 2009-05-04.

First included in release 1.6.10.

Maybe this is not in the version that these users are running.

What version(s) of Subversion libraries are these crashes in?

- Julian
Received on 2012-03-27 12:07:16 CEST

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