assert len(tview) == tview_len

Bug #480102 reported by c
122
This bug affects 15 people
Affects Status Importance Assigned to Milestone
Bazaar
Invalid
Undecided
Unassigned
Bazaar Subversion Plugin
Fix Released
High
Jelmer Vernooij
Launchpad itself
Fix Released
High
Jelmer Vernooij

Bug Description

bzr: ERROR: exceptions.AssertionError: 12069 != 12085

Traceback (most recent call last):
  File "/Library/Python/2.6/site-packages/bzrlib/commands.py", line 842, in exception_to_return_code
    return the_callable(*args, **kwargs)
  File "/Library/Python/2.6/site-packages/bzrlib/commands.py", line 1037, in run_bzr
    ret = run(*run_argv)
  File "/Library/Python/2.6/site-packages/bzrlib/commands.py", line 654, in run_argv_aliases
    return self.run(**all_cmd_args)
  File "/Library/Python/2.6/site-packages/bzrlib/builtins.py", line 1413, in run
    view_info=view_info), possible_transports=possible_transports)
  File "/Library/Python/2.6/site-packages/bzrlib/workingtree.py", line 2213, in update
    old_tip = self.branch.update(possible_transports)
  File "/Library/Python/2.6/site-packages/bzrlib/decorators.py", line 192, in write_locked
    result = unbound(self, *args, **kwargs)
  File "/Library/Python/2.6/site-packages/bzrlib/branch.py", line 2437, in update
    self.pull(master, overwrite=True)
  File "/Library/Python/2.6/site-packages/bzrlib/decorators.py", line 192, in write_locked
    result = unbound(self, *args, **kwargs)
  File "/Library/Python/2.6/site-packages/bzrlib/branch.py", line 948, in pull
    possible_transports=possible_transports, *args, **kwargs)
  File "/Library/Python/2.6/site-packages/bzrlib/plugins/svn/branch.py", line 730, in pull
    self.update_revisions(stop_revision, overwrite)
  File "/Library/Python/2.6/site-packages/bzrlib/plugins/svn/branch.py", line 665, in update_revisions
    mapping=self.source.mapping)
  File "/Library/Python/2.6/site-packages/bzrlib/plugins/svn/fetch.py", line 1279, in fetch
    use_replay=self._use_replay)
  File "/Library/Python/2.6/site-packages/bzrlib/plugins/svn/fetch.py", line 1209, in _fetch_revisions
    parent_revmeta)
  File "/Library/Python/2.6/site-packages/bzrlib/plugins/svn/fetch.py", line 1154, in _fetch_revision_switch
    report_inventory_contents(reporter, parent_revnum, start_empty)
  File "/Library/Python/2.6/site-packages/bzrlib/plugins/svn/errors.py", line 137, in convert
    return unbound(*args, **kwargs)
  File "/Library/Python/2.6/site-packages/bzrlib/plugins/svn/fetch.py", line 920, in report_inventory_contents
    reporter.finish()
  File "/Library/Python/2.6/site-packages/subvertpy/delta.py", line 59, in apply_window
    target_chunks.append(apply_txdelta_window(sbuf, window))
  File "/Library/Python/2.6/site-packages/subvertpy/delta.py", line 45, in apply_txdelta_window
    assert len(tview) == tview_len, "%d != %d" % (len(tview), tview_len)
AssertionError: 12069 != 12085

bzr 2.0.0 on python 2.6.1 (Darwin-10.0.0-i386-64bit)
arguments: ['/usr/local/bin/bzr', 'up']
encoding: 'UTF-8', fsenc: 'utf-8', lang: 'en_US.UTF-8'
plugins:
  bzrtools /Library/Python/2.6/site-packages/bzrlib/plugins/bzrtools [2.0.1]
  email /Library/Python/2.6/site-packages/bzrlib/plugins/email [unknown]
  keychain /Library/Python/2.6/site-packages/bzrlib/plugins/keychain [0.1.0]
  launchpad /Library/Python/2.6/site-packages/bzrlib/plugins/launchpad [2.0.0]
  netrc_credential_store /Library/Python/2.6/site-packages/bzrlib/plugins/netrc_credential_store [2.0.0]
  rebase /Library/Python/2.6/site-packages/bzrlib/plugins/rebase [0.5.4]
  svn /Library/Python/2.6/site-packages/bzrlib/plugins/svn [1.0.0]
  upload /Library/Python/2.6/site-packages/bzrlib/plugins/upload [1.0.0dev]
  xmloutput /Library/Python/2.6/site-packages/bzrlib/plugins/xmloutput [0.8.5]

Related branches

Revision history for this message
Jelmer Vernooij (jelmer) wrote : Re: [Bug 480102] [NEW] bzr svn crash on update

  affects bzr
  status invalid

  affects bzr-svn
  status new

Changed in bzr:
status: New → Invalid
Revision history for this message
Jelmer Vernooij (jelmer) wrote : Re: bzr svn crash on update

Does the repository you are trying to update from contain any revisions that were pushed with bzr-svn earlier?

Changed in bzr-svn:
status: New → Incomplete
Revision history for this message
Christian Faulhammer (fauli) wrote :
Download full text (4.2 KiB)

I am seeing this error with https://overlays.gentoo.org/svn/proj/alt/trunk/prefix-overlay (I did a checkout of a subdirectory). After a commit to https://overlays.gentoo.org/svn/proj/alt/trunk/scripts by someone else with Subversion I get the following error:

https://overlays.gentoo.org/svn/proj/alt/trunk/prefix-overlay is permanently redirected to https://overlays.gentoo.org/svn/proj/alt/trunk/prefix-overlay/
bzr: ERROR: exceptions.AssertionError: 21919 != 22030

Traceback (most recent call last):
  File "/usr/lib/python2.6/site-packages/bzrlib/commands.py", line 842, in exception_to_return_code
    return the_callable(*args, **kwargs)
  File "/usr/lib/python2.6/site-packages/bzrlib/commands.py", line 1037, in run_bzr
    ret = run(*run_argv)
  File "/usr/lib/python2.6/site-packages/bzrlib/commands.py", line 654, in run_argv_aliases
    return self.run(**all_cmd_args)
  File "/usr/lib/python2.6/site-packages/bzrlib/builtins.py", line 1017, in run
    possible_transports=possible_transports, local=local)
  File "/usr/lib/python2.6/site-packages/bzrlib/decorators.py", line 192, in write_locked
    result = unbound(self, *args, **kwargs)
  File "/usr/lib/python2.6/site-packages/bzrlib/workingtree.py", line 1611, in pull
    local=local)
  File "/usr/lib/python2.6/site-packages/bzrlib/decorators.py", line 192, in write_locked
    result = unbound(self, *args, **kwargs)
  File "/usr/lib/python2.6/site-packages/bzrlib/branch.py", line 948, in pull
    possible_transports=possible_transports, *args, **kwargs)
  File "/usr/lib/python2.6/site-packages/bzrlib/plugins/svn/branch.py", line 731, in pull
    self.update_revisions(stop_revision, overwrite)
  File "/usr/lib/python2.6/site-packages/bzrlib/plugins/svn/branch.py", line 666, in update_revisions
    mapping=self.source.mapping)
  File "/usr/lib/python2.6/site-packages/bzrlib/plugins/svn/fetch.py", line 1276, in fetch
    use_replay=self._use_replay)
  File "/usr/lib/python2.6/site-packages/bzrlib/plugins/svn/fetch.py", line 1206, in _fetch_revisions
    parent_revmeta)
  File "/usr/lib/python2.6/site-packages/bzrlib/plugins/svn/fetch.py", line 1151, in _fetch_revision_switch
    report_inventory_contents(reporter, parent_revnum, start_empty)
  File "/usr/lib/python2.6/site-packages/bzrlib/plugins/svn/errors.py", line 137, in convert
    return unbound(*args, **kwargs)
  File "/usr/lib/python2.6/site-packages/bzrlib/plugins/svn/fetch.py", line 917, in report_inventory_contents
    reporter.finish()
  File "/usr/lib/python2.6/site-packages/subvertpy/delta.py", line 59, in apply_window
    target_chunks.append(apply_txdelta_window(sbuf, window))
  File "/usr/lib/python2.6/site-packages/subvertpy/delta.py", line 45, in apply_txdelta_window
    assert len(tview) == tview_len, "%d != %d" % (len(tview), tview_len)
AssertionError: 21919 != 22030

bzr 2.0.3 on python 2.6.4 (Linux-2.6.31-gentoo-r6-i686-Intel-R-_Core-TM-2_Duo_CPU_T8100_@_2.10GHz-with-gentoo-2.0.1)
arguments: ['/usr/bin/bzr', 'pull', 'https://overlays.gentoo.org/svn/proj/alt/trunk/prefix-overlay']
encoding: 'UTF-8', fsenc: 'UTF-8', lang: 'de_DE.UTF-8@euro'
plugins:
  bzrtools /usr/...

Read more...

Revision history for this message
Christian Faulhammer (fauli) wrote :

I should add that such a commit happened before, and it was no problem to pull then.

Revision history for this message
Christian Faulhammer (fauli) wrote :

Even cloning fails now on that repository. My structure is

shared repostitory: prefix/
two trunks: prefix/local_trunk and prefix/remote_trunk

Cloning in a new shared repository is ok.

I should also note that the above prefix structure has been branched off with Bazaar from a checkout with bzr-svn. Size difference was vast.

Revision history for this message
Christian Faulhammer (fauli) wrote :

Again, it's me. Cloning from upstream repository does not work..it fails after fetching all revisions in the processing phase with the exact number. Branching the existing bzr-svn repository works, but pull is defect nonetheless.

 Any comments?

Changed in bzr-svn:
status: Incomplete → Confirmed
Jelmer Vernooij (jelmer)
summary: - bzr svn crash on update
+ assert len(tview) == tview_len
Revision history for this message
Tully (tully.foote) wrote :

I'm seeing this bug too. I'm seeing this in launchpad's import of a svn repository. This is the branch being imported https://code.launchpad.net/~tully.foote/ros-wg-pkg-unreleased/svn_trunk

It's happening on every import at what I believe is the same revision. The most recent logs are available on the branch webpage.

The error is at the same line:
{{{
  File "/srv/importd.launchpad.net/production/launchpad-rev-9186/optionalbzrplugins/svn/errors.py", line 141, in convert
    return unbound(*args, **kwargs)
  File "/srv/importd.launchpad.net/production/launchpad-rev-9186/optionalbzrplugins/svn/fetch.py", line 938, in report_inventory_contents
    reporter.finish()
  File "/srv/importd.launchpad.net/production/launchpad-rev-9186/lib/subvertpy/delta.py", line 59, in apply_window
    target_chunks.append(apply_txdelta_window(sbuf, window))
  File "/srv/importd.launchpad.net/production/launchpad-rev-9186/lib/subvertpy/delta.py", line 45, in apply_txdelta_window
    assert len(tview) == tview_len, "%d != %d" % (len(tview), tview_len)
AssertionError: 24 != 80
}}}

Curtis Hovey (sinzui)
affects: launchpad → launchpad-code
Paul Hummer (rockstar)
Changed in launchpad-code:
status: New → Triaged
importance: Undecided → Medium
Revision history for this message
Tres Seaver (tseaver) wrote :

This bug is blocking the import of lp:karl3 at a particularly inopportune moment: the project drivers are actively considering a move from SVN to bzr, including possibly setting up for-pay private repositories / LP instances for the organizations currently running KARL.

Please let me know if there is anything I can do to help diagnose ore resolve the issue. For reference, the failing import is from the HTTP URL: http://osi.agendaless.com/bfgsvn/karl/trunk/ . I can arrange access over SSH if that would help, or get you a copy of the repository.

Revision history for this message
Tim Penhey (thumper) wrote :

I realised it was a bit rude of me to set the importance of the bzr-svn task. Sorry. But rather than twiddling the status back, we should talk about it.

Changed in launchpad-code:
importance: Medium → High
Changed in bzr-svn:
importance: Undecided → High
tags: added: code-import
Revision history for this message
Tres Seaver (tseaver) wrote :

One more datapoint: the last imported revision for lp:karl3 is r927, which corresponds to svn r5140

  $ svn diff -c 5140 http://osi.agendaless.com/bfgsvn
  ...
  Property changes on: karl/trunk/karl/evolve/zodb/evolve8.py
  ___________________________________________________________________
  Added: svn:eol-style
     + native
  Added: svn:keywords
     + Id
  ...

which has no corresponding data in bzr:

  $ bzr log -p --limit 1 lp:karl3

Could the lack of that property cause the checksum failure in importing
svn r5141 (or later)?

Revision history for this message
Tres Seaver (tseaver) wrote :

I think my last note is a red herring: the revision which actually causes the failure
is svn r 5147, which doesn't involve the same files as svn r5140.

The 'tview' string in my version of the traceback is definitely a corrupt version of
the affected file: it doesn't match any revision of the file in subversion at all, and
in fact contains a Python syntax error.

The 'tview_len' value corresponds exactly to the length of the file as checked in
to r5147.

Revision history for this message
Tres Seaver (tseaver) wrote :
Download full text (4.1 KiB)

Reproducing with bzr 2.1.1

 $ bzr --version
 Bazaar (bzr) 2.1.1
 ...
 $ bzr plugins | grep ^svn
 svn 1.0.3dev
:$ export KSVN=http://osi.agendaless.com/bfgsvn
 $ bzr co $KSVN/karl/trunk karl

At the time that the assert happens, the following state seems interestnig:

- The SVN revision which triggers the failure is r5147.

- The file for the failure is 'karl/trunk/karl/content/views/wiki.py',
  which has the following revisions of interest on the trunk;

  * Revision 4908:

    $ svn log -r 4908 $KSVN/karl/trunk/karl/content/views/wiki.py
    ------------------------------------------------------------------------
    r4908 | Rob Miller <email address hidden> | 2010-02-25 21:48:07 -0500 (Thu, 25 Feb 2010) | 6 lines

    move the commits that i accidentally made to a tag over to the trunk, where
    they belong. addresses the following 2 issues:

    https://bugs.launchpad.net/karl3/+bug/522179
    https://bugs.launchpad.net/karl3/+bug/523280

    ------------------------------------------------------------------------
    $ svn cat -r 4908 $KSVN/karl/trunk/karl/content/views/wiki.py | wc -c
    11228
    $ svn cat -r 4908 $KSVN/karl/trunk/karl/content/views/wiki.py | sha1sum
    310284f4a879826a525bc5ca97a1247856399f75 -

  * Revision 5090:

    $ svn log -r 5090 $KSVN/karl/trunk/karl/content/views/wiki.py
    ------------------------------------------------------------------------
    r5090 | Balazs Ree <email address hidden> | 2010-04-01 16:33:58 -0400 (Thu, 01 Apr 2010) | 1 line

    Merge ree-imagedrawer branch
    ------------------------------------------------------------------------
    $ svn cat -r 5090 $KSVN/karl/trunk/karl/content/views/wiki.py | wc -c
    11307
    $ svn cat -r 5090 $KSVN/karl/trunk/karl/content/views/wiki.py | sha1sum
    c079d758b9131f6990e4d78b82792cb4a6edba17 -

  * Revision 5147

    $ svn log -r 5147 $KSVN/karl/trunk/karl/content/views/wiki.py
    ------------------------------------------------------------------------
    r5147 | Balazs Ree <email address hidden> | 2010-04-07 13:27:11 -0400 (Wed, 07 Apr 2010) | 4 lines

    Implement experimental url switch for imagedrawer
    it's only active on wiki pages, if the ?enable_imagedrawer url
    parameter is entered manually. Otherwise, old style widget works
    by default.
    ------------------------------------------------------------------------
    $ svn cat -r 5147 $KSVN/karl/trunk/karl/content/views/wiki.py | wc -c
    11625
    $ svn cat -r 5147 $KSVN/karl/trunk/karl/content/views/wiki.py | sha1sum
    a409721a7a35eb3e9df0e8052b7a30ff839dc3ae -

Just before the application of the textdelta which fails with the assert,
the FileRevisionBuildEditor object is created for this file, with the
following arguments:

  'editor':
    revid: 'svn-v4:4f889dee-8c54-0410-98c1-98789d956ae4:karl/trunk:5147'
    'base_tree':
         rev_id: 'svn-v4:4f889dee-8c54-0410-98c1-98789d956ae4:karl/trunk:5146'
    'parent_trees':
         rev_id='svn-v4:4f889dee-8c54-0410-98c1-98789d956ae4:karl/trunk:5146',
         rev_id='svn-v4:4f889dee-8c54-0410-98c1-98789d956ae4:karl/trunk:5146'
    'inventory': None

  'old_path': u'karl/content/views/wiki.py'

  'path': u'karl/conte...

Read more...

Jelmer Vernooij (jelmer)
Changed in bzr-svn:
assignee: nobody → Jelmer Vernooij (jelmer)
status: Confirmed → In Progress
Revision history for this message
Jelmer Vernooij (jelmer) wrote :

I simply don't have the time to work on this at the moment, so unassigning for now. It'll be the first thing I work on when I get back to bzr-svn work though.

Changed in bzr-svn:
status: In Progress → Triaged
assignee: Jelmer Vernooij (jelmer) → nobody
Jelmer Vernooij (jelmer)
Changed in bzr-svn:
milestone: none → 1.0.4
Jelmer Vernooij (jelmer)
Changed in bzr-svn:
status: Triaged → Fix Committed
assignee: nobody → Jelmer Vernooij (jelmer)
Jelmer Vernooij (jelmer)
Changed in bzr-svn:
status: Fix Committed → Fix Released
Jelmer Vernooij (jelmer)
Changed in launchpad-code:
assignee: nobody → Jelmer Vernooij (jelmer)
milestone: none → 10.09
Revision history for this message
Tres Seaver (tseaver) wrote :

The fix for this bug does not seem to have helped the import of the KARL3 branch

The bug was obscured at first by a new bug, lp:626900, but the patch I added to
fix that bug causes the karl3 import to fail again with the same traceback.

See step 4 in this attachment to lp:626900 for the traceback:

  https://bugs.launchpad.net/bzr-svn/+bug/626900/+attachment/1529673/+files/bzr_svn-error.txt

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

As mentioned in the report for bug 626900, the traceback shows that you're not running the latest version of
bzr-svn. The bug is fixed in bzr-svn 1.0.4 ("final"), while you're still
running the development version. If you're running lp:bzr-svn, you
should see "1.0.5 (dev)" as the current bzr-svn version.

Cheers,

Jelmer

Revision history for this message
Launchpad QA Bot (lpqabot) wrote : Bug fixed by a commit
Changed in bzr-svn:
milestone: 1.0.4 → none
tags: added: qa-needstesting
Tim Penhey (thumper)
Changed in launchpad-code:
status: Triaged → Fix Committed
Tim Penhey (thumper)
tags: added: qa-ok
removed: qa-needstesting
Curtis Hovey (sinzui)
Changed in launchpad-code:
status: Fix Committed → Fix Released
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.