Revision not in bzrlib.groupcompress.GroupCompressVersionedFiles

Bug #358037 reported by Brian de Alwis
6
Affects Status Importance Assigned to Milestone
Bazaar
Fix Released
Undecided
John A Meinel

Bug Description

I thought I'd try the new --development6-rich-root on bzr 1.14rc1 by branching a large 1.6 project into a dt6-rr repository. The branching failed (I'm assuming I should be able to do this, right?):

$ /scratch/dev/bzr-1.14/bzr --no-plugins init-repo --development6-rich-root /tmp/gt
Shared repository with trees (format: development6-rich-root)
Location:
  shared repository: /tmp/gt
$ cd /tmp/gt
$ /scratch/dev/bzr-1.14/bzr --no-plugins branch /scratch/dev/cvs-pkgsrc.org/ pkgsrc
bzr: ERROR: Revision {('makefile-20080109153700-eoot1uy8630kbjnn-7407', '<email address hidden>')} not present in "<bzrlib.groupcompress.GroupCompressVersionedFiles object at 0x12cc310>".
$ cd /scratch/dev/cvs-pkgsrc.org/
$ bzr check
Checking working tree at 'file:///scratch/dev/cvs-pkgsrc.org/'.
Checking repository at 'file:///scratch/dev/cvs-pkgsrc.org/'.
checked repository <bzrlib.transport.local.LocalTransport url=file:///scratch/dev/cvs-pkgsrc.org/> format <RepositoryFormatKnitPack6>
    19 revisions
 69433 file-ids
 82005 unique file texts
874733 repeated file texts
     0 unreferenced text versions
Checking branch at 'file:///scratch/dev/cvs-pkgsrc.org/'.
checked branch file:///scratch/dev/cvs-pkgsrc.org/ format Bazaar Branch Format 7 (needs bzr 1.6)

The error log shows:

Wed 2009-04-08 13:12:55 -0600
0.030 bzr arguments: [u'--no-plugins', u'branch', u'/scratch/dev/cvs-pkgsrc.org/', u'pkgsrc']
0.062 encoding stdout as sys.stdout encoding 'UTF-8'
0.170 opening working tree '/scratch/dev/cvs-pkgsrc.org'
0.197 opening working tree '/scratch/dev/cvs-pkgsrc.org'
7.436 Resizing the inventory entry cache from 10240 to 119264
127.559 Traceback (most recent call last):
  File "/scratch/dev/bzr-1.14/bzrlib/commands.py", line 727, in exception_to_return_code
    return the_callable(*args, **kwargs)
  File "/scratch/dev/bzr-1.14/bzrlib/commands.py", line 922, in run_bzr
    ret = run(*run_argv)
  File "/scratch/dev/bzr-1.14/bzrlib/commands.py", line 559, in run_argv_aliases
    return self.run(**all_cmd_args)
  File "/scratch/dev/bzr-1.14/bzrlib/builtins.py", line 1122, in run
    source_branch=br_from)
  File "/scratch/dev/bzr-1.14/bzrlib/bzrdir.py", line 1139, in sprout
    result_repo.fetch(source_repository, revision_id=revision_id)
  File "/scratch/dev/bzr-1.14/bzrlib/repository.py", line 1493, in fetch
    find_ghosts=find_ghosts, fetch_spec=fetch_spec)
  File "/scratch/dev/bzr-1.14/bzrlib/decorators.py", line 192, in write_locked
    result = unbound(self, *args, **kwargs)
  File "/scratch/dev/bzr-1.14/bzrlib/repository.py", line 3705, in fetch
    self._fetch_all_revisions(revision_ids, pb)
  File "/scratch/dev/bzr-1.14/bzrlib/repository.py", line 3663, in _fetch_all_revisions
    basis_id = self._fetch_batch(batch, basis_id, cache)
  File "/scratch/dev/bzr-1.14/bzrlib/repository.py", line 3628, in _fetch_batch
    not self.target._format._fetch_uses_deltas))
  File "/scratch/dev/bzr-1.14/bzrlib/groupcompress.py", line 1288, in insert_record_stream
    for _ in self._insert_record_stream(stream, random_id=False):
  File "/scratch/dev/bzr-1.14/bzrlib/groupcompress.py", line 1382, in _insert_record_stream
    bytes = adapter.get_bytes(record)
  File "/scratch/dev/bzr-1.14/bzrlib/knit.py", line 232, in get_bytes
    raise errors.RevisionNotPresent(compression_parent, self._basis_vf)
RevisionNotPresent: Revision {('makefile-20080109153700-eoot1uy8630kbjnn-7407', '<email address hidden>')} not present in "<bzrlib.groupcompress.GroupCompressVersionedFiles object at 0x12cc310>".

127.560 return code 3

Revision history for this message
Brian de Alwis (slyguy) wrote :

With John's "_fetch_uses_deltas = False" patch, I get a stack trace:

$ /scratch/dev/bzr-1.14/bzr --no-plugins branch /scratch/dev/cvs-pkgsrc.org pkgsrc
bzr: ERROR: exceptions.TypeError: 'NoneType' object is unsubscriptable

Traceback (most recent call last):
  File "/scratch/dev/bzr-1.14/bzrlib/commands.py", line 727, in exception_to_return_code
    return the_callable(*args, **kwargs)
  File "/scratch/dev/bzr-1.14/bzrlib/commands.py", line 922, in run_bzr
    ret = run(*run_argv)
  File "/scratch/dev/bzr-1.14/bzrlib/commands.py", line 559, in run_argv_aliases
    return self.run(**all_cmd_args)
  File "/scratch/dev/bzr-1.14/bzrlib/builtins.py", line 1122, in run
    source_branch=br_from)
  File "/scratch/dev/bzr-1.14/bzrlib/bzrdir.py", line 1139, in sprout
    result_repo.fetch(source_repository, revision_id=revision_id)
  File "/scratch/dev/bzr-1.14/bzrlib/repository.py", line 1493, in fetch
    find_ghosts=find_ghosts, fetch_spec=fetch_spec)
  File "/scratch/dev/bzr-1.14/bzrlib/decorators.py", line 192, in write_locked
    result = unbound(self, *args, **kwargs)
  File "/scratch/dev/bzr-1.14/bzrlib/repository.py", line 3705, in fetch
    self._fetch_all_revisions(revision_ids, pb)
  File "/scratch/dev/bzr-1.14/bzrlib/repository.py", line 3663, in _fetch_all_revisions
    basis_id = self._fetch_batch(batch, basis_id, cache)
  File "/scratch/dev/bzr-1.14/bzrlib/repository.py", line 3628, in _fetch_batch
    not self.target._format._fetch_uses_deltas))
  File "/scratch/dev/bzr-1.14/bzrlib/groupcompress.py", line 1288, in insert_record_stream
    for _ in self._insert_record_stream(stream, random_id=False):
  File "/scratch/dev/bzr-1.14/bzrlib/groupcompress.py", line 1412, in _insert_record_stream
    self._compressor.pop_last()
  File "/scratch/dev/bzr-1.14/bzrlib/groupcompress.py", line 702, in pop_last
    del self.chunks[self._last[0]:]
TypeError: 'NoneType' object is unsubscriptable

bzr 1.14rc1 on python 2.5.2 (darwin)
arguments: ['/scratch/dev/bzr-1.14/bzr', '--no-plugins', 'branch', '/scratch/dev/cvs-pkgsrc.org', 'pkgsrc']
encoding: 'UTF-8', fsenc: 'utf-8', lang: 'en_CA.UTF-8'
plugins:
*** 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
Robert Collins (lifeless) wrote : Re: [Bug 358037] Re: Revision not in bzrlib.groupcompress.GroupCompressVersionedFiles

On Wed, 2009-04-08 at 22:19 +0000, Brian de Alwis wrote:
> With John's "_fetch_uses_deltas = False" patch, I get a stack trace:

You need to build the C extensions, or apply John's other patch as well.

-Rob

Revision history for this message
Brian de Alwis (slyguy) wrote :
Download full text (3.6 KiB)

John's fixes to PythonGroupCompress.pop gets it branching. Thanks for that pointer. So I'm now running with two patches, and not running with the pyrex extensions.

Two follow-ons, one minor, the other major.

Minor: 'bzr info' of the branch, which is in a dev6-rr repository, displays the format as unnamed:

$ /scratch/dev/bzr-1.14/bzr --no-plugins info
Repository tree (format: unnamed)
Location:
  shared repository: /private/tmp/pk
  repository branch: .

Related branches:
  parent branch: /scratch/dev/cvs-pkgsrc.org
$ cd ..
$ /scratch/dev/bzr-1.14/bzr --no-plugins info
Shared repository with trees (format: development6-rich-root)
Location:
  shared repository: .

Major problem: doing a 'bzr check' from either the branch or the repository throws an exception after about two minutes:

$ /scratch/dev/bzr-1.14/bzr --no-plugins check
Checking working tree at 'file:///private/tmp/pk/pkgsrc/'.
Checking repository at 'file:///private/tmp/pk/'.
bzr: ERROR: exceptions.ValueError: Delta claimed to be 535842 long, but ended up 560635 long

Traceback (most recent call last):
  File "/scratch/dev/bzr-1.14/bzrlib/commands.py", line 727, in exception_to_return_code
    return the_callable(*args, **kwargs)
  File "/scratch/dev/bzr-1.14/bzrlib/commands.py", line 922, in run_bzr
    ret = run(*run_argv)
  File "/scratch/dev/bzr-1.14/bzrlib/commands.py", line 559, in run_argv_aliases
    return self.run(**all_cmd_args)
  File "/scratch/dev/bzr-1.14/bzrlib/builtins.py", line 2946, in run
    check_dwim(path, verbose, do_branch=branch, do_repo=repo, do_tree=tree)
  File "/scratch/dev/bzr-1.14/bzrlib/check.py", line 318, in check_dwim
    result = repo.check()
  File "/scratch/dev/bzr-1.14/bzrlib/decorators.py", line 138, in read_locked
    result = unbound(self, *args, **kwargs)
  File "/scratch/dev/bzr-1.14/bzrlib/repository.py", line 2437, in check
    return self._check(revision_ids)
  File "/scratch/dev/bzr-1.14/bzrlib/repository.py", line 2441, in _check
    result.check()
  File "/scratch/dev/bzr-1.14/bzrlib/check.py", line 86, in check
    self.check_one_rev(rev_id)
  File "/scratch/dev/bzr-1.14/bzrlib/check.py", line 203, in check_one_rev
    self._check_revision_tree(rev_id)
  File "/scratch/dev/bzr-1.14/bzrlib/check.py", line 244, in _check_revision_tree
    ie.check(self, rev_id, inv, tree)
  File "/scratch/dev/bzr-1.14/bzrlib/inventory.py", line 283, in check
    self._check(checker, rev_id, tree)
  File "/scratch/dev/bzr-1.14/bzrlib/inventory.py", line 497, in _check
    if (self.text_sha1 != tree._repository.texts.get_sha1s([key])[key]):
  File "/scratch/dev/bzr-1.14/bzrlib/groupcompress.py", line 1275, in get_sha1s
    record.get_bytes_as('fulltext'))
  File "/scratch/dev/bzr-1.14/bzrlib/groupcompress.py", line 353, in get_bytes_as
    self._bytes = block.extract(self.key, self._start, self._end)
  File "/scratch/dev/bzr-1.14/bzrlib/groupcompress.py", line 273, in extract
    bytes = apply_delta_to_source(self._content, content_start, end)
  File "/scratch/dev/bzr-1.14/bzrlib/_groupcompress_py.py", line 392, in apply_delta_to_source
    return apply_delta(source, delta_bytes)
  File "/scratch/dev/bzr-1.14/bzrlib/_groupcompress_py.py", line 378,...

Read more...

Revision history for this message
Bob Tanner (tanner) wrote :

lp:~jameinel/bzr/1.14-dev6rr-fixes the fix for this bug?

If so, can I merge into 1.14rc2?

Revision history for this message
Brian de Alwis (slyguy) wrote :

Yep, that branch fixes the problems reported on this PR: my test repo
now successfully branches and passes 'bzr check'.

Brian.

--
"Amusement to an observing mind is study." - Benjamin Disraeli

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

I'm pretty sure all of your concerns are/will be addressed in 1.14-final. If not, you can re-open this.

Changed in bzr:
assignee: nobody → John A Meinel (jameinel)
milestone: none → 1.14
status: New → 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.