Incorrect conversions in 2.0rc1 and bzr.dev

Bug #422849 reported by Robert Collins
22
This bug affects 3 people
Affects Status Importance Assigned to Milestone
Bazaar
Fix Released
Critical
Robert Collins
2.0
Fix Released
Critical
Unassigned

Bug Description

An aliasing bug in InterDifferingSerializer causes incorrect deltas to be created.

This onyl affects local-local operations, such as 'bzr upgrade' (in place), 'bzr upgrade <local path>' and bzr push/bzr pull with local paths or file urls.

Workaround
-----------

Use bzr 1.18 to convert, or 2.0rc2

Related branches

Revision history for this message
Robert Collins (lifeless) wrote :
Download full text (15.5 KiB)

 [(('mysql_embed.h-20080625052902-61bbthtf22shh0p6-167',), None, None), (None, ('autorun.sh-20080629234157-yb35jnh4xacg1az8-1',), 'file: autorun.sh-20080629234157-yb35jnh4xacg1az8-1\nTREE_ROOT\nautorun.sh\<email address hidden>\nf560c365650704b88a401455fa0b905f5f3d3abe\n927\nY'), (('net_serv.cc-20080625052902-61bbthtf22shh0p6-462',), ('net_serv.cc-20080625052902-61bbthtf22shh0p6-462',), 'file: net_serv.cc-20080625052902-61bbthtf22shh0p6-462\nsql-20080625052902-61bbthtf22shh0p6-22\nnet_serv.cc\<email address hidden>\nf82f73a17e7e72e4348c8a4fa3e863ff7462551d\n29784\nN'), (('makefile.am-20080625052902-61bbthtf22shh0p6-193',), ('makefile.am-20080625052902-61bbthtf22shh0p6-193',), 'file: makefile.am-20080625052902-61bbthtf22shh0p6-193\nlibmysql_r-20080625052902-61bbthtf22shh0p6-15\nMakefile.am\<email address hidden>\nf6aafa6cd5d9164a42e9ff35f36a5a2836c6436c\n1691\nN'), (('makefile.am-20080625052902-61bbthtf22shh0p6-182',), ('makefile.am-20080625052902-61bbthtf22shh0p6-182',), 'file: makefile.am-20080625052902-61bbthtf22shh0p6-182\nlibmysql-20080625052902-61bbthtf22shh0p6-14\nMakefile.am\<email address hidden>\nfe1d2bfef676dad616e056c14ccaf79424436084\n4145\nN'), (('log.cc-20080625052902-61bbthtf22shh0p6-450',), ('log.cc-20080625052902-61bbthtf22shh0p6-450',), 'file: log.cc-20080625052902-61bbthtf22shh0p6-450\nsql-20080625052902-61bbthtf22shh0p6-22\nlog.cc\<email address hidden>\n19d2cb8a3a4d9d9e34b554ccf55c8cafe58e30ac\n139516\nN'), (('my_copy.c-20080625052902-61bbthtf22shh0p6-267',), ('my_copy.c-20080625052902-61bbthtf22shh0p6-267',), 'file: my_copy.c-20080625052902-61bbthtf22shh0p6-267\nmysys-20080625052902-61bbthtf22shh0p6-17\nmy_copy.c\<email address hidden>\n900ecfc8ec0bfa6fb2e2e9c7a7c12d74bedce99b\n3575\nN'), (('set_var.cc-20080625052902-61bbthtf22shh0p6-491',), ('set_var.cc-20080625052902-61bbthtf22shh0p6-491',), 'file: set_var.cc-20080625052902-61bbthtf22shh0p6-491\nsql-20080625052902-61bbthtf22shh0p6-22\nset_var.cc\<email address hidden>\nb778729f2b4446455407a63a13a2bbd54f854ec7\n109177\nN'), (('charset.c-20080625052902-61bbthtf22shh0p6-221',), ('charset.c-20080625052902-61bbthtf22shh0p6-221',), 'file: charset.c-20080625052902-61bbthtf22shh0p6-221\nmysys-20080625052902-61bbthtf22shh0p6-17\ncharset.c\<email address hidden>\nb930cf9070b233feccd30d4c756ba78270147c38\n24611\nN'), (('makefile.am-20080625052902-61bbthtf22shh0p6-7',), ('makefile.am-20080625052902-61bbthtf22shh0p6-7',), 'file: makefile.am-20080625052902-61bbthtf22shh0p6-7\nTREE_ROOT\nMakefile.am\<email address hidden>\n78136444f8a5207dfabb3f9491d03202608bab61\n5948\nN'), (('item_strfunc.cc-20080625052902-61bbthtf22shh0p6-438',), ('item_strfunc.cc-20080625052902-61bbthtf22shh0p6-438',), 'file: item_strfunc.cc-20080625052902-61bbthtf22shh0p6-438\nsql-20080625052902-61bbthtf22shh0p6-22\nitem_strfunc.cc\<email address hidden>\n3519760e55d3aa1f0755e467e978409634c3f1c5\n76261\nN'), (('rpl_r...

Changed in bzr:
importance: Undecided → Critical
description: updated
Changed in bzr:
assignee: nobody → Robert Collins (lifeless)
Revision history for this message
Robert Collins (lifeless) wrote :

Datum:
autorun.sh is only in the delta once.

Revision history for this message
Robert Collins (lifeless) wrote :

new rev: '<email address hidden>'
old rev '<email address hidden>'

Revision history for this message
Robert Collins (lifeless) wrote :

(Pdb) source.revision_tree('<email address hidden>').id2path('autorun.sh-20080629234157-yb35jnh4xacg1az8-1')
'autorun.sh'
(Pdb) source.revision_tree('<email address hidden>').id2path('autorun.sh-20080629234157-yb35jnh4xacg1az8-1')
'autorun.sh'

- either the delta was wrong, or the calculated hashmap delta is wrong.

Revision history for this message
Robert Collins (lifeless) wrote :

From the frame above:
(pdb) delta[1]
(None, 'autorun.sh', 'autorun.sh-20080629234157-yb35jnh4xacg1az8-1', InventoryFile('autorun.sh-20080629234157-yb35jnh4xacg1az8-1', 'autorun.sh', parent_id='TREE_ROOT', sha1='f560c365650704b88a401455fa0b905f5f3d3abe', len=927, <email address hidden>))

summary: - InconsistentDelta error upgrading drizzle repo to 2a
+ InterDifferingSerializer generates InconsistentDelta error upgrading
+ drizzle repo to 2a - adds a file already versioned
Revision history for this message
Robert Collins (lifeless) wrote : Re: InterDifferingSerializer generates InconsistentDelta error upgrading drizzle repo to 2a - adds a file already versioned

This only occurs in the IDS code path; streaming fetch works ok.

I suspect an aliasing/parent-mismatch bug. If so, then we need ot understand how often this can occur - it would be remarkably bad if its common.

Revision history for this message
Robert Collins (lifeless) wrote :

revno: 4639 [merge]
committer: Canonical.com Patch Queue Manager <email address hidden>
branch nick: +trunk
timestamp: Mon 2009-08-24 05:18:00 +0100
message:
  (andrew) Fix 'Revision ... not present' errors when upgrading stacked
        branches.

introduces this bug.

Changed in bzr:
milestone: none → 2.0
Revision history for this message
Robert Collins (lifeless) wrote :

Not present in 1.18, just trunk and 2.0

Changed in bzr:
status: New → In Progress
Revision history for this message
Robert Collins (lifeless) wrote :

=== modified file 'bzrlib/repository.py'
--- bzrlib/repository.py 2009-08-30 22:02:45 +0000
+++ bzrlib/repository.py 2009-09-01 23:10:56 +0000
@@ -3844,6 +3844,9 @@
                 possible_trees.append((basis_id, cache[basis_id]))
             basis_id, delta = self._get_delta_for_revision(tree, parent_ids,
                                                            possible_trees)
+ revision = self.source.get_revision(current_revision_id)
+ pending_deltas.append((basis_id, delta,
+ current_revision_id, revision.parent_ids))
             if self._converting_to_rich_root:
                 self._revision_id_to_root_id[current_revision_id] = \
                     tree.get_root_id()
@@ -3878,9 +3881,6 @@
                     if entry.revision == file_revision:
                         texts_possibly_new_in_tree.remove(file_key)
             text_keys.update(texts_possibly_new_in_tree)
- revision = self.source.get_revision(current_revision_id)
- pending_deltas.append((basis_id, delta,
- current_revision_id, revision.parent_ids))
             pending_revisions.append(revision)
             cache[current_revision_id] = tree
             basis_id = current_revision_id

summary: - InterDifferingSerializer generates InconsistentDelta error upgrading
- drizzle repo to 2a - adds a file already versioned
+ Incorrect conversions in 2.0rc1 and bzr.dev
description: updated
Changed in bzr:
status: In Progress → Fix Released
milestone: 2.0 → 2.0rc2
milestone: 2.0rc2 → 2.0
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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