attempt to add line-delta in non-delta knit

Bug #217701 reported by Andreas Hasenack
14
Affects Status Importance Assigned to Milestone
Bazaar
Fix Released
Critical
Andrew Bennetts

Bug Description

andreas@nsn:~/x$ bzr --version
Bazaar (bzr) 1.3.1rc1
  Python interpreter: /usr/bin/python 2.5.2.final.0
  Python standard library: /usr/lib/python2.5
  bzrlib: /usr/lib/python2.5/site-packages/bzrlib
  Bazaar configuration: /home/andreas/.bazaar
  Bazaar log file: /home/andreas/.bzr.log

(url sanitized)

andreas@nsn:~$ rm -rf ~/x; mkdir ~/x; cd ~/x; bzr init-repo $(pwd); bzr co bzr+ssh://example.com/home/bzr/myapp/trunk/
bzr: ERROR: bzrlib.errors.KnitCorrupt: Knit <bzrlib.knit.KnitGraphIndex object at 0x886116c> 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 0x886116c> corrupt: attempt to add line-delta in non-delta knit

bzr 1.3.1rc1 on python 2.5.2.final.0 (linux2)
arguments: ['/usr/bin/bzr', 'co', 'bzr+ssh://example.com/home/bzr/myapp/trunk/']
encoding: 'UTF-8', fsenc: 'UTF-8', lang: 'en_US.UTF-8'
plugins:
  bzrcommitmessage /home/andreas/.bazaar/plugins/bzrcommitmessage.py [unknown]
  bzrtools /usr/lib/python2.5/site-packages/bzrlib/plugins/bzrtools [1.3.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
Andreas Hasenack (ahasenack) wrote :
Revision history for this message
Adrian Wilkins (adrian-wilkins) wrote :

Is this a manifestation of https://bugs.launchpad.net/bzr/+bug/208418 ?

Revision history for this message
Andreas Hasenack (ahasenack) wrote :

bzr 1.3 works. I will use that one for now, as soon as I find it packaged for hardy.

Revision history for this message
Andreas Hasenack (ahasenack) wrote :

actually, bzr+ssh never works. sftp:// works, as does a local checkout (file:/// like).

False alarm about 1.3 "working". It doesn't.

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

The problem is that your upstream is in knits and your local is in packs. And somehow upstream created a line-delta for a given entry.

It might be related to bug #208418, or at least that could have been how the line-delta was created.

1) Does upgrading the source repo to packs fix this? (it may just fail in the same way)

2) We could update 'bzr check' to detect this, and 'bzr reconcile' to convert the line-delta back into a full text.

3) Alternatively, we could change the knit => pack fetcher so that if it gets a line-delta where it doesn't want it, it automatically extracts it back into a full text.

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

The are several knit repositories now with this artifact. I'm not sure how it got there, but it means that fetching into packs is broken for all of those. So it needs to be fixed.

Is this critical or just high?

Changed in bzr:
importance: Undecided → Critical
status: New → Triaged
Revision history for this message
Andreas Hasenack (ahasenack) wrote :

We are about to try to convert our repository to packs, so the url some of you guys have as a test url will no longer work.

Revision history for this message
Andrew Bennetts (spiv) wrote :

Andreas: I've got a copy of a branch locally that reproduces this, so don't worry too much about upgrading your repo. It might be nice to keep a copy of it as it is just in case, but it shouldn't matter.

Revision history for this message
Andrew Bennetts (spiv) wrote :

I've associated a branch with a possible fix to this bug.

Changed in bzr:
assignee: nobody → spiv
Martin Pool (mbp)
Changed in bzr:
status: Triaged → Fix Committed
John A Meinel (jameinel)
Changed in bzr:
milestone: none → 1.4
Revision history for this message
أحمد المحمودي (Ahmed El-Mahmoudy) (aelmahmoudy) wrote : Re: [Bug 217701] Re: attempt to add line-delta in non-delta knit

Hello,

  I just upgraded bzr:

$ bzr --version
Bazaar (bzr) 1.3.1
  Python interpreter: /usr/bin/python 2.5.2.final.0
  Python standard library: /usr/lib/python2.5
  bzrlib: /usr/lib/python2.5/site-packages/bzrlib
  Bazaar configuration: /home/ant1/.bazaar
  Bazaar log file: /home/ant1/.bzr.log

  Yet I still get an error when I run: bzr co lp:ubuntume

  Please find the attached .bzr.log

--
 أحمد المحمودي (Ahmed El-Mahmoudy)
  Digital design engineer
  SySDSoft, Inc.
 GPG KeyID: 0x9DCA0B27 (@ subkeys.pgp.net)
 GPG Fingerprint: 087D 3767 8CAC 65B1 8F6C 156E D325 C3C8 9DCA 0B27

Revision history for this message
أحمد المحمودي (Ahmed El-Mahmoudy) (aelmahmoudy) wrote :

Hello,

  I just did:
  bzr upgrade sftp://bazaar.launchpad.net/~ubuntume.team/ubuntume/hardy/

  and that solved my problem !

--
 أحمد المحمودي (Ahmed El-Mahmoudy)
  Digital design engineer
  SySDSoft, Inc.
 GPG KeyID: 0x9DCA0B27 (@ subkeys.pgp.net)
 GPG Fingerprint: 087D 3767 8CAC 65B1 8F6C 156E D325 C3C8 9DCA 0B27

Revision history for this message
Andrew Bennetts (spiv) wrote :

This is fixed both in bzr 1.4 and bzr.dev.

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

Still not fixed, that I can see. 2008-05-11 at 9:00 MST.

bzr checkout bzr+ssh://<email address hidden>/~planet-ubuntu/config/main planet-ubuntu resulted in:
bzr: ERROR: bzrlib.errors.KnitCorrupt: Knit <bzrlib.knit.KnitGraphIndex object at 0x85301ec> corrupt: attempt to add line-delta in non-delta knit

Any help would be appreciated.

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

Craig- can you double check your 'bzr --version"?

I can say that I can checkout that path just fine using bzr.dev.

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.