Self-bound checkouts errors with infinite recursion in _get_nick

Bug #405192 reported by Craig Hewetson
78
This bug affects 9 people
Affects Status Importance Assigned to Milestone
Bazaar
Fix Released
Medium
Parth Malwankar

Bug Description

I'm trying to commit changes on a checkout. The following error occurs:

....
  File "/usr/lib/python2.6/dist-packages/bzrlib/branch.py", line 236, in _get_nick
    return master.nick
  File "/usr/lib/python2.6/dist-packages/bzrlib/branch.py", line 233, in _get_nick
    master = self.get_master_branch(possible_transports)
  File "/usr/lib/python2.6/dist-packages/bzrlib/decorators.py", line 138, in read_locked
    result = unbound(self, *args, **kwargs)
  File "/usr/lib/python2.6/dist-packages/bzrlib/branch.py", line 2334, in get_master_branch
    possible_transports=possible_transports)
  File "/usr/lib/python2.6/dist-packages/bzrlib/branch.py", line 160, in open
    return control.open_branch(_unsupported)
  File "/usr/lib/python2.6/dist-packages/bzrlib/bzrdir.py", line 1712, in open_branch
    return format.open(self, _found=True, ignore_fallbacks=ignore_fallbacks)
  File "/usr/lib/python2.6/dist-packages/bzrlib/branch.py", line 1756, in open
    _repository=a_bzrdir.find_repository(),
  File "/usr/lib/python2.6/dist-packages/bzrlib/bzrdir.py", line 675, in find_repository
    found_repo = self._find_containing(usable_repository)
  File "/usr/lib/python2.6/dist-packages/bzrlib/bzrdir.py", line 641, in _find_containing
    result, stop = evaluate(found_bzrdir)
  File "/usr/lib/python2.6/dist-packages/bzrlib/bzrdir.py", line 665, in usable_repository
    repository = found_bzrdir.open_repository()
  File "/usr/lib/python2.6/dist-packages/bzrlib/bzrdir.py", line 1719, in open_repository
    return format.open(self, _found=True)
  File "/usr/lib/python2.6/dist-packages/bzrlib/repofmt/pack_repo.py", line 2534, in open
    _serializer=self._serializer)
  File "/usr/lib/python2.6/dist-packages/bzrlib/repofmt/pack_repo.py", line 2145, in __init__
    index_transport = self._transport.clone('indices')
  File "/usr/lib/python2.6/dist-packages/bzrlib/transport/local.py", line 86, in clone
    abspath = self.abspath(offset)
  File "/usr/lib/python2.6/dist-packages/bzrlib/transport/local.py", line 111, in abspath
    self._local_base, urlutils.unescape(relpath)))
  File "/usr/lib/python2.6/dist-packages/bzrlib/urlutils.py", line 532, in unescape
    unquoted = urllib.unquote(url)
  File "/usr/lib/python2.6/urllib.py", line 1169, in unquote
    for i in xrange(1, len(res)):
RuntimeError: maximum recursion depth exceeded while calling a Python object

bzr 1.17 on python 2.6.2 (linux2)
arguments: ['/usr/bin/bzr', 'qsubprocess', '"commit" "-m" "comment" "src/AWS/StoragePlugin/src/com/vastech/ngmc/rcp/storage/strings.properties" "build.py"']
encoding: 'UTF-8', fsenc: 'UTF-8', lang: 'en_ZA.UTF-8'
plugins:
  bzrtools /usr/lib/python2.6/dist-packages/bzrlib/plugins/bzrtools [1.17]
  explorer /home/craig/.bazaar/plugins/explorer [0.6dev]
  extmerge /home/craig/.bazaar/plugins/extmerge [unknown]
  launchpad /usr/lib/python2.6/dist-packages/bzrlib/plugins/launchpad [1.17]
  netrc_credential_store /usr/lib/python2.6/dist-packages/bzrlib/plugins/netrc_credential_store [1.17]
  qbzr /home/craig/.bazaar/plugins/qbzr [0.13dev]
  search /home/craig/.bazaar/plugins/search [1.7dev]
  xmloutput /home/craig/.bazaar/plugins/xmloutput [0.8.4]
*** Bazaar has encountered an internal error.
    Please report a bug at https://bugs.launchpad.net/bzr/+filebug
    including this traceback, and a description of what you
    were doing when the error occurred.

Tags: easy bound

Related branches

Revision history for this message
Craig Hewetson (craighewetson-deactivatedaccount) wrote :

had to unbind the checkout and do commit and push to get the changes to server.

Revision history for this message
Robert Collins (lifeless) wrote : Re: [Bug 405192] [NEW] Commit fails on recusive error

Was that the entire stack trace? If so, sounds like a corner case in url
processing - what was the url to your bound branch, was it relative or
absolute?

-Rob

Revision history for this message
Craig Hewetson (craighewetson-deactivatedaccount) wrote : Re: Commit fails on recusive error

Ok this isn't as serious as it may seem. I have a build script that went wrong and exposed this.

It created a directory within a checkout, called "build".
It then copied files that are under version control into it.
Then it runs "bzr bind .." (in this build dir, but this build dir doesn't have its own ".bzr" directory) and therefore it affected the .bzr directory in the checkout.

Directory structure:

<CheckoutOfProject>
            <.bzr>
            <src>
            <build>
                       <src> // this was copied from the above src dir and "bzr bind .." was called in here

The I continued with development and did a commit in the checkout which then gave me the above stack trace.

----------------------------------

To answer your questions:
This isn't the entire stack trace, but it doesn't change because of the recursive printouts.
The url of checkout was supposed to be bzr://guiteam/shared/aws-do, but after running that bzr bind .. in a subdirectory it changed the checkout to:
(running bzr info)

Checkout (format: pack-0.92)
Location:
  branch root: .

Related branches:
    push branch: bzr://guiteam/members/craig/aws-do/
  submit branch: /home/craig/projects/vastech/ngmc/dev

It would look like this:
Checkout (format: pack-0.92)
Location:
       checkout root: .
  checkout of branch: bzr://guiteam/shared/aws-do/

Related branches:
    push branch: bzr://guiteam/members/craig/aws-do/
  submit branch: /home/craig/projects/vastech/ngmc/dev

Vincent Ladeuil (vila)
Changed in bzr:
status: New → Confirmed
importance: Undecided → Medium
summary: - Commit fails on recusive error
+ Self-bound checkouts errors with infinite recursion
Martin Pool (mbp)
summary: - Self-bound checkouts errors with infinite recursion
+ Self-bound checkouts errors with infinite recursion in _get_nick
tags: added: bound
Martin Pool (mbp)
tags: added: easy
Parth Malwankar (parthm)
Changed in bzr:
status: Confirmed → In Progress
assignee: nobody → Parth Malwankar (parthm)
Parth Malwankar (parthm)
Changed in bzr:
milestone: none → 2.2.0
status: In Progress → Fix Released
Revision history for this message
Mustafa Rawi (mrawi2) wrote :
Download full text (49.5 KiB)

Occured while switching a checkout to a branch.

bzr: ERROR: exceptions.RuntimeError: maximum recursion depth exceeded while calling a Python object

Traceback (most recent call last):
  File "bzrlib\commands.pyo", line 930, in exception_to_return_code
  File "bzrlib\commands.pyo", line 1141, in run_bzr
  File "bzrlib\commands.pyo", line 673, in run_argv_aliases
  File "bzrlib\commands.pyo", line 697, in run
  File "bzrlib\cleanup.pyo", line 136, in run_simple
  File "bzrlib\cleanup.pyo", line 166, in _do_with_cleanups
  File "C:/Program Files (x86)/Bazaar/plugins\qbzr\lib\commands.py", line 826, in run
  File "C:/Program Files (x86)/Bazaar/plugins\qbzr\lib\subprocess.py", line 1011, in run_subprocess_command
  File "bzrlib\commands.pyo", line 1141, in run_bzr
  File "C:/Program Files (x86)/Bazaar/plugins\loom\commands.py", line 261, in run_argv_aliases
  File "bzrlib\commands.pyo", line 673, in run_argv_aliases
  File "bzrlib\commands.pyo", line 697, in run
  File "bzrlib\cleanup.pyo", line 136, in run_simple
  File "bzrlib\cleanup.pyo", line 166, in _do_with_cleanups
  File "bzrlib\builtins.pyo", line 6243, in run
  File "bzrlib\switch.pyo", line 50, in switch
  File "bzrlib\switch.pyo", line 127, in _set_branch_location
  File "bzrlib\bzrdir.pyo", line 944, in set_branch_reference
  File "bzrlib\branch.pyo", line 2269, in initialize
  File "bzrlib\branch.pyo", line 2312, in open
  File "bzrlib\bzrdir.pyo", line 1078, in open_branch
  File "bzrlib\branch.pyo", line 2312, in open
  File "bzrlib\bzrdir.pyo", line 1078, in open_branch
  File "bzrlib\branch.pyo", line 2312, in open
  File "bzrlib\bzrdir.pyo", line 1078, in open_branch
  File "bzrlib\branch.pyo", line 2312, in open
  File "bzrlib\bzrdir.pyo", line 1078, in open_branch
  File "bzrlib\branch.pyo", line 2312, in open
  File "bzrlib\bzrdir.pyo", line 1078, in open_branch
  File "bzrlib\branch.pyo", line 2312, in open
  File "bzrlib\bzrdir.pyo", line 1078, in open_branch
  File "bzrlib\branch.pyo", line 2312, in open
  File "bzrlib\bzrdir.pyo", line 1078, in open_branch
  File "bzrlib\branch.pyo", line 2312, in open
  File "bzrlib\bzrdir.pyo", line 1078, in open_branch
  File "bzrlib\branch.pyo", line 2312, in open
  File "bzrlib\bzrdir.pyo", line 1078, in open_branch
  File "bzrlib\branch.pyo", line 2312, in open
  File "bzrlib\bzrdir.pyo", line 1078, in open_branch
  File "bzrlib\branch.pyo", line 2312, in open
  File "bzrlib\bzrdir.pyo", line 1078, in open_branch
  File "bzrlib\branch.pyo", line 2312, in open
  File "bzrlib\bzrdir.pyo", line 1078, in open_branch
  File "bzrlib\branch.pyo", line 2312, in open
  File "bzrlib\bzrdir.pyo", line 1078, in open_branch
  File "bzrlib\branch.pyo", line 2312, in open
  File "bzrlib\bzrdir.pyo", line 1078, in open_branch
  File "bzrlib\branch.pyo", line 2312, in open
  File "bzrlib\bzrdir.pyo", line 1078, in open_branch
  File "bzrlib\branch.pyo", line 2312, in open
  File "bzrlib\bzrdir.pyo", line 1078, in open_branch
  File "bzrlib\branch.pyo", line 2312, in open
  File "bzrlib\bzrdir.pyo", line 1078, in open_branch
  File "bzrlib\branch.pyo", line 2312, in open
  File "bzrlib\bzrdir.pyo", line 1078, in open_branch
  File "bzrlib\branch.py...

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.