Branch into an init-repo'd --no_trees --rich-root-pack fails.

Bug #221060 reported by TimeHorse
6
Affects Status Importance Assigned to Milestone
Bazaar
Fix Released
Undecided
Unassigned

Bug Description

Hello,

I am trying to branch python from lp:python into a new development branch using the "Team Collaboration, central style". So I figure I need to execute an init-repo with --no-trees and --rich-root-pack to create a blank area for my branch and then branch into that from lp:python. I wanted to do a local test first before I pushed this onto python so I went to the Python Starship server and executed:

$ bzr init-repo --no-trees --rich-root-pack python_dev
$ cd python_dev/

and finally

$ bzr branch lp:python <branch_name>

That thinks for a bit, gets as far as stage 3/5 and then I get:

"""
bzr: ERROR: bzrlib.errors.KnitCorrupt: Knit None corrupt: While reading {svn-v3-trunk1:6015fed2-1504-0410-9fe1-9d1591cc4771:python%2Ftrunk:7375} got IOError(CRC check failed 656520909 2686516852)

Traceback (most recent call last):
  File "/usr/lib/python2.4/site-packages/bzrlib/commands.py", line 834, in run_bzr_catch_errors
    return run_bzr(argv)
  File "/usr/lib/python2.4/site-packages/bzrlib/commands.py", line 790, in run_bzr
    ret = run(*run_argv)
  File "/usr/lib/python2.4/site-packages/bzrlib/commands.py", line 492, in run_argv_aliases
    return self.run(**all_cmd_args)
  File "/usr/lib/python2.4/site-packages/bzrlib/builtins.py", line 927, in run
    hardlink=hardlink)
  File "/usr/lib/python2.4/site-packages/bzrlib/bzrdir.py", line 949, in sprout
    result_repo.fetch(source_repository, revision_id=revision_id)
  File "/usr/lib/python2.4/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.4/site-packages/bzrlib/decorators.py", line 165, in write_locked
    return unbound(self, *args, **kwargs)
  File "/usr/lib/python2.4/site-packages/bzrlib/repository.py", line 2759, in fetch
    revision_ids).pack()
  File "/usr/lib/python2.4/site-packages/bzrlib/repofmt/pack_repo.py", line 589, in pack
    return self._create_pack_from_packs()
  File "/usr/lib/python2.4/site-packages/bzrlib/repofmt/pack_repo.py", line 722, in _create_pack_from_packs
    self._copy_text_texts()
  File "/usr/lib/python2.4/site-packages/bzrlib/repofmt/pack_repo.py", line 686, in _copy_text_texts
    self.new_pack.text_index, readv_group_iter, total_items))
  File "/usr/lib/python2.4/site-packages/bzrlib/repofmt/pack_repo.py", line 807, in _copy_nodes_graph
    write_index, output_lines, pb, readv_group_iter, total_items):
  File "/usr/lib/python2.4/site-packages/bzrlib/repofmt/pack_repo.py", line 844, in _do_copy_nodes_graph
    df, _ = knit_data._parse_record_header(version_id, raw_data)
  File "/usr/lib/python2.4/site-packages/bzrlib/knit.py", line 2503, in _parse_record_header
    "While reading {%s} got %s(%s)"
KnitCorrupt: Knit None corrupt: While reading {svn-v3-trunk1:6015fed2-1504-0410-9fe1-9d1591cc4771:python%2Ftrunk:7375} got IOError(CRC check failed 656520909 2686516852)

bzr 1.3 on python 2.4.5.final.0 (linux2)
arguments: ['/usr/bin/bzr', 'branch', 'lp:python', '<branch_name>']
encoding: 'ANSI_X3.4-1968', fsenc: 'ANSI_X3.4-1968', lang: None
plugins:
  bzrtools /usr/lib/python2.4/site-packages/bzrlib/plugins/bzrtools [1.3.0]
  launchpad /usr/lib/python2.4/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.
"""

So I remove the <branch_name> directory (which, BTW, is not "<branch_name>", but could be "foo") and try again:

$ rm -rf <branch_name>/
$ bzr branch lp:python <branch_name>

And this time I get:

"""
bzr: ERROR: exceptions.MemoryError:

Traceback (most recent call last):
  File "/usr/lib/python2.4/site-packages/bzrlib/commands.py", line 834, in run_bzr_catch_errors
    return run_bzr(argv)
  File "/usr/lib/python2.4/site-packages/bzrlib/commands.py", line 790, in run_bzr
    ret = run(*run_argv)
  File "/usr/lib/python2.4/site-packages/bzrlib/commands.py", line 492, in run_argv_aliases
    return self.run(**all_cmd_args)
  File "/usr/lib/python2.4/site-packages/bzrlib/builtins.py", line 927, in run
    hardlink=hardlink)
  File "/usr/lib/python2.4/site-packages/bzrlib/bzrdir.py", line 949, in sprout
    result_repo.fetch(source_repository, revision_id=revision_id)
  File "/usr/lib/python2.4/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.4/site-packages/bzrlib/decorators.py", line 165, in write_locked
    return unbound(self, *args, **kwargs)
  File "/usr/lib/python2.4/site-packages/bzrlib/repository.py", line 2759, in fetch
    revision_ids).pack()
  File "/usr/lib/python2.4/site-packages/bzrlib/repofmt/pack_repo.py", line 589, in pack
    return self._create_pack_from_packs()
  File "/usr/lib/python2.4/site-packages/bzrlib/repofmt/pack_repo.py", line 722, in _create_pack_from_packs
    self._copy_text_texts()
  File "/usr/lib/python2.4/site-packages/bzrlib/repofmt/pack_repo.py", line 673, in _copy_text_texts
    text_nodes = set(text_nodes)
  File "/usr/lib/python2.4/site-packages/bzrlib/index.py", line 1074, in iter_entries
    for node in index.iter_entries(keys):
  File "/usr/lib/python2.4/site-packages/bzrlib/index.py", line 478, in iter_entries
    return (result[1] for result in bisect_multi_bytes(
  File "/usr/lib/python2.4/site-packages/bzrlib/bisect_multi.py", line 50, in bisect_multi_bytes
    search_results = content_lookup(search_keys)
  File "/usr/lib/python2.4/site-packages/bzrlib/index.py", line 621, in _lookup_keys_via_location
    self._read_and_parse(readv_ranges)
  File "/usr/lib/python2.4/site-packages/bzrlib/index.py", line 964, in _read_and_parse
    self._parse_region(offset, data)
  File "/usr/lib/python2.4/site-packages/bzrlib/index.py", line 751, in _parse_region
    high_parsed, last_segment = self._parse_segment(
  File "/usr/lib/python2.4/site-packages/bzrlib/index.py", line 856, in _parse_segment
    self._bisect_nodes[key] = value
MemoryError

bzr 1.3 on python 2.4.5.final.0 (linux2)
arguments: ['/usr/bin/bzr', 'branch', 'lp:python', '<branch_name>']
encoding: 'ANSI_X3.4-1968', fsenc: 'ANSI_X3.4-1968', lang: None
plugins:
  bzrtools /usr/lib/python2.4/site-packages/bzrlib/plugins/bzrtools [1.3.0]
  launchpad /usr/lib/python2.4/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.
"""

So I tried a third time and that locked up Starship and it had to be killed.

TimeHorse (timehorse)
description: updated
Revision history for this message
Vincent Ladeuil (vila) wrote :

Can you re-try that with a newer bzr version (1.3 is quite old now), I have several python branches from lp:python here and I certainly not encounter that behavior.

Changed in bzr:
status: New → Incomplete
Revision history for this message
Jelmer Vernooij (jelmer) wrote :

This was because of a bzr-svn issue that has been fixed.

Changed in bzr:
status: Incomplete → 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.