bzr pull/branch shows "Error received from smart server: ('NoSuchRevision',)"

Bug #360791 reported by Andrew Bennetts
22
This bug affects 3 people
Affects Status Importance Assigned to Milestone
Bazaar
Fix Released
Critical
Robert Collins
1.14
Won't Fix
Critical
Unassigned
Launchpad itself
Fix Released
Critical
Unassigned
bzr (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

Workarounds
-----------
* pull/branch from the stacked on branch [into the same repository/branch], then try the pull/branch from the branch that reported the error.
* use nosmart+ before the url of the branch you are pulling/branching from

Details
-------

This is a server side bug. A cross-check for 'what revisions to send' was being triggered in a situation where clients have to accept partial data anyway. The cross check existed before stacking was added to the code base.

Resolution
----------

The cross check has been disabled for the streaming fetch method. To prevent this occuring on a given branch, upgrade the bzr on the server to contain the fix (either by cherrypicking r4342 from bzr.dev, runnng bzr.dev, or when 1.15 is available running 1.15).

Example traceback
-----------------

stewart@willster:~/drizzle$ bzr branch lp:~eday/drizzle/eday-dev
bzr: ERROR: bzrlib.errors.ErrorFromSmartServer: Error received from smart server: ('NoSuchRevision',)
...
  File "/home/stewart/lib/python/bzrlib/remote.py", line 1706, in _get_stream
    (path, self.to_format.network_name()), search_bytes)
  File "/home/stewart/lib/python/bzrlib/remote.py", line 71, in _call_with_body_bytes_expecting_body
    self._translate_error(err, **err_context)
  File "/home/stewart/lib/python/bzrlib/remote.py", line 688, in _translate_error
    self.bzrdir._translate_error(err, repository=self, **context)
  File "/home/stewart/lib/python/bzrlib/remote.py", line 129, in _translate_error
    _translate_error(err, bzrdir=self, **context)
  File "/home/stewart/lib/python/bzrlib/remote.py", line 2497, in _translate_error
    raise NoSuchRevision(find('branch'), err.error_args[0])
  File "/home/stewart/lib/python/bzrlib/remote.py", line 2481, in find
    raise err
ErrorFromSmartServer: Error received from smart server: ('NoSuchRevision',)

Revision history for this message
Māris Fogels (mars) wrote :

Andrew, I had this specific issue, with the 'NoSuchRevision' traceback in 1.14rc1.

I tried your first suggested workaround: I updated trunk, and tried branching again, but using a bzr+ssh:// url (lp:~mars/....). That caused bug 354036, 'AbsentContentFactory', to occur.

Next, I tried pulling from the sftp:// url, which worked perfectly.

So, pulling trunk/, and branching from the sftp:// URL should serve as a workaround for both this and bug 354036, without having to downgrade bzr.

Andrew Bennetts (spiv)
Changed in bzr:
assignee: nobody → Andrew Bennetts (spiv)
importance: Undecided → High
milestone: none → 1.15rc1
Revision history for this message
Björn Tillenius (bjornt) wrote : Re: [Bug 367631] Re: Branching a stacked branch from Launchpad gives ErrorFromSmartServer: Error received from smart server: ('NoSuchRevision', )

On Thu, Apr 30, 2009 at 12:54:16AM -0000, Andrew Bennetts wrote:
> *** This bug is a duplicate of bug 360791 ***
> https://bugs.launchpad.net/bugs/360791
>
> Bjorn: which error? This bug report is confusing, as several distinct
> issues have been mentioned.

I was referring to the NoRevisionError that Tim got. Here's the
traceback I got:

    https://bugs.edge.launchpad.net/bzr/+bug/360791

It certainly sounds like bug 360791, since I getting this error on my
laptop, where it worked fine on my desktop (which had an up to date copy
of the stacked-on branch in the repo).

Revision history for this message
Martin Albisetti (beuno) wrote : Re: get_stream on stacked branch causes "Error received from smart server: ('NoSuchRevision',)"

Again, bumping to critical as we continue to create broken branches with bzr.dev

Changed in bzr:
importance: High → Critical
status: New → Triaged
Revision history for this message
Robert Collins (lifeless) wrote : Re: [Bug 360791] Re: get_stream on stacked branch causes "Error received from smart server: ('NoSuchRevision', )"

On Mon, 2009-05-04 at 18:56 +0000, Martin Albisetti wrote:
> Again, bumping to critical as we continue to create broken branches with
> bzr.dev

Beuno, this isn't a broken branch bug, and there is a workaround in
place already (which there isn't for the ghost variation of same). See
the workaround notes in the description.

-Rob

Revision history for this message
Martin Albisetti (beuno) wrote : Re: get_stream on stacked branch causes "Error received from smart server: ('NoSuchRevision',)"

I see. It's still a show-stopper for anyone using stacked branches, so I still think it should be treated as critical.
Considering this piles up on top of the 1.13 AbsentContentFactory, the fact that there's a workaround doesn't make up for the fact that stacked branches have been broken for a month and a half or two.
Yes, I'm being overly annoying and exagerated, but the issue has been very disruptive for any heavy users of launchpad and bzr.

Revision history for this message
Robert Collins (lifeless) wrote : Re: [Bug 360791] Re: get_stream on stacked branch causes "Error received from smart server: ('NoSuchRevision', )"

On Mon, 2009-05-04 at 22:25 +0000, Martin Albisetti wrote:
> I see. It's still a show-stopper for anyone using stacked branches, so
> I still think it should be treated as critical.

Indeed, and you'll note neither Martin Pool nor I have disagreed and
changed the importance field.

> Considering this piles up on top of the 1.13 AbsentContentFactory, the
> fact that there's a workaround doesn't make up for the fact that
> stacked branches have been broken for a month and a half or two.

For users of released bzr's they have been broken for 4 days, and only
by this bug. bzr 1.14 is the first bzr to suffer streaming issues with
stacked branches, and it was released May 1st.

> Yes, I'm being overly annoying and exagerated, but the issue has been
> very disruptive for any heavy users of launchpad and bzr.

For folk running *beta releases or trunk*, yes. But people use that to
help us find issues, and should know how to drop back to a released
version.

We're working hard to fix the issues, and as I note, users using
released bzr's have the bugfix for the ACF bug (which 1.13 doesn't
suffer, as it doesn't stream from stacked branches, and *all* bzr's
before 1.13.2 create the situation for it, if you want to measure by
that standard,measure since 1.6).

-Rob

tags: added: hpss
description: updated
Revision history for this message
Robert Collins (lifeless) wrote : Re: [Bug 360791] [NEW] get_stream on stacked branch causes "Error received from smart server: ('NoSuchRevision', )"

    def test_stacked_pull_more_than_stacking_has_bug_360791(self):
        # When pulling some fixed amount of content that is more than
the
        # source has (because some is coming from a fallback branch, no
error
        # should be received. This was reported as bug 360791.
        # Need three branches: a trunk, a stacked branch, and a
preexisting
        # branch pulling content from stacked and trunk.
        self.setup_smart_server_with_call_log()
        trunk = self.make_branch_and_tree('trunk',
format="1.9-rich-root")
        r1 = trunk.commit('start')
        stacked_branch = trunk.branch.create_clone_on_transport(
            self.get_transport('stacked'), stacked_on=trunk.branch.base)
        local = self.make_branch('local', format='1.9-rich-root')
 local.pull(stacked_branch) #boom

Revision history for this message
Robert Collins (lifeless) wrote : Re: get_stream on stacked branch causes "Error received from smart server: ('NoSuchRevision',)"

This fix once reviewed in bzr land should be cherrypicked onto the lp production bzr server - its a server side fix.

Changed in launchpad-code:
importance: Undecided → Critical
status: New → Confirmed
Changed in bzr:
assignee: Andrew Bennetts (spiv) → Robert Collins (lifeless)
status: Triaged → Fix Committed
tags: added: lp-cherrypick-candidate
tags: added: lp-cp
removed: lp-cherrypick-candidate
description: updated
tags: added: lp-needs
removed: lp-cp
summary: - get_stream on stacked branch causes "Error received from smart server:
+ bzr pull/branch shows "Error received from smart server:
('NoSuchRevision',)"
Revision history for this message
Robert Collins (lifeless) wrote :

r4342 in trunk has this.

Changed in bzr:
status: Fix Committed → Fix Released
description: updated
Revision history for this message
Robert Collins (lifeless) wrote :

This should be backported to jaunty's bzr too.

Changed in launchpad-code:
status: Confirmed → Fix Committed
Paul Hummer (rockstar)
Changed in launchpad-code:
milestone: none → 2.2.5
status: Fix Committed → Fix Released
Revision history for this message
Martin Pool (mbp) wrote :

Won't fix in the 1.14 series, fixed in 1.15

Jelmer Vernooij (jelmer)
Changed in bzr (Ubuntu):
status: New → 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

Remote bug watches

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