[bug] RepoFetcher run between the same location

Bug #151027 reported by John A Meinel
2
Affects Status Importance Assigned to Milestone
Bazaar
Invalid
Low
Unassigned

Bug Description

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

I just did this:

cd bzr.dev
bzr up

And in another terminal I did

bzr branch bzr.dev test-branch

And I got:
bzr: ERROR: RepoFetcher run between two objects at the same location:
KnitRepository('file:///home/jameinel/dev/bzr/.bzr/') and
KnitRepository('file:///home/jameinel/dev/bzr/.bzr/')

What happened was the second command waited for the first to finish
(because it wanted to grab a write-lock on a repository). And somewhere
in all of that timing, it didn't realize that they were the same repository.

I don't know how it got the idea that they were different repositories,
or that it didn't have the revision it cared about. (It seems like it
locked for read, and didn't find the revision, so it tried to push it
later.)

John
=:->

  affects bzr
  status triaged
  importance low
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFHC8RMJdeBCYSNAAMRAqCmAJ9fk60u0sI6ihcvqADdvBHzZq6q6ACfYtiq
9gEePTc5vXnKDdeB8W2TkWQ=
=Lvb+
-----END PGP SIGNATURE-----

Revision history for this message
Robert Collins (lifeless) wrote : Re: [Bug 151027] [bug] RepoFetcher run between the same location

On Tue, 2007-10-09 at 18:11 +0000, John A Meinel wrote:
> Public bug reported:
>
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> I just did this:
>
> cd bzr.dev
> bzr up
>
> And in another terminal I did
>
> bzr branch bzr.dev test-branch
>
> And I got:
> bzr: ERROR: RepoFetcher run between two objects at the same location:
> KnitRepository('file:///home/jameinel/dev/bzr/.bzr/') and
> KnitRepository('file:///home/jameinel/dev/bzr/.bzr/')
>
> What happened was the second command waited for the first to finish
> (because it wanted to grab a write-lock on a repository). And somewhere
> in all of that timing, it didn't realize that they were the same repository.
>
> I don't know how it got the idea that they were different repositories,
> or that it didn't have the revision it cared about. (It seems like it
> locked for read, and didn't find the revision, so it tried to push it
> later.)

This assert is meant to only be triggered if someone failed to check for
has_same_location in Repository.fetch, or is incorrectly using the
RepoFetcher api directly.

Did you get a backtrace?

-Rob
--
GPG key available at: <http://www.robertcollins.net/keys.txt>.

Revision history for this message
John A Meinel (jameinel) wrote :

I didn't get one on the terminal, but here is the one from ~/.bzr.log

Using fetch logic to copy between KnitRepository('file:///home/jameinel/dev/bzr/.bzr/')(<RepositoryFormatKnit1>) and KnitRepository('file:///home/jameinel/dev/bzr/.bzr/')(<RepositoryFormatKnit1>)
Traceback (most recent call last):
  File "/home/jameinel/dev/bzr/bzr.dev/bzrlib/commands.py", line 802, in run_bzr_catch_errors
    return run_bzr(argv)
  File "/home/jameinel/dev/bzr/bzr.dev/bzrlib/commands.py", line 758, in run_bzr
    ret = run(*run_argv)
  File "/home/jameinel/dev/bzr/bzr.dev/bzrlib/commands.py", line 492, in run_argv_aliases
    return self.run(**all_cmd_args)
  File "/home/jameinel/dev/bzr/bzr.dev/bzrlib/builtins.py", line 895, in run
    except errors.NoSuchRevision:
  File "/home/jameinel/dev/bzr/bzr.dev/bzrlib/bzrdir.py", line 828, in sprout
    result_repo.fetch(source_repository, revision_id=revision_id)
  File "/home/jameinel/dev/bzr/bzr.dev/bzrlib/repository.py", line 712, in fetch
    :param revid: The revision id to gather statistics from, if None, then
  File "/home/jameinel/dev/bzr/bzr.dev/bzrlib/decorators.py", line 165, in write_locked
    return unbound(self, *args, **kwargs)
  File "/home/jameinel/dev/bzr/bzr.dev/bzrlib/repository.py", line 2090, in fetch
    mutter("Using fetch logic to copy between %s(%s) and %s(%s)",
  File "/home/jameinel/dev/bzr/bzr.dev/bzrlib/fetch.py", line 86, in __init__
    '%r and %r' % (to_repository, from_repository))
BzrError: RepoFetcher run between two objects at the same location: KnitRepository('file:///home/jameinel/dev/bzr/.bzr/') and KnitRepository('file:///home/jameinel/dev/bzr/.bzr/')

Revision history for this message
John A Meinel (jameinel) wrote :

I just realized that there could have been an import timing issue.

In that I was updating 'bzr.dev', and using bzr.dev to create a new branch.

So it is possible that the "fetch.py" code hadn't been imported until after the "bzr update" was finished, but by then the supporting code had already been run (repository.py).

I realized this because some of the lines are obviously wrong (look at "line 712, in fetch") clearly it isn't supposed to be a docstring. So obviously some stuff changed while it was running.

Revision history for this message
John A Meinel (jameinel) wrote :

I'm going to chalk this one up to just a transient error while the code was updating.

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