Fails to merge a stacked-on branch

Bug #413291 reported by Dimitri John Ledkov
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Bazaar
Invalid
Undecided
Unassigned

Bug Description

It looks like Bug #354036 in bzr but:

1) I can only trigger it with bzr-builder
2) The above bug is marked fixed in 1.14
3) I'm running nightly bzr and branches where created recently

I really hope that I did not create corner case branches for the #354036 cause that bug is a nasty beast by the looks of it =(

Steps to reproduce:

$ cat xiphos.hardy
# bzr-builder format 0.1 deb-version 3.1.1+{time}-0ubuntu0~bzr{revno}~8.04
lp:xiphos
merge series lp:~dmitrij.ledkov/xiphos/hardy

$ bzr dailydeb xiphos.hardy
bzr: ERROR: bzrlib.errors.ErrorFromSmartServer: Error received from smart server: ('error', "'AbsentContentFactory' object has no attribute 'get_bytes_as'")

Traceback (most recent call last):
  File "/usr/lib/python2.6/dist-packages/bzrlib/commands.py", line 835, in exception_to_return_code
    return the_callable(*args, **kwargs)
  File "/usr/lib/python2.6/dist-packages/bzrlib/commands.py", line 1030, in run_bzr
    ret = run(*run_argv)
  File "/usr/lib/python2.6/dist-packages/bzrlib/commands.py", line 647, in run_argv_aliases
    return self.run(**all_cmd_args)
  File "/home/dmitrij/.bazaar/plugins/builder/__init__.py", line 272, in run
    build_tree(base_branch, package_dir)
  File "/home/dmitrij/.bazaar/plugins/builder/recipe.py", line 321, in build_tree
    merge_branch(child_branch, tree_to, br_to)
  File "/home/dmitrij/.bazaar/plugins/builder/recipe.py", line 160, in merge_branch
    other_branch=merge_from, tree_branch=br_to)
  File "/usr/lib/python2.6/dist-packages/bzrlib/merge.py", line 204, in from_revision_ids
    merger.set_other_revision(other, other_branch)
  File "/usr/lib/python2.6/dist-packages/bzrlib/merge.py", line 343, in set_other_revision
    self._maybe_fetch(other_branch, self.this_branch, self.other_rev_id)
  File "/usr/lib/python2.6/dist-packages/bzrlib/merge.py", line 360, in _maybe_fetch
    target.fetch(source, revision_id)
  File "/usr/lib/python2.6/dist-packages/bzrlib/decorators.py", line 192, in write_locked
    result = unbound(self, *args, **kwargs)
  File "/usr/lib/python2.6/dist-packages/bzrlib/branch.py", line 574, in fetch
    pb=pb)
  File "/usr/lib/python2.6/dist-packages/bzrlib/repository.py", line 1679, in fetch
    find_ghosts=find_ghosts, fetch_spec=fetch_spec)
  File "/usr/lib/python2.6/dist-packages/bzrlib/decorators.py", line 192, in write_locked
    result = unbound(self, *args, **kwargs)
  File "/usr/lib/python2.6/dist-packages/bzrlib/repository.py", line 3356, in fetch
    pb=pb, find_ghosts=find_ghosts)
  File "/usr/lib/python2.6/dist-packages/bzrlib/fetch.py", line 76, in __init__
    self.__fetch()
  File "/usr/lib/python2.6/dist-packages/bzrlib/fetch.py", line 102, in __fetch
    self._fetch_everything_for_search(search)
  File "/usr/lib/python2.6/dist-packages/bzrlib/fetch.py", line 130, in _fetch_everything_for_search
    stream, from_format, [])
  File "/usr/lib/python2.6/dist-packages/bzrlib/repository.py", line 4136, in insert_stream
    return self._locked_insert_stream(stream, src_format, is_resume)
  File "/usr/lib/python2.6/dist-packages/bzrlib/repository.py", line 4165, in _locked_insert_stream
    for substream_type, substream in stream:
  File "/usr/lib/python2.6/dist-packages/bzrlib/remote.py", line 1821, in missing_parents_chain
    for kind, substream in stream:
  File "/usr/lib/python2.6/dist-packages/bzrlib/smart/repository.py", line 491, in record_stream
    for bytes in byte_stream:
  File "/usr/lib/python2.6/dist-packages/bzrlib/smart/message.py", line 338, in read_streamed_body
    _translate_error(self._body_error_args)
  File "/usr/lib/python2.6/dist-packages/bzrlib/smart/message.py", line 361, in _translate_error
    raise errors.ErrorFromSmartServer(error_tuple)
ErrorFromSmartServer: Error received from smart server: ('error', "'AbsentContentFactory' object has no attribute 'get_bytes_as'")

bzr 2.0dev on python 2.6.2 (linux2)
arguments: ['/usr/bin/bzr', 'dailydeb', 'xiphos.hardy']
encoding: 'UTF-8', fsenc: 'UTF-8', lang: 'en_GB.UTF-8'
plugins:
  builddeb /home/dmitrij/.bazaar/plugins/builddeb [2.1.1dev]
  builder /home/dmitrij/.bazaar/plugins/builder [unknown]
  bzrtools /home/dmitrij/.bazaar/plugins/bzrtools [2.0]
  diffstat /home/dmitrij/.bazaar/plugins/diffstat [0.2]
  extmerge /home/dmitrij/.bazaar/plugins/extmerge [unknown]
  hg /home/dmitrij/.bazaar/plugins/hg [0.1dev]
  keywords /home/dmitrij/.bazaar/plugins/keywords [unknown]
  launchpad /usr/lib/python2.6/dist-packages/bzrlib/plugins/launchpad [2.0dev]
  netrc_credential_store /usr/lib/python2.6/dist-packages/bzrlib/plugins/netrc_credential_store [2.0dev]
  pipeline /home/dmitrij/.bazaar/plugins/pipeline [unknown]
  rebase /home/dmitrij/.bazaar/plugins/rebase [0.5.4dev]
  svn /home/dmitrij/.bazaar/plugins/svn [0.6.5dev]
*** 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.

Revision history for this message
James Westby (james-w) wrote : Re: [Bug 413291] [NEW] Fails to merge a stacked-on branch

Dmitrijs Ledkovs wrote:
> Public bug reported:
>
> It looks like Bug #354036 in bzr but:
>
> 1) I can only trigger it with bzr-builder
> 2) The above bug is marked fixed in 1.14
> 3) I'm running nightly bzr and branches where created recently
>
> I really hope that I did not create corner case branches for the #354036
> cause that bug is a nasty beast by the looks of it =(

Ouch. I think this is a bzr bug. We create a stacked branch and then
merge in to it.

I will try and find a reproducer with just bzr.

Thanks,

James

Revision history for this message
James Westby (james-w) wrote :

James Westby wrote:
> Dmitrijs Ledkovs wrote:
>> Public bug reported:
>>
>> It looks like Bug #354036 in bzr but:
>>
>> 1) I can only trigger it with bzr-builder
>> 2) The above bug is marked fixed in 1.14
>> 3) I'm running nightly bzr and branches where created recently
>>
>> I really hope that I did not create corner case branches for the #354036
>> cause that bug is a nasty beast by the looks of it =(
>
> Ouch. I think this is a bzr bug. We create a stacked branch and then
> merge in to it.
>
> I will try and find a reproducer with just bzr.

Hmm, I can't reproduce this, even using your recipe.

Does if fail if you do

  bzr branch --stacked lp:xiphos
  cd xiphos
  bzr merge lp:~dmitrij.ledkov/xiphos/hardy

?

Thanks,

James

Revision history for this message
Dimitri John Ledkov (xnox) wrote :

2009/8/14 James Westby <email address hidden>:
>
> Hmm, I can't reproduce this, even using your recipe.
>
> Does if fail if you do
>
>  bzr branch --stacked lp:xiphos
>  cd xiphos
>  bzr merge lp:~dmitrij.ledkov/xiphos/hardy
>
> ?
>

Yeap it does =(

bzr-nightly-ppa 1.17+4597+121

$ bzr version -v
Bazaar (bzr) 2.0dev
  Python interpreter: /usr/bin/python 2.6.2
  Python standard library: /usr/lib/python2.6
  bzrlib: /usr/lib/python2.6/dist-packages/bzrlib
  Bazaar configuration: /home/dmitrij/.bazaar
  Bazaar log file: /home/dmitrij/.bzr.log

So it's a bzr / launchpad bug then ?

Or am I not using recent enough bzr ?

Thanks for looking into this.

--
With best regards

Dmitrijs Ledkovs (for short Dima),
Ледков Дмитрий Юрьевич

Revision history for this message
James Westby (james-w) wrote :

Dmitrijs Ledkovs wrote:
> Yeap it does =(
>
> bzr-nightly-ppa 1.17+4597+121
>
> $ bzr version -v
> Bazaar (bzr) 2.0dev
> Python interpreter: /usr/bin/python 2.6.2
> Python standard library: /usr/lib/python2.6
> bzrlib: /usr/lib/python2.6/dist-packages/bzrlib
> Bazaar configuration: /home/dmitrij/.bazaar
> Bazaar log file: /home/dmitrij/.bzr.log
>
> So it's a bzr / launchpad bug then ?
>
> Or am I not using recent enough bzr ?
>
> Thanks for looking into this.
>

I tried with a bzr from a week or so ago, and a fresh pull, and didn't
get it either time.

The later one is saying

"bzr: ERROR: Cannot commit from a lightweight checkout to a stacked
branch. See https://bugs.launchpad.net/bzr/+bug/375013 for details."

though, which Rob suggested is probably highly likely to be related
to your error.

Thanks,

James

Revision history for this message
James Westby (james-w) wrote :

Re-assigning to bzr, as the problem can be reproduced without
bzr-builder.

Thanks,

James

affects: bzr-builder → bzr
Revision history for this message
Robert Collins (lifeless) wrote :

On Thu, 2009-08-13 at 22:52 +0000, Launchpad Bug Tracker wrote:
> You have been subscribed to a public bug:
>
> It looks like Bug #354036 in bzr but:
>
> 1) I can only trigger it with bzr-builder
> 2) The above bug is marked fixed in 1.14
> 3) I'm running nightly bzr and branches where created recently
>
> I really hope that I did not create corner case branches for the #354036
> cause that bug is a nasty beast by the looks of it =(

So, that bug occurs when the streaming interface is used. There is a
separate bug that sets up the same initial conditions:
https://bugs.edge.launchpad.net/bzr/+bug/375013

If you are commiting on stacked branch without using a heavyweight
checkout, then you'll cause ACF errors.

-Rob

Revision history for this message
Robert Collins (lifeless) wrote : Re: [Bug 413291] Re: Fails to merge a stacked-on branch

On Thu, 2009-08-13 at 22:52 +0000, James Westby wrote:
> Re-assigning to bzr, as the problem can be reproduced without
> bzr-builder.

Can you post a recipe to reproduce it please, using bzr.dev.

-Rob

Revision history for this message
James Westby (james-w) wrote : Re: [Bug 413291] [NEW] Fails to merge a stacked-on branch

Robert Collins wrote:
> If you are commiting on stacked branch without using a heavyweight
> checkout, then you'll cause ACF errors.

So you have to be bound to commit in a stacked branch?

Thanks,

James

Revision history for this message
James Westby (james-w) wrote : Re: [Bug 413291] Re: Fails to merge a stacked-on branch

Robert Collins wrote:
> On Thu, 2009-08-13 at 22:52 +0000, James Westby wrote:
>> Re-assigning to bzr, as the problem can be reproduced without
>> bzr-builder.
>
> Can you post a recipe to reproduce it please, using bzr.dev.

Well, I posted a recipe in comment 2 that Dmitrijs confirms
shows the problem with a slightly older bzr, but doesn't show it
for me with an even older bzr or current bzr.dev.

Dmitrijs, the nightly PPA just got a new snapshot uploaded, could
you test again with that once it has built? I suspect you will see the
error about lightweight checkouts.

Thanks,

James

Revision history for this message
Robert Collins (lifeless) wrote : Re: [Bug 413291] [NEW] Fails to merge a stacked-on branch

On Thu, 2009-08-13 at 23:23 +0000, James Westby wrote:
> Robert Collins wrote:
> > If you are commiting on stacked branch without using a heavyweight
> > checkout, then you'll cause ACF errors.
>
> So you have to be bound to commit in a stacked branch?

At the code level, repository.get_commit_builder will only work if the
repository._fallback_repositories list == [].

This means that
bzr branch --stacked foo bar; cd bar; bzr commit
will fail
bzr branch --stacked foo bar; bzr checkout --lightweight bar quux; cd
quux; bzr commit
will fail

bzr branch --stacked foo bar; bzr checkout bar quux
will succeed - but note that quux will have a full copy of history.

-Rob

Revision history for this message
Robert Collins (lifeless) wrote :

Oh, I should also note that the actual corruption in
lp:~dmitrij.ledkov/xiphos/hardy may be a number of other bugs; we fixed
a lot of 2a stuff recently.

-Rob

Revision history for this message
Dimitri John Ledkov (xnox) wrote :

 status invalid

As per Roberts suggestion in #11 I've recreated lp:~dmitrij.ledkov/xiphos/hardy and now everything is tip-top. Thanks.

Changed in bzr:
status: New → Invalid
Revision history for this message
Dimitri John Ledkov (xnox) wrote : Dmitrijs Ledkovs wants to stay in touch on LinkedIn

LinkedIn
------------

Bug,

I'd like to add you to my professional network on LinkedIn.

- Dmitrijs Ledkovs

Confirm that you know Dmitrijs Ledkovs
https://www.linkedin.com/e/isd/1067430369/69OiZ2Wo/

------
(c) 2010, LinkedIn Corporation

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.