Subversion returns invalid XML when log message contains non-UTF8 characters in the repository

Bug #312043 reported by cha0s
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Bazaar Subversion Plugin
Invalid
Medium
Unassigned
subversion
Confirmed
Medium
subvertpy
Invalid
Low
Jelmer Vernooij

Bug Description

Trying to import the FreeBASIC svn repository into a bazaar branch results in an exception. Here's the trace...

$ bzr branch https://fbc.svn.sourceforge.net/svnroot/fbc/trunk/FreeBASIC fbc-bzr
bzr: ERROR: bzrlib.plugins.svn.core.SubversionException: ("REPORT of '/svnroot/fbc/!svn/bc/5195': 200 OK (https://fbc.svn.sourceforge.net)", 175002)

Traceback (most recent call last):
  File "/usr/lib/python2.5/site-packages/bzrlib/commands.py", line 857, in run_bzr_catch_errors
    return run_bzr(argv)
  File "/usr/lib/python2.5/site-packages/bzrlib/commands.py", line 797, in run_bzr
    ret = run(*run_argv)
  File "/usr/lib/python2.5/site-packages/bzrlib/commands.py", line 499, in run_argv_aliases
    return self.run(**all_cmd_args)
  File "/usr/lib/python2.5/site-packages/bzrlib/builtins.py", line 840, in run
    from_location)
  File "/usr/lib/python2.5/site-packages/bzrlib/bzrdir.py", line 879, in open_tree_or_branch
    return bzrdir._get_tree_branch()
  File "/usr/lib/python2.5/site-packages/bzrlib/bzrdir.py", line 864, in _get_tree_branch
    branch = self.open_branch()
  File "/usr/lib/python2.5/site-packages/bzrlib/plugins/svn/remote.py", line 176, in open_branch
    branch = SvnBranch(repos, self.branch_path)
  File "/usr/lib/python2.5/site-packages/bzrlib/plugins/svn/branch.py", line 71, in __init__
    self.mapping = self.repository.get_mapping()
  File "/usr/lib/python2.5/site-packages/bzrlib/plugins/svn/repository.py", line 328, in get_mapping
    self._default_mapping = get_default_mapping().from_repository(self, self._hinted_branch_path)
  File "/usr/lib/python2.5/site-packages/bzrlib/plugins/svn/mapping3/__init__.py", line 249, in from_repository
    (guessed_scheme, actual_scheme) = repository_guess_scheme(repository, last_revnum, _hinted_branch_path)
  File "/usr/lib/python2.5/site-packages/bzrlib/plugins/svn/mapping3/__init__.py", line 196, in repository_guess_scheme
    repository._log.iter_changes(None, last_revnum, max(0, last_revnum-SCHEME_GUESS_SAMPLE_SIZE), pb=pb), last_revnum, branch_path)
  File "/usr/lib/python2.5/site-packages/bzrlib/plugins/svn/mapping3/scheme.py", line 488, in guess_scheme_from_history
    for (revpaths, revnum, revprops) in changed_paths:
  File "/usr/lib/python2.5/site-packages/bzrlib/plugins/svn/logwalker.py", line 310, in iter_changes
    self.fetch_revisions(max(from_revnum, to_revnum), pb=pb)
  File "/usr/lib/python2.5/site-packages/bzrlib/plugins/svn/logwalker.py", line 468, in fetch_revisions
    self.actual._transport.get_log(rcvr, [""], self.saved_revnum, to_revnum, 0, True, True, False, todo_revprops)
  File "/usr/lib/python2.5/site-packages/bzrlib/plugins/svn/transport.py", line 341, in get_log
    revprops)
SubversionException: ("REPORT of '/svnroot/fbc/!svn/bc/5195': 200 OK (https://fbc.svn.sourceforge.net)", 175002)

bzr 1.6.1 on python 2.5.2 (linux2)
arguments: ['/usr/bin/bzr', 'branch', 'https://fbc.svn.sourceforge.net/svnroot/fbc/trunk/FreeBASIC', 'fbc-bzr']
encoding: 'UTF-8', fsenc: 'UTF-8', lang: 'en_US.UTF-8'
plugins:
  avahi /usr/lib/python2.5/site-packages/bzrlib/plugins/avahi [0.3.0dev0]
  bzrtools /usr/lib/python2.5/site-packages/bzrlib/plugins/bzrtools [1.6.0]
  dbus /usr/lib/python2.5/site-packages/bzrlib/plugins/dbus [unknown]
  gtk /usr/lib/python2.5/site-packages/bzrlib/plugins/gtk [0.95.0]
  launchpad /usr/lib/python2.5/site-packages/bzrlib/plugins/launchpad [unknown]
  qbzr /usr/lib/python2.5/site-packages/bzrlib/plugins/qbzr [0.9.2]
  rebase /usr/lib/python2.5/site-packages/bzrlib/plugins/rebase [0.3.0]
  svn /usr/lib/python2.5/site-packages/bzrlib/plugins/svn [0.4.13]
*** Bazaar has encountered an internal error.
    Please report a bug at https://bugs.launchpad.net/bzr/+filebug
    including this traceback, and a description of what you
    were doing when the error occurred.

Revision history for this message
Marc Liberatore (liberato) wrote :

I get a similar error when trying to branch another sourceforge repository:

bzr branch https://[...].svn.sourceforge.net/svnroot/[...]
Initialising Subversion metadata cache in /Users/liberato/.bazaar/svn-cache/f09b4d75-de0e-0410-b1fd-fcac8770fd67
bzr: ERROR: bzrlib.plugins.svn.core.SubversionException: ("REPORT request failed on '/svnroot/[...]/!svn/vcc/default'", 175002)

Traceback (most recent call last):
  File "/Library/Python/2.5/site-packages/bzrlib/commands.py", line 893, in run_bzr_catch_errors
    return run_bzr(argv)
  File "/Library/Python/2.5/site-packages/bzrlib/commands.py", line 839, in run_bzr
    ret = run(*run_argv)
  File "/Library/Python/2.5/site-packages/bzrlib/commands.py", line 539, in run_argv_aliases
    return self.run(**all_cmd_args)
  File "/Library/Python/2.5/site-packages/bzrlib/builtins.py", line 981, in run
    source_branch=br_from)
  File "/Library/Python/2.5/site-packages/bzrlib/plugins/svn/remote.py", line 64, in sprout
    return super(SvnRemoteAccess, self).sprout(*args, **kwargs)
  File "/Library/Python/2.5/site-packages/bzrlib/bzrdir.py", line 1117, in sprout
    result_repo.fetch(source_repository, revision_id=revision_id)
  File "/Library/Python/2.5/site-packages/bzrlib/repository.py", line 1021, in fetch
    find_ghosts=find_ghosts)
  File "/Library/Python/2.5/site-packages/bzrlib/plugins/svn/fetch.py", line 833, in fetch
    self._fetch_switch(self.source.transport.get_svn_repos_root(), needed, pb)
  File "/Library/Python/2.5/site-packages/bzrlib/plugins/svn/fetch.py", line 778, in _fetch_switch
    report_inventory_contents(reporter, parent_inv, parent_revnum, start_empty)
  File "/Library/Python/2.5/site-packages/bzrlib/plugins/svn/fetch.py", line 602, in report_inventory_contents
    reporter.finish()
SubversionException: ("REPORT request failed on '/svnroot/[...]/!svn/vcc/default'", 175002)

bzr 1.10 on python 2.5.1 (darwin)
arguments: ['/usr/local/bin/bzr', 'branch', 'https://[...].svn.sourceforge.net/svnroot/[...]']
encoding: 'UTF-8', fsenc: 'utf-8', lang: 'en_US.UTF-8'
plugins:
  bzrtools /Library/Python/2.5/site-packages/bzrlib/plugins/bzrtools [1.10]
  email /Library/Python/2.5/site-packages/bzrlib/plugins/email [unknown]
  extmerge /Library/Python/2.5/site-packages/bzrlib/plugins/extmerge [unknown]
  launchpad /Library/Python/2.5/site-packages/bzrlib/plugins/launchpad [unknown]
  loom /Library/Python/2.5/site-packages/bzrlib/plugins/loom [1.4dev]
  qbzr /Library/Python/2.5/site-packages/bzrlib/plugins/qbzr [0.9.5]
  rebase /Library/Python/2.5/site-packages/bzrlib/plugins/rebase [0.4dev]
  search /Library/Python/2.5/site-packages/bzrlib/plugins/search [1.7dev]
  svn /Library/Python/2.5/site-packages/bzrlib/plugins/svn [0.4.16]
  upload /Library/Python/2.5/site-packages/bzrlib/plugins/upload [0.1.1]
*** Bazaar has encountered an internal error.
    Please report a bug at https://bugs.launchpad.net/bzr/+filebug
    including this traceback, and a description of what you
    were doing when the error occurred.

Revision history for this message
Jelmer Vernooij (jelmer) wrote :

This appears to be a bug in the subversion client libraries. In particular, revision 748 seems to cause them to fail. To reproduce without bzr-svn:

$ svn log -v -r748 https://fbc.svn.sourceforge.net/svnroot/fbc

Changed in bzr-svn:
importance: Undecided → Medium
status: New → Triaged
Jelmer Vernooij (jelmer)
Changed in subvertpy:
assignee: nobody → jelmer
importance: Undecided → Low
status: New → Triaged
Revision history for this message
Jelmer Vernooij (jelmer) wrote :

leaving this bug open in subvertpy and subversion

Changed in bzr-svn:
status: Triaged → Invalid
Revision history for this message
Jelmer Vernooij (jelmer) wrote :
Revision history for this message
Jelmer Vernooij (jelmer) wrote :

The only unusual thing I can see in the log is the fact that the XML file contains a 0x2f character. perhaps this is making libneon barf?

Revision history for this message
Jelmer Vernooij (jelmer) wrote :

with libneon I get a different error:

svn: XML parsing failed: (411 Length Required)

Revision history for this message
Jelmer Vernooij (jelmer) wrote :
Jelmer Vernooij (jelmer)
Changed in subversion:
importance: Undecided → Unknown
status: New → Unknown
Changed in subversion:
status: Unknown → Confirmed
Revision history for this message
Jelmer Vernooij (jelmer) wrote :

these bugs exist entirely within subversion so closing subvertpy task

Changed in subvertpy:
status: Triaged → Invalid
Max Bowsher (maxb)
summary: - Error when importing SVN repository
+ Subversion returns invalid XML when log message contains non-UTF8
+ characters in the repository
Changed in subversion:
importance: Unknown → Medium
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.