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

Trac bug #2560

From: Albert Chin <subversion-dev_at_mlists.thewrittenword.com>
Date: 2006-06-05 23:09:05 CEST

I'm trying to determine the cause of Trac bug #2560:

I'm testing on Solaris 8/SPARC with subversion-1.2.3, apr-0.9.11,
apr-util-0.9.11, and python-2.4.2.

Basically, svn_repos_find_root_path() is returning NULL on Solaris
under certain conditions. I've done some debugging and found that
svn_repos_find_root_path() in subversion/libsvn_repos/repos.c calls
svn_utf_cstring_from_utf8() which returns the error:
  Can't create a character converter from 'UTF-8' to native encoding
in err->message. Because of this error, the remaining code in
svn_repos_find_root_path() is always called:
  while (1)
      err = svn_utf_cstring_from_utf8 (&decoded, candidate, pool);
            ^^^^^^^^^^^^^^^^^^^^^^^^^ FAILS
      if (!err && check_repos_path (candidate, pool))
      svn_error_clear (err);
      if (candidate[0] == '\0' || strcmp(candidate, "/") == 0)
        return NULL;
      candidate = svn_path_dirname (candidate, pool);

The value of candidate through the while loop is thus:
  candidate: /var/svn/test
  candidate: /var/svn
  candidate: /var
  candidate: /
And, the:
      if (candidate[0] == '\0' || strcmp(candidate, "/") == 0)
        return NULL;
succeeds giving us a NULL svn_repos_find_root_path() return value.

It seems svn_utf_cstring_from_utf8() eventually calls apr_xlate_open()
which generates the error. apr-util-0.9.11 is built against
libiconv-1.9.2 and apr_xlate_open() is calling libiconv_open().

What's odd is that I wrote a simple test program to try and duplicate
this error but the test program succeeds:

  import sys

  from svn import repos
  from trac.versioncontrol.svn_fs import Pool

  path = '/var/svn/test'
  pool = Pool()

  if not repos.svn_repos_find_root_path (path, pool()):
    sys.exit (1)
  if not repos.svn_repos_open (path, pool()):
    sys.exit (1)

Should I bug the APR folks?

albert chin (china@thewrittenword.com)
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Mon Jun 5 23:09:32 2006

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