ERROR: bzrlib.errors.KnitCorrupt: Knit <bzrlib.knit.KnitGraphIndex object at 0x86e1e2c> corrupt: attempt to add line-delta in non-delta knit

Bug #230294 reported by Craig A. Eddy
10
Affects Status Importance Assigned to Milestone
Bazaar
Fix Released
Undecided
Unassigned
bzr (Ubuntu)
Fix Released
Undecided
Unassigned
Hardy
Fix Released
Undecided
Unassigned
Intrepid
Fix Released
Undecided
Unassigned

Bug Description

Impact: Prevents some branches from being checked out over bzr+ssh://

Fix in intrepid: the bug was fixed upstream in 1.4, intrepid has 1.5 already.

TEST CASE:

  * Run "bzr checkout bzr+ssh://<your lp id>@bazaar.launchpad.net/~planet-ubuntu/config/main"
  * Get a python traceback like the one shown below.
  * (Remove the broken branch in "main/")

  * Update the the fixed version
  * Run the same command again, it completes without error and you have a checkout in the directory "main".

Regression potential: low, the branches that are affected by this have a problem with the data
caused by an old version of bzr. Only these branches should trigger the special case handling.
Any that fail within the special case are another bug, but wouldn't have succeeded without
the patch either.

===== Original report:

Performing the following action:

bzr checkout bzr+ssh://<email address hidden>/~planet-ubuntu/config/main planet-ubuntu

Results in:

bzr: ERROR: bzrlib.errors.KnitCorrupt: Knit <bzrlib.knit.KnitGraphIndex object at 0x86e1e2c> corrupt: attempt to add line-delta in non-delta knit

Traceback (most recent call last):
  File "/usr/lib/python2.5/site-packages/bzrlib/commands.py", line 834, in run_bzr_catch_errors
    return run_bzr(argv)
  File "/usr/lib/python2.5/site-packages/bzrlib/commands.py", line 790, in run_bzr
    ret = run(*run_argv)
  File "/usr/lib/python2.5/site-packages/bzrlib/commands.py", line 492, in run_argv_aliases
    return self.run(**all_cmd_args)
  File "/usr/lib/python2.5/site-packages/bzrlib/builtins.py", line 1012, in run
    accelerator_tree, hardlink)
  File "/usr/lib/python2.5/site-packages/bzrlib/branch.py", line 766, in create_checkout
    checkout_branch.pull(self, stop_revision=revision_id)
  File "/usr/lib/python2.5/site-packages/bzrlib/decorators.py", line 165, in write_locked
    return unbound(self, *args, **kwargs)
  File "/usr/lib/python2.5/site-packages/bzrlib/branch.py", line 1714, in pull
    run_hooks=run_hooks)
  File "/usr/lib/python2.5/site-packages/bzrlib/decorators.py", line 165, in write_locked
    return unbound(self, *args, **kwargs)
  File "/usr/lib/python2.5/site-packages/bzrlib/branch.py", line 1513, in pull
    self.update_revisions(source, stop_revision, overwrite=overwrite)
  File "/usr/lib/python2.5/site-packages/bzrlib/decorators.py", line 165, in write_locked
    return unbound(self, *args, **kwargs)
  File "/usr/lib/python2.5/site-packages/bzrlib/branch.py", line 1465, in update_revisions
    self.fetch(other, stop_revision)
  File "/usr/lib/python2.5/site-packages/bzrlib/decorators.py", line 165, in write_locked
    return unbound(self, *args, **kwargs)
  File "/usr/lib/python2.5/site-packages/bzrlib/branch.py", line 266, in fetch
    pb=nested_pb)
  File "/usr/lib/python2.5/site-packages/bzrlib/repository.py", line 949, in fetch
    return inter.fetch(revision_id=revision_id, pb=pb, find_ghosts=find_ghosts)
  File "/usr/lib/python2.5/site-packages/bzrlib/decorators.py", line 165, in write_locked
    return unbound(self, *args, **kwargs)
  File "/usr/lib/python2.5/site-packages/bzrlib/repository.py", line 2963, in fetch
    pb=pb, find_ghosts=find_ghosts)
  File "/usr/lib/python2.5/site-packages/bzrlib/fetch.py", line 109, in __init__
    self.__fetch()
  File "/usr/lib/python2.5/site-packages/bzrlib/fetch.py", line 139, in __fetch
    self._fetch_everything_for_search(search, pp)
  File "/usr/lib/python2.5/site-packages/bzrlib/fetch.py", line 418, in _fetch_everything_for_search
    self.to_repository.insert_data_stream(data_stream)
  File "/usr/lib/python2.5/site-packages/bzrlib/repository.py", line 860, in insert_data_stream
    (format, data_list, reader_func))
  File "/usr/lib/python2.5/site-packages/bzrlib/knit.py", line 850, in insert_data_stream
    reader_callable(length))
  File "/usr/lib/python2.5/site-packages/bzrlib/knit.py", line 604, in _add_raw_records
    self._index.add_versions(index_entries)
  File "/usr/lib/python2.5/site-packages/bzrlib/knit.py", line 1997, in add_versions
    raise KnitCorrupt(self, "attempt to add line-delta in non-delta knit")
KnitCorrupt: Knit <bzrlib.knit.KnitGraphIndex object at 0x86e1e2c> corrupt: attempt to add line-delta in non-delta knit

bzr 1.3.1 on python 2.5.2.final.0 (linux2)
arguments: ['/usr/bin/bzr', 'checkout', 'bzr+ssh://<email address hidden>/~planet-ubuntu/config/main', 'planet-ubuntu']
encoding: 'UTF-8', fsenc: 'UTF-8', lang: 'en_US.UTF-8'
plugins:
  bzrtools /usr/lib/python2.5/site-packages/bzrlib/plugins/bzrtools [1.3.0]
  gtk /usr/lib/python2.5/site-packages/bzrlib/plugins/gtk [0.93.0]
  launchpad /usr/lib/python2.5/site-packages/bzrlib/plugins/launchpad [unknown]
*** 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.

Related branches

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

This is a known bug which was fixed in bzr 1.4

Revision history for this message
Craig A. Eddy (tyche-deactivatedaccount) wrote : Re: [Bug 230294] Re: ERROR: bzrlib.errors.KnitCorrupt: Knit <bzrlib.knit.KnitGraphIndex object at 0x86e1e2c> corrupt: attempt to add line-delta in non-delta knit

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

This bug has not been fixed. If it had been fixed, I wouldn't have
been reporting it. I am running Ubuntu 8.04, and have the latest bzr
available in the repos.

John A Meinel wrote:
> *** This bug is a duplicate of bug 217701 ***
> https://bugs.launchpad.net/bugs/217701
>
> This is a known bug which was fixed in bzr 1.4
>
> ** This bug has been marked a duplicate of bug 217701
> attempt to add line-delta in non-delta knit
>
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFIKvrCDOWu08UKbpURAsnQAKCFexCNqINXiRbGZb9s/cgjBm0C9gCgi/eB
e4UJKlUY52VIkgUSpiyq1M8=
=589u
-----END PGP SIGNATURE-----

Revision history for this message
Martin Albisetti (beuno) wrote :

Which is, according to your traceback, 1.3.1:

bzr 1.3.1 on python 2.5.2.final.0 (linux2)

Upgrading to 1.5rc1 from PPA will solve this issue: https://launchpad.net/~bzr/+archive

Revision history for this message
James Westby (james-w) wrote : Re: [Bug 230294] Re: ERROR: bzrlib.errors.KnitCorrupt: Knit <bzrlib.knit.KnitGraphIndex object at 0x86e1e2c> corrupt: attempt to add line-delta in non-delta knit

On Wed, 2008-05-14 at 14:44 +0000, Craig A. Eddy wrote:
> This bug has not been fixed. If it had been fixed, I wouldn't have
> been reporting it. I am running Ubuntu 8.04, and have the latest bzr
> available in the repos.

It's fixed in 1.4, which was released after Hardy.

If you want to get the fix in to Ubuntu Hardy then please open an Ubuntu
bzr package task on the bug and we can work to get a fix uploaded there.

Thanks,

James

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

I'll switch this to being a bzr(Ubuntu) bug.

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

This is bug #217701 which was fixed in bzr 1.4, but Hardy does not have the latest package.

Changed in bzr:
milestone: none → 1.4
status: New → Fix Released
Revision history for this message
John A Meinel (jameinel) wrote :

We just need to get 1.4 or 1.5 into backports, etc. It might also be possible to get a 1.3.2 or something. But it isn't strictly a security issue, so getting it into the regular update stream is difficult.

Changed in bzr:
status: New → Confirmed
Revision history for this message
Craig A. Eddy (tyche-deactivatedaccount) wrote :

Thank you. Upgrade received. I do hope, for the sake of any others having difficulties with this, that you are able to get it backported to Hardy. It may not be critical, but it is a major aggravation, especially to someone who isn't a developer or well versed in Linux and Ubuntu. I appreciate all your efforts.

Thanks again

Revision history for this message
Sarah Kowalik (hobbsee-deactivatedaccount) wrote :

Surely this is a SRU candidate? Does someone want to do the work?

Steve Kowalik (stevenk)
Changed in bzr:
status: Confirmed → Fix Released
Revision history for this message
Martin Pool (mbp) wrote :

I think this would be appropriate for a Hardy SRU.

Revision history for this message
Craig A. Eddy (tyche-deactivatedaccount) wrote :

I agree with Sarah and Martin. A Stable Release Update for Hardy Heron on something that is used by more than just the Intrepid developers and MOTU's is definitely needed. More, it's expected. I was called out because I was up to date with Hardy, but, "This is a known bug which was fixed in bzr 1.4". In addition, I was told, "Which is, according to your traceback, 1.3.1:
bzr 1.3.1 on python 2.5.2.final.0 (linux2)
Upgrading to 1.5rc1 from PPA will solve this issue: https://launchpad.net/~bzr/+archive". Now, I want you to understand that I appreciate being told where to find the fix. I really do. But I do NOT enjoy being called out for not even knowing where the fix is, especially when that fix is in a PPA where only someone working on it would know.

We who are not developers or MOTU's rely on the repositories for our updates/upgrades. That's where we're told to look for programs, and from where we receive our bug fixes. We have enough trouble trying to figure out what WE did wrong, and correcting it. In addition, security updates and bug fixes are tracked in the UWN for Ubuntu 6.04, 7.04, 7.10 and 8.04 (See https://wiki.ubuntu.com/UbuntuWeeklyNewsletter/Issue92 for evidence of this). These are something with which I am intimately aware. (See https://wiki.ubuntu.com/CraigAEddy). Had a fix for this problem come through there, I'd have been aware of it simply because bzr would have caught my eye.

I am not the only one running Hardy Heron, Ubuntu 8.04, that uses bzr. Others may also have been caught in this problem and be thinking that it is something that they did wrong. Please. I am asking that this fix be released for Hardy. I understand your forward thinking - the release date for Ubuntu 8.10 is coming up like a wall, and you're anxious to get things resolved for it as quickly as possible. But, in the mean time, there are all of us who are still using Ubuntu 8.04 (some of which may be using it for 3 to 5 years, due to the fact that it's and LTS) who also deserve to have the update. Please submit the bug fix to Hardy.

Revision history for this message
Aaron Bentley (abentley) wrote : Re: [Bug 230294] Re: ERROR: bzrlib.errors.KnitCorrupt: Knit <bzrlib.knit.KnitGraphIndex object at 0x86e1e2c> corrupt: attempt to add line-delta in non-delta knit

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

Craig A. Eddy wrote:
> But I do NOT enjoy being called out for not even knowing where the fix is, especially when that fix is in a PPA where only someone working on it would know.

The PPA is our official source for getting the latest-and-greatest
version of Bazaar on Ubuntu. It is linked to <from
http://bazaar-vcs.org/Download>, so many people beyond the Bazaar
developers know about it.

But this is a side issue. There is certainly justification for patching
this bug in Hardy itself.

Aaron
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFIPIDT0F+nu1YWqI0RArkiAJ9rJPimRiwcMONJ4NiUKutpdotSwgCeJ8bE
ZgoR1hypFZHvmzl2uENgSDM=
=nzMR
-----END PGP SIGNATURE-----

Revision history for this message
Martin Pool (mbp) wrote : Re: [Bug 230294] Re: ERROR: bzrlib.errors.KnitCorrupt: Knit <bzrlib.knit.KnitGraphIndex object at 0x86e1e2c> corrupt: attempt to add line-delta in non-delta knit

On Tue, May 27, 2008 at 10:58 PM, Craig A. Eddy <email address hidden> wrote:
> I agree with Sarah and Martin. A Stable Release Update for Hardy Heron on something that is used by more than just the Intrepid developers and MOTU's is definitely needed. More, it's expected. I was called out because I was up to date with Hardy, but, "This is a known bug which was fixed in bzr 1.4". In addition, I was told, "Which is, according to your traceback, 1.3.1:

I'm sorry you feel you were called out, I don't think John intended it
like that. He was correct that this is now fixed in bzr, but you have
a good point that this should be fixed in _Hardy's version of bzr_
too. We definitely appreciate you reporting bugs (even if they're
dupes), and we are aware that many users get the version that's in the
distro.

As far as getting this into Hardy: the fix is in 1.5 and not in 1.4.
We could make a 1.4.1 with only that fix, but my preference would be
to update to 1.5: it has several other useful fixes (if less serious)
and has been tested for a few weeks now and generally seems good.

--
Martin <http://launchpad.net/~mbp/>

Revision history for this message
Craig A. Eddy (tyche-deactivatedaccount) wrote :

OK, I owe some people here an apology. My last post was somewhat heated. Certainly more that you deserve. I do appreciate the work that you do. It's got to be a fiddly and tedious as some of the drafting that I've done over nearly 20 years. Mr. Pool, I've got to thank you for drawing to my attention that I was getting out of hand. And for the rest, I'm sorry. My words were more heated than they should have been.

I'm very glad that the problem is fixed. Now perhaps we can come to a little understanding between us. I promise, without the heat this time. I've been using Ubuntu since Warty came out. In that period of time I've had to stumble around, pretty much by myself, trying to figure out how to fix things that I broke, or learning to do without. I only stumbled on the Arizona Team less than a year ago, and there is still a great deal that I'm trying to learn about not only Ubuntu, but the organization. Or maybe I should say the confederation of organizations. Intentional or not, there are major separations between, say, the developers and marketing, between news and LoCo's. Between all sorts of factions that are under the umbrella of Ubuntu. In many ways, this is good. Sometimes, I think that outsiders and n00bies like me need a roadmap to be able to figure out where to go and who to talk to when we get frustrated. People, like me, don't have the knowledge of where to go, necessarily. And I realize that it may appear that we need to have our hands held, sometimes, but sometimes that really IS what's necessary to help people learn. Things that are common to you are esoteric data to someone like me. And really, this isn't amed simply at bzr, but all over Launchpad. It keeps getting better, both because Launchpad, itself, is trying to meet us halfway, and because as I get around more I learn more.

What I'd like you, as a team, to think about is this: Is there a way you can make it easier for someone like me to find the information I need for myself? Is there a way that people like me can be helped to NOT feel frustrated or put upon or called out? We've all heard the stories about forums where the term "RTFM" is standard, and it's NOT a polite comment. If you, as a group, feel that this is something that could help you, just as I feel it could help people like me, then I would be more than willing to work with you to try to help BOTH of us to understand the other side of the story.

If it's something that might interest you, feel free to contact me. <email address hidden>, or IRC #ubuntu-us-az, and hollar for tyche.

Thanks.

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

Hi ubuntu-sru,

Attached is my proposed patch for the SRU on this issue. Please
let me know if I missed anything.

Thanks,

James

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

Hi,

I forgot to update the maintainer field, attached is an updated patch.

Thanks,

James

Revision history for this message
Martin Pitt (pitti) wrote :

Accepted into -proposed, please test and give feedback here

Changed in bzr:
status: New → Fix Committed
Revision history for this message
Martin Pitt (pitti) wrote :

I am a heavy bzr user, and I have used the new version for some days without any problem.

With "bzr checkout bzr+ssh://bazaar.launchpad.net/~planet-ubuntu/config/main" I get the exception when using the hardy final version. With the updated bzr, it works fine for me.

Revision history for this message
Martin Pitt (pitti) wrote :

Copied to hardy-updates.

Changed in bzr:
status: Fix Committed → Fix Released
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.