Infinite recursion when pushing to a branch stacked on itself

Bug #683307 reported by Nathan Dotz
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Bazaar
Confirmed
Undecided
Unassigned

Bug Description

I get this problem intermittently.
I attempt to do a standard push into one of my launchpad branches, then bzr appears to "work" for a period of time, before crash in this glorious pile of stack trace:

bzr: failed to report crash using apport:
     OSError(13, 'Permission denied')
bzr: ERROR: exceptions.RuntimeError: maximum recursion depth exceeded

bzr: failed to report crash using apport:
     OSError(13, 'Permission denied')
bzr: ERROR: exceptions.RuntimeError: maximum recursion depth exceeded

Traceback (most recent call last):
  File "/usr/lib/python2.6/dist-packages/bzrlib/commands.py", line 912, in exception_to_return_code
    return the_callable(*args, **kwargs)
  File "/usr/lib/python2.6/dist-packages/bzrlib/commands.py", line 1112, in run_bzr
Traceback (most recent call last):
  File "/usr/lib/python2.6/dist-packages/bzrlib/commands.py", line 912, in exception_to_return_code
    return the_callable(*args, **kwargs)
  File "/usr/lib/python2.6/dist-packages/bzrlib/commands.py", line 1112, in run_bzr
    ret = run(*run_argv)
    ret = run(*run_argv)
  File "/usr/lib/python2.6/dist-packages/bzrlib/commands.py", line 690, in run_argv_aliases
  File "/usr/lib/python2.6/dist-packages/bzrlib/commands.py", line 690, in run_argv_aliases
    return self.run(**all_cmd_args)
  File "/usr/lib/python2.6/dist-packages/bzrlib/commands.py", line 705, in run
    return self.run(**all_cmd_args)

(snip tons of recursion... log included)

  File "/usr/lib/python2.6/dist-packages/bzrlib/smart/medium.py", line 176, in _report_activity
  File "/usr/lib/python2.6/dist-packages/bzrlib/smart/medium.py", line 176, in _report_activity
    ui.ui_factory.report_transport_activity(self, bytes, direction)
    ui.ui_factory.report_transport_activity(self, bytes, direction)
RuntimeError: maximum recursion depth exceeded
RuntimeError: maximum recursion depth exceeded

bzr 2.2.1 on python 2.6.6 (Linux-2.6.35-23-generic-x86_64-with-Ubuntu-10.10-maverick)
bzr 2.2.1 on python 2.6.6 (Linux-2.6.35-23-generic-x86_64-with-Ubuntu-10.10-maverick)
arguments: ['/usr/bin/bzr', 'push', 'lp:~sleepynate/tart/tart-sleepynate']
arguments: ['/usr/bin/bzr', 'push', 'lp:~sleepynate/tart/tart-sleepynate']
encoding: 'UTF-8', fsenc: 'UTF-8', lang: 'en_US.utf8'
plugins:
encoding: 'UTF-8', fsenc: 'UTF-8', lang: 'en_US.utf8'
plugins:
  bash_completion /usr/lib/python2.6/dist-packages/bzrlib/plugins/bash_completion [2.2.1]
  bzrtools /usr/lib/python2.6/dist-packages/bzrlib/plugins/bzrtools [2.2.0]
  extmerge /home/nate/.bazaar/plugins/extmerge [unknown]
  launchpad /usr/lib/python2.6/dist-packages/bzrlib/plugins/launchpad [2.2.1]
  netrc_credential_store /usr/lib/python2.6/dist-packages/bzrlib/plugins/netrc_credential_store [2.2.1]
  news_merge /usr/lib/python2.6/dist-packages/bzrlib/plugins/news_merge [2.2.1]
  qbzr /usr/lib/python2.6/dist-packages/bzrlib/plugins/qbzr [0.19.1]

*** 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.
  bash_completion /usr/lib/python2.6/dist-packages/bzrlib/plugins/bash_completion [2.2.1]
  bzrtools /usr/lib/python2.6/dist-packages/bzrlib/plugins/bzrtools [2.2.0]
  extmerge /home/nate/.bazaar/plugins/extmerge [unknown]
  launchpad /usr/lib/python2.6/dist-packages/bzrlib/plugins/launchpad [2.2.1]
  netrc_credential_store /usr/lib/python2.6/dist-packages/bzrlib/plugins/netrc_credential_store [2.2.1]
  news_merge /usr/lib/python2.6/dist-packages/bzrlib/plugins/news_merge [2.2.1]
  qbzr /usr/lib/python2.6/dist-packages/bzrlib/plugins/qbzr [0.19.1]

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

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

This is because of a branch being configured to be stacked on itself, which shouldn't happen, but we seem to be getting this reported a few times recently.

Specifically, ~sleepynate/tart/tart-sleepynate is stacked on ~andreesie/tart/vanilla, which is stacked on ~andreesie/tart/vanilla.

So really it is ~andreesie/tart/vanilla which is broken, but anything stacked on it will also be broken. You can see this by inspecting the branch.conf files:
http://bazaar.launchpad.net/~sleepynate/tart/tart-sleepynate/.bzr/branch/branch.conf
http://bazaar.launchpad.net/~andreesie/tart/vanilla/.bzr/branch/branch.conf

I'm not really sure how we got this situation, but I wonder about the recent changes to "lp:foo" resolution. lp:foo use to resolve to .../~user/foo/branch, but now it resolves to /+branch/foo.

I'm suspecting that, because I see the parent pointers in both cases are:
parent_location = ../../../%2Bbranch/tart/

For starters, that is usually only set by something like "bzr branch lp:X lp:Y".

However, if lp:tart == lp:~andreesie/tart/vanilla, I don't see how you could branch something into itself.

Perhaps lp:tart got pointed to a new branch at some point? Such as doing:

 bzr branch lp:tart lp:~andreesie/tart/vanilla

And then going to Launchpad and changing the development focus.

However, that wouldn't explain how lp:~andreesie/tart/vanilla would get stacked on itself.

Now, if lp:~andreesie/tart/vanilla was told to stack on top of /+branch/tart, which then got expanded late, that might cause this problem. If we have code that checked "if stacking_location == this_location" that check might fail to notice that +branch/tart is the same as ~andreesie/tart/vanilla.

Revision history for this message
Nathan Dotz (sleepynate) wrote :

Perhaps it's my git-using tendency making me bzr-dumb, but what I believe I did was register a new branch of tart as tart-sleepynate on LP, pull it locally, then change the remote origin (parent_location) to bzr+ssh://bazaar.launchpad.net/%2Bbranch/tart/

Amusingly enough, this worked for quite a while without incident.

Whether this is correct, I have no idea, but this is something I'd normally do in git when creating a tracking branch. Either way, I imagine there'd be a sanity-check involved to prevent infinite recursion.

Vincent Ladeuil (vila)
Changed in bzr:
status: New → Confirmed
summary: - Bazaar crashes on push
+ Infinite recursion when pushing to a branch stacked on itself
Jelmer Vernooij (jelmer)
tags: added: check-for-breezy
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.