ERROR: bzrlib.errors.NoSuchRevision: CHKInventoryRepository

Bug #418492 reported by Bob Tanner
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Bazaar
Fix Released
High
Unassigned

Bug Description

Attempting to convert a Standalone tree (format: pack-0.92) and getting error.

$ bzr --version
Bazaar (bzr) 2.0dev
  from bzr checkout /Users/tanner/projects/bzr.dev
    revision: 4640
    revid: <email address hidden>
    branch nick: trunk
  Python interpreter: /Library/Frameworks/Python.framework/Versions/2.6/Resources/Python.app/Contents/MacOS/Python 2.6.2
  Python standard library: /Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6
  Platform: Darwin-9.8.0-i386-32bit
  bzrlib: /Users/tanner/projects/bzr.dev/bzrlib
  Bazaar configuration: /Users/tanner/.bazaar
  Bazaar log file: /Users/tanner/.bzr.log

Attached are the output from 'bzr check', 'bzr reconcile', 'bzr upgrade --format 2a', 'bzr check' as well as the ~/.bzr.log file.

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

After the failed upgrade.

$ bzr info
Standalone tree (format: unnamed)
Location:
  branch root: .

Martin Pool (mbp)
Changed in bzr:
importance: Undecided → High
Revision history for this message
Bob Tanner (tanner) wrote :
Download full text (4.6 KiB)

Tried with 09/04 pull of bzr.dev.

~/.bzr.log (compressed) attached.

$ bzr upgrade --format 2a
starting upgrade of file:///Users/tanner/projects/WoW/AddOns/
making backup of file:///Users/tanner/projects/WoW/AddOns/.bzr
  to file:///Users/tanner/projects/WoW/AddOns/backup.bzr
starting repository conversion
Python(35552) malloc: *** mmap(size=20480) failed (error code=12)/895
*** error: can't allocate region
*** set a breakpoint in malloc_error_break to debug
bzr: ERROR: exceptions.MemoryError:

Traceback (most recent call last):
  File "/Users/tanner/projects/bzr.dev/bzrlib/commands.py", line 835, in exception_to_return_code
    return the_callable(*args, **kwargs)
  File "/Users/tanner/projects/bzr.dev/bzrlib/commands.py", line 1030, in run_bzr
    ret = run(*run_argv)
  File "/Users/tanner/projects/bzr.dev/bzrlib/commands.py", line 647, in run_argv_aliases
    return self.run(**all_cmd_args)
  File "/Users/tanner/projects/bzr.dev/bzrlib/builtins.py", line 3162, in run
    upgrade(url, format)
  File "/Users/tanner/projects/bzr.dev/bzrlib/upgrade.py", line 85, in upgrade
    Convert(url, format)
  File "/Users/tanner/projects/bzr.dev/bzrlib/upgrade.py", line 40, in __init__
    self.convert()
  File "/Users/tanner/projects/bzr.dev/bzrlib/upgrade.py", line 79, in convert
    self.bzrdir = converter.convert(self.bzrdir, self.pb)
  File "/Users/tanner/projects/bzr.dev/bzrlib/bzrdir.py", line 3023, in convert
    converter.convert(repo, pb)
  File "/Users/tanner/projects/bzr.dev/bzrlib/repository.py", line 4082, in convert
    self.source_repo.copy_content_into(converted)
  File "/Users/tanner/projects/bzr.dev/bzrlib/repository.py", line 1540, in copy_content_into
    return InterRepository.get(self, destination).copy_content(revision_id)
  File "/Users/tanner/projects/bzr.dev/bzrlib/decorators.py", line 192, in write_locked
    result = unbound(self, *args, **kwargs)
  File "/Users/tanner/projects/bzr.dev/bzrlib/repository.py", line 3393, in copy_content
    self.target.fetch(self.source, revision_id=revision_id)
  File "/Users/tanner/projects/bzr.dev/bzrlib/repository.py", line 1695, in fetch
    find_ghosts=find_ghosts, fetch_spec=fetch_spec)
  File "/Users/tanner/projects/bzr.dev/bzrlib/decorators.py", line 192, in write_locked
    result = unbound(self, *args, **kwargs)
  File "/Users/tanner/projects/bzr.dev/bzrlib/repository.py", line 4008, in fetch
    self._fetch_all_revisions(revision_ids, pb)
  File "/Users/tanner/projects/bzr.dev/bzrlib/repository.py", line 3963, in _fetch_all_revisions
    basis_id = self._fetch_batch(batch, basis_id, cache)
  File "/Users/tanner/projects/bzr.dev/bzrlib/repository.py", line 3898, in _fetch_batch
    not self.target._format._fetch_uses_deltas))
  File "/Users/tanner/projects/bzr.dev/bzrlib/groupcompress.py", line 1600, in insert_record_stream
    for _ in self._insert_record_stream(stream, random_id=False):
  File "/Users/tanner/projects/bzr.dev/bzrlib/groupcompress.py", line 1741, in _insert_record_stream
    flush()
  File "/Users/tanner/projects/bzr.dev/bzrlib/groupcompress.py", line 1635, in...

Read more...

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

I do not think this is a very large repository.

$ bzr check
Checking working tree at '/Users/tanner/projects/WoW/AddOns'.
Checking branch at 'file:///Users/tanner/projects/WoW/AddOns/'.
Checking repository at 'file:///Users/tanner/projects/WoW/AddOns/'.
checked repository <bzrlib.transport.local.LocalTransport url=file:///Users/tanner/projects/WoW/AddOns/> format <RepositoryFormatKnitPack1>
   895 revisions
 23273 file-ids

I have MacBook Pro with 4G of RAM. Attempted to re-do the upgrade with only iTerm running (and base OS services) and still get the Memory error (which likes OOM).

I dug around in groupcompress.py a little bit, but not familiar enough with things at that layer to do more then appreciate all of the hard work done at those levels.

Trivial repositories upgrade fine.

Any mentoring available?

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

Same issue Mac Pro with 8G RAM, will attempt on ubuntu hardy and 8G RAM and report back here.

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

Got the upgrade to work on FreeBSD and python-2.5.2. Could the problem be inside python-2.6.x?

Adding --version for details.

$ bzr --version
Bazaar (bzr) 2.1dev
  from bzr checkout /home/tanner/projects/bzr.dev
    revision: 4682
    revid: <email address hidden>
    branch nick: bzr.dev
  Python interpreter: /usr/local/bin/python 2.5.2
  Python standard library: /usr/local/lib/python2.5
  Platform: FreeBSD-6.4-PRERELEASE-i386-32bit-ELF
  bzrlib: /home/tanner/projects/bzr.dev/bzrlib
  Bazaar configuration: /home/tanner/.bazaar
  Bazaar log file: /home/tanner/.bzr.log

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

Same problem with osx and python-2.5.4.

Bazaar (bzr) 2.1dev
  from bzr checkout /Users/tanner/projects/bzr.dev
    revision: 4684
    revid: <email address hidden>
    branch nick: bzr.dev
  Python interpreter: /usr/bin/python2.5 2.5.4
  Python standard library: /System/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5
  Platform: Darwin-10.0.0-i386-32bit
  bzrlib: /Users/tanner/projects/bzr.dev/bzrlib
  Bazaar configuration: /Users/tanner/.bazaar
  Bazaar log file: /Users/tanner/.bzr.log

Martin Pool (mbp)
Changed in bzr:
status: New → Confirmed
Revision history for this message
Bob Tanner (tanner) wrote :

$ bzr --version
Bazaar (bzr) 2.1.0dev
  from bzr checkout /Users/tanner/projects/bzr.dev
    revision: 4716
    revid: <email address hidden>
    branch nick: bzr.dev
  Python interpreter: /usr/bin/python 2.6.1

Resolves this problem.

Revision history for this message
Robert Collins (lifeless) wrote :

This would have been the set of bugs spiv resolved very late in 2.0.0. then, I think. Thanks for checking.

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