Race condition during `bzr push` causes AssertionError on `bzr pull`

Bug #322032 reported by Mark Lee
2
Affects Status Importance Assigned to Milestone
Bazaar Subversion Plugin
Fix Released
High
Jelmer Vernooij

Bug Description

In a nutshell, I was pushing a local commit to the (private) Subversion server, and during that push, a co-worker committed a revision. Both revisions made it to the svn server (the post-commit hooks proved that), but bzr refuses to acknowlege the existence of the co-worker's revision (even with pull --overwrite). When the co-worker committed a second revision, I tried to pull from the server and the following happened:

$ bzr pull
Using saved parent location: /var/svn/trunk/
bzr: ERROR: exceptions.AssertionError:

Traceback (most recent call last):
  File "/usr/lib/python2.5/site-packages/bzrlib/commands.py", line 893, in run_bzr_catch_errors
    return run_bzr(argv)
  File "/usr/lib/python2.5/site-packages/bzrlib/commands.py", line 839, in run_bzr
    ret = run(*run_argv)
  File "/usr/lib/python2.5/site-packages/bzrlib/commands.py", line 539, in run_argv_aliases
    return self.run(**all_cmd_args)
  File "/usr/lib/python2.5/site-packages/bzrlib/builtins.py", line 790, in run
    possible_transports=possible_transports)
  File "/usr/lib/python2.5/site-packages/bzrlib/decorators.py", line 192, in write_locked
    result = unbound(self, *args, **kwargs)
  File "/usr/lib/python2.5/site-packages/bzrlib/workingtree.py", line 1537, in pull
    possible_transports=possible_transports)
  File "/usr/lib/python2.5/site-packages/bzrlib/decorators.py", line 192, in write_locked
    result = unbound(self, *args, **kwargs)
  File "/usr/lib/python2.5/site-packages/bzrlib/plugins/loom/branch.py", line 449, in pull
    _override_hook_target=_override_hook_target)
  File "/usr/lib/python2.5/site-packages/bzrlib/decorators.py", line 192, in write_locked
    result = unbound(self, *args, **kwargs)
  File "/usr/lib/python2.5/site-packages/bzrlib/branch.py", line 1957, in pull
    _override_hook_target=_override_hook_target)
  File "/usr/lib/python2.5/site-packages/bzrlib/decorators.py", line 192, in write_locked
    result = unbound(self, *args, **kwargs)
  File "/usr/lib/python2.5/site-packages/bzrlib/branch.py", line 1757, in pull
    graph=graph)
  File "/usr/lib/python2.5/site-packages/bzrlib/decorators.py", line 192, in write_locked
    result = unbound(self, *args, **kwargs)
  File "/usr/lib/python2.5/site-packages/bzrlib/branch.py", line 524, in update_revisions
    self.fetch(other, stop_revision)
  File "/usr/lib/python2.5/site-packages/bzrlib/decorators.py", line 192, in write_locked
    result = unbound(self, *args, **kwargs)
  File "/usr/lib/python2.5/site-packages/bzrlib/branch.py", line 286, in fetch
    pb=nested_pb)
  File "/usr/lib/python2.5/site-packages/bzrlib/repository.py", line 1021, in fetch
    find_ghosts=find_ghosts)
  File "/usr/lib/python2.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 "/usr/lib/python2.5/site-packages/bzrlib/plugins/svn/fetch.py", line 778, in _fetch_switch
    report_inventory_contents(reporter, parent_inv, parent_revnum, start_empty)
  File "/usr/lib/python2.5/site-packages/bzrlib/plugins/svn/fetch.py", line 602, in report_inventory_contents
    reporter.finish()
  File "/usr/lib/python2.5/site-packages/bzrlib/plugins/svn/delta.py", line 31, in apply_window
    assert len(tview) == tview_len
AssertionError

bzr 1.10 on python 2.5.2 (linux2)
arguments: ['/usr/bin/bzr', 'pull']
encoding: 'UTF-8', fsenc: 'UTF-8', lang: 'en_US.UTF-8'
plugins:
  builddeb /usr/lib/python2.5/site-packages/bzrlib/plugins/builddeb [2.0.2]
  bzrtools /usr/lib/python2.5/site-packages/bzrlib/plugins/bzrtools [1.10]
  difftools /home/malept/.bazaar/plugins/difftools [0.91]
  interactive /home/malept/.bazaar/plugins/interactive [1.2]
  launchpad /usr/lib/python2.5/site-packages/bzrlib/plugins/launchpad [unknown]
  loom /usr/lib/python2.5/site-packages/bzrlib/plugins/loom [1.4dev]
  rebase /usr/lib/python2.5/site-packages/bzrlib/plugins/rebase [0.3]
  svn /usr/lib/python2.5/site-packages/bzrlib/plugins/svn [0.4.16]
  xmloutput /usr/lib/python2.5/site-packages/bzrlib/plugins/xmloutput [0.8]

The machine is an x86_64 Ubuntu Hardy install (using the bzr PPA), with Subversion 1.5.1 installed.

My bzr branch format:
Format:
       control: Meta directory format 1
  working tree: Working tree format 4
        branch: Loom branch format 6
    repository: Packs containing knits with rich root support

The .bzr.log output does not seem to give any additional relevant information than what is above.

This may or may not be similar to <https://bugs.launchpad.net/bugs/248289>.

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

the first issue you saw was indeed bug 248289; the second is independent and was fixed in bzr-svn earlier (0.5.0)

Changed in bzr-svn:
status: Triaged → Fix Released
Jelmer Vernooij (jelmer)
Changed in bzr-svn:
assignee: nobody → Jelmer Vernooij (jelmer)
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.