"invalid distance too far back" error parsing knit record

Bug #247479 reported by Shah Japan
22
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Bazaar
Confirmed
Medium
Unassigned

Bug Description

G:\Axelor\Workspace>bzr co http://bazaar-vcs.org/bzr/bzr.dev/
bzr: ERROR: bzrlib.errors.KnitCorrupt: Knit None corrupt: While reading {<email address hidden>} go
t error(Error -3 while decompressing: invalid distance too far back)

Traceback (most recent call last):
  File "bzrlib\commands.pyc", line 846, in run_bzr_catch_errors
  File "bzrlib\commands.pyc", line 797, in run_bzr
  File "bzrlib\commands.pyc", line 499, in run_argv_aliases
  File "bzrlib\builtins.pyc", line 1024, in run
  File "bzrlib\branch.pyc", line 763, in create_checkout
  File "bzrlib\decorators.pyc", line 165, in write_locked
  File "bzrlib\branch.pyc", line 1766, in pull
  File "bzrlib\decorators.pyc", line 165, in write_locked
  File "bzrlib\branch.pyc", line 1569, in pull
  File "bzrlib\decorators.pyc", line 165, in write_locked
  File "bzrlib\branch.pyc", line 1520, in update_revisions
  File "bzrlib\decorators.pyc", line 165, in write_locked
  File "bzrlib\branch.pyc", line 265, in fetch
  File "bzrlib\repository.pyc", line 953, in fetch
  File "bzrlib\decorators.pyc", line 165, in write_locked
  File "bzrlib\repository.pyc", line 2776, in fetch
  File "bzrlib\repofmt\pack_repo.pyc", line 598, in pack
  File "bzrlib\repofmt\pack_repo.pyc", line 730, in _create_pack_from_packs
  File "bzrlib\repofmt\pack_repo.pyc", line 660, in _copy_inventory_texts
  File "bzrlib\repofmt\pack_repo.pyc", line 915, in _process_inventory_lines
  File "bzrlib\repository.pyc", line 1275, in _find_file_ids_from_xml_inventory_lines
  File "bzrlib\repository.pyc", line 1215, in _find_text_key_references_from_xml_inventory_lines
  File "bzrlib\repofmt\pack_repo.pyc", line 816, in _copy_nodes_graph
  File "bzrlib\repofmt\pack_repo.pyc", line 844, in _do_copy_nodes_graph
  File "bzrlib\knit.pyc", line 2467, in _parse_record
KnitCorrupt: Knit None corrupt: While reading {<email address hidden>} got error(Error -3 while dec
ompressing: invalid distance too far back)

bzr 1.5 on python 2.5.2 (win32)
arguments: ['bzr', 'co', 'http://bazaar-vcs.org/bzr/bzr.dev/']
encoding: 'cp1252', fsenc: 'mbcs', lang: None
plugins:
  launchpad C:\Program Files\Bazaar\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.

G:\Axelor\Workspace>

Revision history for this message
Martin Pool (mbp) wrote :

This error seems like it's originating somewhere inside zlib. It looked at first like some kind of one-off filesystem problem but there have been several duplicates.

Changed in bzr:
importance: Undecided → High
status: New → Confirmed
Revision history for this message
Martin Pool (mbp) wrote :

Here's what we know about this bug:

 * it has been seen to occur over http, over ftp, and over ssh
 * it occurs at least as early as 1.5 and at least as late as 1.13dev

It was reproduced in this bug report in branching from bzr.dev, which other people *are* accessing successfully. That would seem to indicate that it's either a transient environmental effect (eg bad http proxy) or some concurrent action in the repository (concurrent commit and packs or indexes changing?) or an intermittent bug in bzr. Or something else.

It would be good to hear from people experiencing this problem whether it's reproducible.

Revision history for this message
Martin Pool (mbp) wrote :

See also thread "Q: Use rebase to get around corrupted knit file?" in December 2008.

Revision history for this message
Papadakos Panagiotis (papadako) wrote :

Don't know if this could be relevant:
http://<email address hidden>/msg233251.html

Revision history for this message
Martin Pool (mbp) wrote : Re: [Bug 247479] Re: "invalid distance too far back" error parsing knit record

2009/3/3 Papadakos Panagiotis <email address hidden>:
> Don't know if this could be relevant:
> http://<email address hidden>/msg233251.html

It does look like the same error and thankyou for finding it, but the
reply is pretty terse. Could you mail him for more detail?

Could it be that they get a short read from the file handle?

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

Revision history for this message
Amanda Wee (aranelchan) wrote :

I got a similiar error when branching from bzr.dev into a shared repository using the 2a format with Bazaar 2.0.0:

bzr: ERROR: zlib.error: Error -3 while decompressing: invalid distance too far back

Traceback (most recent call last):
  File "bzrlib\commands.pyo", line 842, in exception_to_return_code
  File "bzrlib\commands.pyo", line 1037, in run_bzr
  File "bzrlib\commands.pyo", line 654, in run_argv_aliases
  File "bzrlib\builtins.pyo", line 1243, in run
  File "bzrlib\bzrdir.pyo", line 1183, in sprout
  File "bzrlib\repository.pyo", line 1695, in fetch
  File "bzrlib\decorators.pyo", line 192, in write_locked
  File "bzrlib\repository.pyo", line 3413, in fetch
  File "bzrlib\fetch.pyo", line 81, in __init__
  File "bzrlib\fetch.pyo", line 107, in __fetch
  File "bzrlib\fetch.pyo", line 135, in _fetch_everything_for_search
  File "bzrlib\repository.pyo", line 4238, in insert_stream
  File "bzrlib\repository.pyo", line 4271, in _locked_insert_stream
  File "bzrlib\groupcompress.pyo", line 1608, in insert_record_stream
  File "bzrlib\groupcompress.pyo", line 1714, in _insert_record_stream
  File "bzrlib\groupcompress.pyo", line 454, in get_bytes_as
  File "bzrlib\groupcompress.pyo", line 554, in _prepare_for_extract
  File "bzrlib\groupcompress.pyo", line 158, in _ensure_content
error: Error -3 while decompressing: invalid distance too far back

bzr 2.0.0 on python 2.5.4 (Windows-Vista-6.0.6002-SP2)
arguments: ['bzr', 'branch', 'lp:bzr']
encoding: 'cp1252', fsenc: 'mbcs', lang: None
plugins:
  bzrtools C:\Program Files\Bazaar\plugins\bzrtools [2.0.0]
  explorer C:\Program Files\Bazaar\plugins\explorer [0.8.2]
  launchpad C:\Program Files\Bazaar\plugins\launchpad [2.0.0]
  netrc_credential_store C:\Program Files\Bazaar\plugins\netrc_credential_store
[2.0.0]
  qbzr C:\Program Files\Bazaar\plugins\qbzr [0.14.2]
  rebase C:\Program Files\Bazaar\plugins\rebase [0.5.3]
  svn C:\Program Files\Bazaar\plugins\svn [1.0.0]
  upload C:\Program Files\Bazaar\plugins\upload [1.0.0dev]
  xmloutput C:\Program Files\Bazaar\plugins\xmloutput [0.8.5]

Revision history for this message
Robert Collins (lifeless) wrote : Re: [Bug 247479] Re: "invalid distance too far back" error parsing knit record

On Sat, 2009-09-26 at 21:00 +0000, Eugene Wee wrote:
> I got a similiar error when branching from bzr.dev into a shared
> repository using the 2a format with Bazaar 2.0.0:
>
> bzr: ERROR: zlib.error: Error -3 while decompressing: invalid distance
> too far back
> .. File "bzrlib\groupcompress.pyo", line 1608, in insert_record_stream
> File "bzrlib\groupcompress.pyo", line 1714, in _insert_record_stream
> File "bzrlib\groupcompress.pyo", line 454, in get_bytes_as
> File "bzrlib\groupcompress.pyo", line 554, in _prepare_for_extract
> File "bzrlib\groupcompress.pyo", line 158, in _ensure_content
> error: Error -3 while decompressing: invalid distance too far back

This is a different problem - please file a new bug report for it.

-Rob

Revision history for this message
Martin Pool (mbp) wrote :

Leaving aside Eugene's comment, which is a different bug, this does not seem to be a live problem in 2.x and 2a formats. Therefore I'm going to downgrade it. If someone does hit this, please say so.

Changed in bzr:
importance: High → Medium
Jelmer Vernooij (jelmer)
tags: added: knits
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.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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