"AssertionError: base checksum mismatch" with svn-import

Bug #336467 reported by Forest Bond
This bug report is a duplicate of:  Bug #480102: assert len(tview) == tview_len. Edit Remove
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Bazaar Subversion Plugin
Triaged
Low
Jelmer Vernooij

Bug Description

$ bzr svn-import --layout trunk --verbose file:///home/forest.bond/www .
Using repository layout: trunk0
Upgrade to Subversion 1.5 or higher for faster retrieving of revision properties.
bzr: ERROR: exceptions.AssertionError: base checksum mismatch: '2d5c2c8ce179bd24a696676890af367b' != '5d43b775c320bea1a509debdc5431eef'

Traceback (most recent call last):
  File "/usr/lib/python2.5/site-packages/bzrlib/commands.py", line 896, in run_bzr_catch_errors
    return run_bzr(argv)
  File "/usr/lib/python2.5/site-packages/bzrlib/commands.py", line 842, in run_bzr
    ret = run(*run_argv)
  File "/usr/lib/python2.5/site-packages/bzrlib/commands.py", line 542, in run_argv_aliases
    return self.run(**all_cmd_args)
  File "/usr/lib/python2.5/site-packages/bzrlib/commands.py", line 856, in ignore_pipe
    result = func(*args, **kwargs)
  File "/usr/lib/python2.5/site-packages/bzrlib/plugins/svn/commands.py", line 157, in run
    to_revnum=to_revnum, prefix=prefix)
  File "/usr/lib/python2.5/site-packages/bzrlib/plugins/svn/convert.py", line 263, in convert_repository
    inter.fetch(needed=revmetas)
  File "/usr/lib/python2.5/site-packages/bzrlib/plugins/svn/fetch.py", line 1089, in fetch
    self._fetch_revisions(needed, pb, use_replay=use_replay)
  File "/usr/lib/python2.5/site-packages/bzrlib/plugins/svn/fetch.py", line 1026, in _fetch_revisions
    parent_revmeta)
  File "/usr/lib/python2.5/site-packages/bzrlib/plugins/svn/fetch.py", line 982, in _fetch_revision_switch
    report_inventory_contents(reporter, parent_revnum, start_empty)
  File "/usr/lib/python2.5/site-packages/bzrlib/plugins/svn/errors.py", line 127, in convert
    return unbound(*args, **kwargs)
  File "/usr/lib/python2.5/site-packages/bzrlib/plugins/svn/fetch.py", line 811, in report_inventory_contents
    reporter.finish()
  File "/usr/lib/python2.5/site-packages/bzrlib/plugins/svn/fetch.py", line 306, in apply_textdelta
    return self._apply_textdelta(base_checksum)
  File "/usr/lib/python2.5/site-packages/bzrlib/plugins/svn/fetch.py", line 491, in _apply_textdelta
    actual_checksum)
AssertionError: base checksum mismatch: '2d5c2c8ce179bd24a696676890af367b' != '5d43b775c320bea1a509debdc5431eef'

bzr 1.12 on python 2.5.2 (linux2)
arguments: ['/usr/bin/bzr', 'svn-import', '--layout', 'trunk', '--verbose', 'file:///home/forest.bond/www', '.']
encoding: 'UTF-8', fsenc: 'UTF-8', lang: 'en_US.UTF-8'
plugins:
  builddeb /usr/lib/python2.5/site-packages/bzrlib/plugins/builddeb [0.92dev]
  bzrtools /usr/lib/python2.5/site-packages/bzrlib/plugins/bzrtools [1.12]
  interactive /home/forest.bond/.bazaar/plugins/interactive [1.2]
  launchpad /usr/lib/python2.5/site-packages/bzrlib/plugins/launchpad [unknown]
  loom /home/forest.bond/.bazaar/plugins/loom [1.3]
  netrc_credential_store /usr/lib/python2.5/site-packages/bzrlib/plugins/netrc_credential_store [unknown]
  rebase /usr/lib/python2.5/site-packages/bzrlib/plugins/rebase [0.3]
  svn /usr/lib/python2.5/site-packages/bzrlib/plugins/svn [0.5.2]
*** 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.

FWIW, I can branch trunk from this repository.

Revision history for this message
Jelmer Vernooij (jelmer) wrote : Re: [Bug 336467] [NEW] "AssertionError: base checksum mismatch" with svn-import

Is this repository public?

If you don't have a lot of branches in this repository, is there any
individual branch with which you can reproduce this problem using "bzr
branch ..." ?
--
Jelmer Vernooij <email address hidden> - http://samba.org/~jelmer/
Jabber: <email address hidden>

Revision history for this message
Forest Bond (forest-bond) wrote :
Download full text (4.2 KiB)

Hi,

On Mon, Mar 02, 2009 at 02:41:18AM -0000, Jelmer Vernooij wrote:
> Is this repository public?

No, it's not. I could probably arrange access via SSH, if that would be
helpful.

> If you don't have a lot of branches in this repository, is there any
> individual branch with which you can reproduce this problem using "bzr
> branch ..." ?

I can produce a similar problem on the "stable" branch:

--------------------------------------------------------------------------------
$ bzr branch 'http://svn.local.network/www/branches/stable'
Upgrade to Subversion 1.5 or higher for faster retrieving of revision properties.
bzr: ERROR: exceptions.AssertionError:

Traceback (most recent call last):
  File "/usr/lib/python2.5/site-packages/bzrlib/commands.py", line 896, in run_bzr_catch_errors
    return run_bzr(argv)
  File "/usr/lib/python2.5/site-packages/bzrlib/commands.py", line 842, in run_bzr
    ret = run(*run_argv)
  File "/usr/lib/python2.5/site-packages/bzrlib/commands.py", line 542, in run_argv_aliases
    return self.run(**all_cmd_args)
  File "/usr/lib/python2.5/site-packages/bzrlib/builtins.py", line 1045, in run
    source_branch=br_from)
  File "/usr/lib/python2.5/site-packages/bzrlib/plugins/svn/remote.py", line 66, in sprout
    return super(SvnRemoteAccess, self).sprout(*args, **kwargs)
  File "/usr/lib/python2.5/site-packages/bzrlib/bzrdir.py", line 1116, in sprout
    result_repo.fetch(source_repository, revision_id=revision_id)
  File "/usr/lib/python2.5/site-packages/bzrlib/repository.py", line 1118, in fetch
    find_ghosts=find_ghosts)
  File "/usr/lib/python2.5/site-packages/bzrlib/plugins/svn/fetch.py", line 1089, in fetch
    self._fetch_revisions(needed, pb, use_replay=use_replay)
  File "/usr/lib/python2.5/site-packages/bzrlib/plugins/svn/fetch.py", line 1026, in _fetch_revisions
    parent_revmeta)
  File "/usr/lib/python2.5/site-packages/bzrlib/plugins/svn/fetch.py", line 982, in _fetch_revision_switch
    report_inventory_contents(reporter, parent_revnum, start_empty)
  File "/usr/lib/python2.5/site-packages/bzrlib/plugins/svn/errors.py", line 127, in convert
    return unbound(*args, **kwargs)
  File "/usr/lib/python2.5/site-packages/bzrlib/plugins/svn/fetch.py", line 811, in report_inventory_contents
    reporter.finish()
  File "/usr/lib/python2.5/site-packages/subvertpy/delta.py", line 35, in apply_window
    assert len(tview) == tview_len
AssertionError

bzr 1.12 on python 2.5.2 (linux2)
arguments: ['/usr/bin/bzr', 'branch', 'http://svn.local.network/www/branches/stable']
encoding: 'UTF-8', fsenc: 'UTF-8', lang: 'en_US.UTF-8'
plugins:
  builddeb /usr/lib/python2.5/site-packages/bzrlib/plugins/builddeb [0.92dev]
  bzrtools /usr/lib/python2.5/site-packages/bzrlib/plugins/bzrtools [1.12]
  interactive /home/forest.bond/.bazaar/plugins/interactive [1.2]
  launchpad /usr/lib/python2.5/site-packages/bzrlib/plugins/launchpad [unknown]
  loom /home/forest.bond/.bazaar/plugins/loom [1.3]
  netrc_credential_store /usr/lib/python2.5/site-packages/bzrlib/plugins/netrc_credential_store [unknown]
  rebase /usr/lib/python2.5/site-packages/bzrlib/plugins/re...

Read more...

Revision history for this message
Jelmer Vernooij (jelmer) wrote : Re: [Bug 336467] [NEW] "AssertionError: base checksum mismatch" with svn-import

Yes, this might be related. It still isn't a good excuse for bzr-svn to
fail like this of course :-)

I'll see if I can add some clearer error message here, so we can figure
out what's going wrong.
--
Jelmer Vernooij <email address hidden> - http://samba.org/~jelmer/
Jabber: <email address hidden>

Revision history for this message
Forest Bond (forest-bond) wrote :
Download full text (7.6 KiB)

FWIW, another data point.

I dumped the svn repository and filtered out all of the bzr: directory properties. This did not get me much further. I suspect that modifying the directory properties modifies some revision hashes that my script doesn't recalculate, causing these errors:

[~/bzr]
21:37 forest.bond@W022$ bzr svn-import --layout=trunk --verbose file:///home/forest.bond/www.new .
Using repository layout: trunk0
Upgrade to Subversion 1.5 or higher for faster retrieving of revision properties.
bzr: ERROR: bzrlib.errors.NoSuchRevision: KnitPackRepository('file:///home/forest.bond/bzr/.bzr/repository/') has no revision ('svn-v4:ef02356d-2710-0410-9611-885290dfa314:trunk:3078',)

Traceback (most recent call last):
  File "/usr/lib/python2.5/site-packages/bzrlib/commands.py", line 896, in run_bzr_catch_errors
    return run_bzr(argv)
  File "/usr/lib/python2.5/site-packages/bzrlib/commands.py", line 842, in run_bzr
    ret = run(*run_argv)
  File "/usr/lib/python2.5/site-packages/bzrlib/commands.py", line 542, in run_argv_aliases
    return self.run(**all_cmd_args)
  File "/usr/lib/python2.5/site-packages/bzrlib/commands.py", line 856, in ignore_pipe
    result = func(*args, **kwargs)
  File "/usr/lib/python2.5/site-packages/bzrlib/plugins/svn/commands.py", line 157, in run
    to_revnum=to_revnum, prefix=prefix)
  File "/usr/lib/python2.5/site-packages/bzrlib/plugins/svn/convert.py", line 263, in convert_repository
    inter.fetch(needed=revmetas)
  File "/usr/lib/python2.5/site-packages/bzrlib/plugins/svn/fetch.py", line 1089, in fetch
    self._fetch_revisions(needed, pb, use_replay=use_replay)
  File "/usr/lib/python2.5/site-packages/bzrlib/plugins/svn/fetch.py", line 1019, in _fetch_revisions
    editor = self._get_editor(revmeta, mapping)
  File "/usr/lib/python2.5/site-packages/bzrlib/plugins/svn/fetch.py", line 958, in _get_editor
    self._get_inventory(revmeta.get_lhs_parent_revid(mapping)),
  File "/usr/lib/python2.5/site-packages/bzrlib/plugins/svn/fetch.py", line 952, in _get_inventory
    return self.target.get_inventory(revid)
  File "/usr/lib/python2.5/site-packages/bzrlib/decorators.py", line 138, in read_locked
    result = unbound(self, *args, **kwargs)
  File "/usr/lib/python2.5/site-packages/bzrlib/repository.py", line 1663, in get_inventory
    return self.iter_inventories([revision_id]).next()
  File "/usr/lib/python2.5/site-packages/bzrlib/repository.py", line 1681, in _iter_inventories
    for text, revision_id in self._iter_inventory_xmls(revision_ids):
  File "/usr/lib/python2.5/site-packages/bzrlib/repository.py", line 1692, in _iter_inventory_xmls
    raise errors.NoSuchRevision(self, record.key)
NoSuchRevision: KnitPackRepository('file:///home/forest.bond/bzr/.bzr/repository/') has no revision ('svn-v4:ef02356d-2710-0410-9611-885290dfa314:trunk:3078',)

bzr 1.12 on python 2.5.2 (linux2)
arguments: ['/usr/bin/bzr', 'svn-import', '--layout=trunk', '--verbose', 'file:///home/forest.bond/www.new', '.']
encoding: 'UTF-8', fsenc: 'UTF-8', lang: 'en_US.UTF-8'
plugins:
  builddeb /usr/lib/python2.5/site-packages/bzrlib/plugins/builddeb [0.92dev]
  bzrtools /usr/lib/python2.5/site-packages/bzrli...

Read more...

Revision history for this message
Jelmer Vernooij (jelmer) wrote : Re: [Bug 336467] Re: "AssertionError: base checksum mismatch" with svn-import

On Tue, 2009-03-03 at 11:54 +0000, Forest Bond wrote:
> FWIW, another data point.
>
> I dumped the svn repository and filtered out all of the bzr: directory
> properties. This did not get me much further. I suspect that modifying
> the directory properties modifies some revision hashes that my script
> doesn't recalculate, causing these errors:
Yes, you can't remove the file properties without throwing out your
existing bzr repositories and the cache in ~/.bazaar/svn-cache.

Cheers,

Jelmer
--
Jelmer Vernooij <email address hidden> - http://samba.org/~jelmer/
Jabber: <email address hidden>

Revision history for this message
Forest Bond (forest-bond) wrote :

Hi,

On Tue, Mar 03, 2009 at 01:06:54PM -0000, Jelmer Vernooij wrote:
> On Tue, 2009-03-03 at 11:54 +0000, Forest Bond wrote:
> > FWIW, another data point.
> >
> > I dumped the svn repository and filtered out all of the bzr: directory
> > properties. This did not get me much further. I suspect that modifying
> > the directory properties modifies some revision hashes that my script
> > doesn't recalculate, causing these errors:
> Yes, you can't remove the file properties without throwing out your
> existing bzr repositories and the cache in ~/.bazaar/svn-cache.

Great, this was enough for me to get the svn repository converted.

I am saving the original repo for testing so that this bug can be addressed. It
is clear what the problem was (bad bzr: properties). I assume that bzr-svn
can't really deal with this except by giving the user a decent error message.
It'd be nice if it offered the option of importing the svn repo by ignoring the
bzr: properties, but I'm not sure if that is feasible.

Thanks,
Forest
--
Forest Bond
http://www.alittletooquiet.net
http://www.pytagsfs.org

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

Ignoring the bzr: file properties wouldn't be possible; it breaks some basic assumptions in bzr-svn.

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

I've changed this to be a proper checksum error. Making the error message clearer would be a lot more trouble - also performance-wise, and it should generally never happen so I'll keep it like this .

Changed in bzr-svn:
assignee: nobody → jelmer
status: Triaged → Fix Released
Revision history for this message
Forest Bond (forest-bond) wrote :

Hi Jelmer,

You say that this problem "should generally never happen", however, I think it will probably happen more often then anyone would like. Anytime cherry-picks are done in subversion, the user will have to reconcile the conflicting directory property. Most users will be surprised by this and unsure as to how to deal with it. In fact, if bzr-svn is used to interface to a subversion repository that is also used by people not using bzr, they will probably have no idea why the conflict happens or what to do about it. Doesn't that make this problem common?

I'm not sure what the best way to deal with it is. Being able to tell bzr-svn to ignore the directory properties seems like one way users can deal with importing from problematic svn repositories.

Thanks,
Forest

Revision history for this message
Kevin Smith (ubuntu-qualitycode) wrote :

This does not seem to be fixed when running bzr 2.0.0 with bzr-svn 1.0.0.

kevins@vanessa:~/work/miradi/bzr2/imported$ bzr svn-import svn+ssh://subversion.benetech.org/opt/svn/repositories/benetech.org/Miradi
Using repository layout: trunk0
bzr: ERROR: base checksum mismatch: 'dfd29a2e55275396552bcf7d083ba632' != '41b36ab118bfc4f0d574041d171c7c93' in <email address hidden> (trunk:15034)

Also see my recent comment in lp:380621 which was the bug I originally reported for this repo when I was seeing the problem with pull (which now works on this same repo).

Revision history for this message
Per Johansson (per.j) wrote :

I'm getting this exception, and the same traceback as well. However, we do not have any bzr properties in our svn repo, it's completely read only from bzr point of view.

Changed in bzr-svn:
status: Fix Released → New
Revision history for this message
Jelmer Vernooij (jelmer) wrote :

Per, is your repository public by any chance?

Changed in bzr-svn:
status: New → Triaged
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.