Proper warning on reused UUIDs

Bug #594872 reported by John Szakmeister
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Bazaar Subversion Plugin
Fix Released
Low
Jelmer Vernooij

Bug Description

I discovered this while trying to reproduce an error where bzr-svn was erroneously saying that I needed to set append_revisions_only to False. Here's the traceback and I attached a script to reproduce the error:

bzr: ERROR: exceptions.AssertionError: Unexpected revision id <email address hidden> != <email address hidden>

Traceback (most recent call last):
  File "/Users/jszakmeister/Library/Python/2.6/site-packages/bzrlib/commands.py", line 909, in exception_to_return_code
    return the_callable(*args, **kwargs)
  File "/Users/jszakmeister/Library/Python/2.6/site-packages/bzrlib/commands.py", line 1107, in run_bzr
    ret = run(*run_argv)
  File "/Users/jszakmeister/Library/Python/2.6/site-packages/bzrlib/commands.py", line 687, in run_argv_aliases
    return self.run(**all_cmd_args)
  File "/Users/jszakmeister/Library/Python/2.6/site-packages/bzrlib/commands.py", line 702, in run
    return self._operation.run_simple(*args, **kwargs)
  File "/Users/jszakmeister/Library/Python/2.6/site-packages/bzrlib/cleanup.py", line 122, in run_simple
    self.cleanups, self.func, *args, **kwargs)
  File "/Users/jszakmeister/Library/Python/2.6/site-packages/bzrlib/cleanup.py", line 156, in _do_with_cleanups
    result = func(*args, **kwargs)
  File "/Users/jszakmeister/Library/Python/2.6/site-packages/bzrlib/builtins.py", line 3189, in run
    exclude=safe_relpath_files(tree, exclude))
  File "/Users/jszakmeister/Library/Python/2.6/site-packages/bzrlib/decorators.py", line 194, in write_locked
    result = unbound(self, *args, **kwargs)
  File "/Users/jszakmeister/Library/Python/2.6/site-packages/bzrlib/workingtree_4.py", line 197, in commit
    result = WorkingTree3.commit(self, message, revprops, *args, **kwargs)
  File "/Users/jszakmeister/Library/Python/2.6/site-packages/bzrlib/decorators.py", line 194, in write_locked
    result = unbound(self, *args, **kwargs)
  File "/Users/jszakmeister/Library/Python/2.6/site-packages/bzrlib/mutabletree.py", line 200, in commit
    *args, **kwargs)
  File "/Users/jszakmeister/Library/Python/2.6/site-packages/bzrlib/commit.py", line 286, in commit
    possible_master_transports=possible_master_transports)
  File "/Users/jszakmeister/Library/Python/2.6/site-packages/bzrlib/cleanup.py", line 118, in run
    self.cleanups, self.func, self, *args, **kwargs)
  File "/Users/jszakmeister/Library/Python/2.6/site-packages/bzrlib/cleanup.py", line 156, in _do_with_cleanups
    result = func(*args, **kwargs)
  File "/Users/jszakmeister/Library/Python/2.6/site-packages/bzrlib/commit.py", line 448, in _commit
    self.branch.repository, new_revno, self.rev_id)
  File "/Users/jszakmeister/.bazaar/plugins/svn/branch.py", line 550, in import_last_revision_info
    self.get_push_merged_revisions(), overwrite=False)
  File "/Users/jszakmeister/.bazaar/plugins/svn/push.py", line 217, in push_branch
    overwrite=overwrite)
  File "/Users/jszakmeister/.bazaar/plugins/svn/push.py", line 239, in push
    override_svn_revprops=target_config.get_override_svn_revprops())
  File "/Users/jszakmeister/.bazaar/plugins/svn/push.py", line 153, in push_revision_tree
    revid = builder.commit(rev.message)
  File "/Users/jszakmeister/.bazaar/plugins/svn/errors.py", line 141, in convert
    return unbound(*args, **kwargs)
  File "/Users/jszakmeister/.bazaar/plugins/svn/commit.py", line 858, in commit
    (revid, self._new_revision_id))
AssertionError: Unexpected revision id <email address hidden> != <email address hidden>

bzr 2.2.0dev1 on python 2.6.1 (Darwin-10.3.0-i386-64bit)
arguments: ['/Users/jszakmeister/bin/bzr', 'ci', '-m', 'Add content2.']
encoding: 'UTF-8', fsenc: 'utf-8', lang: 'en_US.UTF-8'
plugins:
  bookmarks /Users/jszakmeister/.bazaar/plugins/bookmarks [unknown]
  bzrtools /Users/jszakmeister/.bazaar/plugins/bzrtools [2.1b1]
  colo /Users/jszakmeister/.bazaar/plugins/colo [0.2.0dev]
  disable_pycurl /Users/jszakmeister/.bazaar/plugins/disable_pycurl.py [unknown]
  email /Users/jszakmeister/.bazaar/plugins/email [unknown]
  externals /Users/jszakmeister/.bazaar/plugins/externals [1.3.0]
  grep /Users/jszakmeister/.bazaar/plugins/grep [0.2.0]
  keychain /Users/jszakmeister/.bazaar/plugins/keychain [0.1.0]
  launchpad /Users/jszakmeister/Library/Python/2.6/site-packages/bzrlib/plugins/launchpad [2.2.0dev1]
  netrc_credential_store /Users/jszakmeister/Library/Python/2.6/site-packages/bzrlib/plugins/netrc_credential_store [2.2.0dev1]
  news_merge /Users/jszakmeister/Library/Python/2.6/site-packages/bzrlib/plugins/news_merge [2.2.0dev1]
  qbzr /Users/jszakmeister/.bazaar/plugins/qbzr [0.19.0dev1]
  rewrite /Users/jszakmeister/.bazaar/plugins/rewrite [0.6.0]
  svn /Users/jszakmeister/.bazaar/plugins/svn [1.0.3dev]

*** Bazaar has encountered an internal error. This probably indicates a
    bug in Bazaar. You can help us fix it by filing a bug report at
        https://bugs.launchpad.net/bzr/+filebug
    including this traceback and a description of the problem.

Related branches

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

I'm not quite sure what causes this yet, but it might be related to the caching issues you were reporting on the mailing list this week.

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

These are bugs in the cache, disabling the cache seems to fix them.

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

This is caused by the fact that you're reusing the same UUID for multiple repositories that have different contents. bzr-svn requires a repository to have a proper UUID since it uses that as the key to find its cache.

It could probably be a bit more proactive in detecting when the user is using a broken cache and warn them.

summary: - AssertionError: Unexpected revision id...
+ Proper warning on conflicting UUIDs
summary: - Proper warning on conflicting UUIDs
+ Proper warning on reused UUIDs
Changed in bzr-svn:
importance: Medium → Low
Revision history for this message
John Szakmeister (jszakmeister) wrote : Re: [Bug 594872] Re: AssertionError: Unexpected revision id...

On Sat, Jul 31, 2010 at 10:59 PM, Jelmer Vernooij
<email address hidden> wrote:
> This is caused by the fact that you're reusing the same UUID for
> multiple repositories that have different contents. bzr-svn requires a
> repository to have a proper UUID since it uses that as the key to find
> its cache.
>
> It could probably be a bit more proactive in detecting when the user is
> using a broken cache and warn them.

I'm not sure I understand. It's nuking the cache (well, at least it
does on my Mac... it probably located elsewhere on your system). I
only have it setting the UUID so that I can easily spot it and remove
it after trying to reproduce errors. My subversion.conf and
subversion cache was growing huge from trying to reproduce stuff
otherwise. :-)

I did try to reproduce this on my laptop just now, and failed (with
and without setting the UUID). I'll try and do some more
investigation on my end after I get back from my short vacation.

Thanks for looking at it though!

-John

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

Hi John,

On Sun, 2010-08-01 at 11:13 +0000, John Szakmeister wrote:
> On Sat, Jul 31, 2010 at 10:59 PM, Jelmer Vernooij
> <email address hidden> wrote:
> > This is caused by the fact that you're reusing the same UUID for
> > multiple repositories that have different contents. bzr-svn requires a
> > repository to have a proper UUID since it uses that as the key to find
> > its cache.
> >
> > It could probably be a bit more proactive in detecting when the user is
> > using a broken cache and warn them.
>
> I'm not sure I understand. It's nuking the cache (well, at least it
> does on my Mac... it probably located elsewhere on your system). I
> only have it setting the UUID so that I can easily spot it and remove
> it after trying to reproduce errors. My subversion.conf and
> subversion cache was growing huge from trying to reproduce stuff
> otherwise. :-)
>
> I did try to reproduce this on my laptop just now, and failed (with
> and without setting the UUID). I'll try and do some more
> investigation on my end after I get back from my short vacation.

> Thanks for looking at it though!
In that case I'm not able to reproduce it anymore locally. Hopefully
that means you also won't be able to with newer versions of bzr-svn.

Enjoy your vacation!

Cheers,

Jelmer

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
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

Bug attachments

Remote bug watches

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