'AbsentContentFactory' object has no attribute 'get_bytes_as' errors with CHK repository on write operations

Bug #365615 reported by Tommaso R. Donnarumma
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Bazaar
Fix Released
Critical
Robert Collins
1.16
Fix Released
Critical
Unassigned
Launchpad itself
Fix Released
Critical
Unassigned

Bug Description

When a 2a format 'autopacks' (approximately 1 in 10 commits, some pushes, etc), it will error with 'AbsentContentFactory'. This occurs when *writing* to a repository.

Workaround
=======

Run 'bzr pack' to prevent autopack kicking in.

Fixes
=====

bzr 1.17 and 1.16.1 will include the fix, or bzr.dev rev 4470 has a fix for this bug.

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

There was some chat about this on the mailing list, and stacked branches are not involved. So this is not a duplicate of bug 354036, despite the similar symptom.

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

Are you doing concurrent operations when this happens? We really need some way to reproduce - perhaps a copy of the project when the error is happening before you pack-to-fix. You could take that copy locally and then we could give you some analysis scripts to run on it.

Changed in bzr:
importance: Undecided → Critical
status: New → Incomplete
Revision history for this message
Tommaso R. Donnarumma (tawmas) wrote :

Robert, I'm developing solo and I'm doing just one operation at a time.

I'll be glad to run any analysis scripts you will throw at me so long as I can keep the code private. As soon as the error happens again, I'll take a copy of the repository and branches for later dissection. Please, let me know if a recursive copy or rsync is suitable for that.

Revision history for this message
Robert Collins (lifeless) wrote : Re: [Bug 365615] Re: Random 'AbsentContentFactory' object has no attribute 'get_bytes_as' errors with CHK repository

On Thu, 2009-06-11 at 20:01 +0000, Tommaso R. Donnarumma wrote:
> Robert, I'm developing solo and I'm doing just one operation at a time.
>
> I'll be glad to run any analysis scripts you will throw at me so long as
> I can keep the code private. As soon as the error happens again, I'll
> take a copy of the repository and branches for later dissection. Please,
> let me know if a recursive copy or rsync is suitable for that.

rsync is fine - if you have a shared repository be sure to rsync the
whole repository. What we want is a state where you can trigger the
problem at will; that will let us get to grips with it.

-Rob

Revision history for this message
Papadakos Panagiotis (papadako) wrote : Re: Random 'AbsentContentFactory' object has no attribute 'get_bytes_as' errors with CHK repository
Download full text (3.9 KiB)

I think I have the same problem. This happens while 'bzr branch' to a shared repository.
I get:

bzr: ERROR: exceptions.AttributeError: 'AbsentContentFactory' object has no attribute 'get_bytes_as'

Traceback (most recent call last):
  File "/usr/lib/python2.5/site-packages/bzrlib/commands.py", line 831, in exception_to_return_code
    return the_callable(*args, **kwargs)
  File "/usr/lib/python2.5/site-packages/bzrlib/commands.py", line 1026, in run_bzr
    ret = run(*run_argv)
  File "/usr/lib/python2.5/site-packages/bzrlib/commands.py", line 643, in run_argv_aliases
    return self.run(**all_cmd_args)
  File "/usr/lib/python2.5/site-packages/bzrlib/builtins.py", line 1173, in run
    source_branch=br_from)
  File "/usr/lib/python2.5/site-packages/bzrlib/bzrdir.py", line 1176, in sprout
    result_repo.fetch(source_repository, revision_id=revision_id)
  File "/usr/lib/python2.5/site-packages/bzrlib/repository.py", line 1552, in fetch
    find_ghosts=find_ghosts, fetch_spec=fetch_spec)
  File "/usr/lib/python2.5/site-packages/bzrlib/decorators.py", line 192, in write_locked
    result = unbound(self, *args, **kwargs)
  File "/usr/lib/python2.5/site-packages/bzrlib/repository.py", line 3184, in fetch
    pb=pb, find_ghosts=find_ghosts)
  File "/usr/lib/python2.5/site-packages/bzrlib/fetch.py", line 79, in __init__
    self.__fetch()
  File "/usr/lib/python2.5/site-packages/bzrlib/fetch.py", line 105, in __fetch
    self._fetch_everything_for_search(search)
  File "/usr/lib/python2.5/site-packages/bzrlib/fetch.py", line 133, in _fetch_everything_for_search
    stream, from_format, [])
  File "/usr/lib/python2.5/site-packages/bzrlib/repository.py", line 3948, in insert_stream
    return self._locked_insert_stream(stream, src_format, is_resume)
  File "/usr/lib/python2.5/site-packages/bzrlib/repository.py", line 4037, in _locked_insert_stream
    self.target_repo.commit_write_group()
  File "/usr/lib/python2.5/site-packages/bzrlib/repository.py", line 1416, in commit_write_group
    self._commit_write_group()
  File "/usr/lib/python2.5/site-packages/bzrlib/repofmt/pack_repo.py", line 2287, in _commit_write_group
    return self._pack_collection._commit_write_group()
  File "/usr/lib/python2.5/site-packages/bzrlib/repofmt/pack_repo.py", line 2097, in _commit_write_group
    if not self.autopack():
  File "/usr/lib/python2.5/site-packages/bzrlib/repofmt/pack_repo.py", line 1466, in autopack
    return self._do_autopack()
  File "/usr/lib/python2.5/site-packages/bzrlib/repofmt/pack_repo.py", line 1506, in _do_autopack
    reload_func=self._restart_autopack)
  File "/usr/lib/python2.5/site-packages/bzrlib/repofmt/groupcompress_repo.py", line 584,...

Read more...

Revision history for this message
Papadakos Panagiotis (papadako) wrote :
Download full text (3.7 KiB)

Running 'bzr pack' returns:

bzr: ERROR: zlib.error: Error -3 while decompressing: incorrect data check

Traceback (most recent call last):
  File "/usr/lib/python2.5/site-packages/bzrlib/commands.py", line 831, in exception_to_return_code
    return the_callable(*args, **kwargs)
  File "/usr/lib/python2.5/site-packages/bzrlib/commands.py", line 1026, in run_bzr
    ret = run(*run_argv)
  File "/usr/lib/python2.5/site-packages/bzrlib/commands.py", line 643, in run_argv_aliases
    return self.run(**all_cmd_args)
  File "/usr/lib/python2.5/site-packages/bzrlib/builtins.py", line 4164, in run
    repository.pack()
  File "/usr/lib/python2.5/site-packages/bzrlib/decorators.py", line 192, in write_locked
    result = unbound(self, *args, **kwargs)
  File "/usr/lib/python2.5/site-packages/bzrlib/repofmt/pack_repo.py", line 2357, in pack
    self._pack_collection.pack()
  File "/usr/lib/python2.5/site-packages/bzrlib/repofmt/pack_repo.py", line 1580, in pack
    self._execute_pack_operations(pack_operations, OptimisingPacker)
  File "/usr/lib/python2.5/site-packages/bzrlib/repofmt/groupcompress_repo.py", line 584, in _execute_pack_operations
    packer.pack()
  File "/usr/lib/python2.5/site-packages/bzrlib/repofmt/pack_repo.py", line 754, in pack
    return self._create_pack_from_packs()
  File "/usr/lib/python2.5/site-packages/bzrlib/repofmt/groupcompress_repo.py", line 459, in _create_pack_from_packs
    self._copy_text_texts()
  File "/usr/lib/python2.5/site-packages/bzrlib/repofmt/groupcompress_repo.py", line 442, in _copy_text_texts
    'text', self._get_progress_stream, 4)
  File "/usr/lib/python2.5/site-packages/bzrlib/repofmt/groupcompress_repo.py", line 394, in _copy_stream
    reuse_blocks=False):
  File "/usr/lib/python2.5/site-packages/bzrlib/groupcompress.py", line 1451, in _insert_record_stream
    bytes = record.get_bytes_as('fulltext')
  File "/usr/lib/python2.5/site-packages/bzrlib/groupcompress.py", line 419, in get_bytes_as
    self._manager._...

Read more...

Changed in bzr:
assignee: nobody → Robert Collins (lifeless)
status: Incomplete → Fix Committed
Changed in bzr:
milestone: none → 1.17
status: Fix Committed → Fix Released
tags: added: lp-needs
description: updated
summary: - Random 'AbsentContentFactory' object has no attribute 'get_bytes_as'
- errors with CHK repository
+ 'AbsentContentFactory' object has no attribute 'get_bytes_as' errors
+ with CHK repository on write operations
Revision history for this message
Jonathan Lange (jml) wrote :

We've landed the fix on our bzr branch, waiting for the reroll.

Changed in launchpad-code:
importance: Undecided → Critical
milestone: none → 2.2.6
status: New → Fix Committed
James Westby (james-w)
description: updated
Revision history for this message
Martin Pool (mbp) wrote :

Was released in 1.16.1

Tim Penhey (thumper)
Changed in launchpad-code:
status: Fix Committed → 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.