ValueError: Something wrong with: cp_off = 2314752, cp_size = 3 source_size = 494614, size = 89493

Bug #869022 reported by Quentin THEURET @Amaris
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Bazaar
Fix Committed
Undecided
Unassigned

Bug Description

Bazaar version : 2.4.1
OS Version : Ubuntu 10.04 and 11.04
Python version : 2.6 and 2.7

When I try to branch this branch : lp:unifield-server, I have this traceback :

bzr: ERROR: exceptions.ValueError: Something wrong with: cp_off = 2314752, cp_size = 3 source_size = 494614, size = 89493

Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/bzrlib/commands.py", line 946, in exception_to_return_code
    return the_callable(*args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/bzrlib/commands.py", line 1150, in run_bzr
    ret = run(*run_argv)
  File "/usr/lib/python2.7/dist-packages/bzrlib/commands.py", line 699, in run_argv_aliases
    return self.run(**all_cmd_args)
  File "/usr/lib/python2.7/dist-packages/bzrlib/commands.py", line 721, in run
    return self._operation.run_simple(*args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/bzrlib/cleanup.py", line 135, in run_simple
    self.cleanups, self.func, *args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/bzrlib/cleanup.py", line 165, in _do_with_cleanups
    result = func(*args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/bzrlib/builtins.py", line 1307, in run
    source_branch=br_from)
  File "/usr/lib/python2.7/dist-packages/bzrlib/bzrdir.py", line 453, in sprout
    create_tree_if_local=create_tree_if_local)
  File "/usr/lib/python2.7/dist-packages/bzrlib/cleanup.py", line 131, in run
    self.cleanups, self.func, self, *args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/bzrlib/cleanup.py", line 165, in _do_with_cleanups
    result = func(*args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/bzrlib/bzrdir.py", line 494, in _sprout
    result_repo.fetch(source_repository, fetch_spec=fetch_spec)
  File "/usr/lib/python2.7/dist-packages/bzrlib/repository.py", line 724, in fetch
    find_ghosts=find_ghosts, fetch_spec=fetch_spec)
  File "/usr/lib/python2.7/dist-packages/bzrlib/decorators.py", line 217, in write_locked
    result = unbound(self, *args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/bzrlib/vf_repository.py", line 2499, in fetch
    find_ghosts=find_ghosts)
  File "/usr/lib/python2.7/dist-packages/bzrlib/fetch.py", line 75, in __init__
    self.__fetch()
  File "/usr/lib/python2.7/dist-packages/bzrlib/fetch.py", line 102, in __fetch
    self._fetch_everything_for_search(search_result)
  File "/usr/lib/python2.7/dist-packages/bzrlib/fetch.py", line 130, in _fetch_everything_for_search
    stream, from_format, [])
  File "/usr/lib/python2.7/dist-packages/bzrlib/vf_repository.py", line 1962, in insert_stream
    src_format, is_resume)
  File "/usr/lib/python2.7/dist-packages/bzrlib/vf_repository.py", line 2026, in insert_stream_without_locking
    self.target_repo.texts.insert_record_stream(substream)
  File "/usr/lib/python2.7/dist-packages/bzrlib/groupcompress.py", line 1661, in insert_record_stream
    for _ in self._insert_record_stream(stream, random_id=False):
  File "/usr/lib/python2.7/dist-packages/bzrlib/groupcompress.py", line 1802, in _insert_record_stream
    bytes = record.get_bytes_as('fulltext')
  File "/usr/lib/python2.7/dist-packages/bzrlib/groupcompress.py", line 474, in get_bytes_as
    self._bytes = block.extract(self.key, self._start, self._end)
  File "/usr/lib/python2.7/dist-packages/bzrlib/groupcompress.py", line 280, in extract
    bytes = apply_delta_to_source(self._content, content_start, end)
  File "_groupcompress_pyx.pyx", line 546, in bzrlib._groupcompress_pyx.apply_delta_to_source (bzrlib/_groupcompress_pyx.c:4861)
  File "_groupcompress_pyx.pyx", line 497, in bzrlib._groupcompress_pyx._apply_delta (bzrlib/_groupcompress_pyx.c:4385)
ValueError: Something wrong with: cp_off = 2314752, cp_size = 3 source_size = 494614, size = 89493

But, if I launch:
bzr branch lp:unifield-server -r 3363
cd unifield-server
bzr pull

It's ok.

Revision history for this message
Quentin THEURET @Amaris (qtheuret) wrote :
Revision history for this message
Quentin THEURET @Amaris (qtheuret) wrote :

This bug happens also if I try to branch in local. So it's not due to Launchpad nor connectivity.

Revision history for this message
Martin Pool (mbp) wrote : Re: [Bug 869022] Re: ValueError: Something wrong with: cp_off = 2314752, cp_size = 3 source_size = 494614, size = 89493

I think this means there is some corruption in your local repository,
of a kind we haven't seen before.

If the repository contents are public please tar them up and attach
them to this bug.

I suggest you just make a new repository and branch from Launchpad
into that. You should then be able to branch any work in progress
into the new repo.

Martin Pool (mbp)
Changed in bzr:
status: New → Incomplete
Revision history for this message
John A Meinel (jameinel) wrote : Re: [Bug 869022] [NEW] ValueError: Something wrong with: cp_off = 2314752, cp_size = 3 source_size = 494614, size = 89493

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 10/6/2011 11:36 AM, Quentin THEURET wrote:
> Public bug reported:
>
> Bazaar version : 2.4.1 OS Version : Ubuntu 10.04 and 11.04 Python
> version : 2.6 and 2.7
>
> When I try to branch this branch : lp:unifield-server, I have
> this traceback :
>
> bzr: ERROR: exceptions.ValueError: Something wrong with: cp_off =
> 2314752, cp_size = 3 source_size = 494614, size = 89493
>
...

> ValueError: Something wrong with: cp_off = 2314752, cp_size = 3
> source_size = 494614, size = 89493
>
>
> But, if I launch: bzr branch lp:unifield-server -r 3363 cd
> unifield-server bzr pull
>
> It's ok.

This indicates there is some sort of corrupted data in your files.
Specifically, it says to copy 3 bytes from offset 2,314,752, however
'source_size' is 494,614. You can't copy bytes at offset 2M when the
source is only 500kB long.

How you got this, I don't understand. But my guess is that either
something in your local repository or something in
"lp:unifield-server" is corrupted.

John
=:->
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk6NncEACgkQJdeBCYSNAAPz6ACeJS+qINjwJifo3yVhR1RUVLF0
wCAAoLTccxqBdikHy8zLcKknADRLtggI
=ntVL
-----END PGP SIGNATURE-----

Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for Bazaar because there has been no activity for 60 days.]

Changed in bzr:
status: Incomplete → Expired
Revision history for this message
jftempo (jfb-tempo-consulting) wrote :

> something in "lp:unifield-server" is corrupted
Yes you're right, revno 2187.1.1 seems corrupted:
 bzr diff -c 2187.1.1
 bzr: ERROR: exceptions.ValueError: Something wrong with: cp_off = 2314752, cp_size = 3 source_size = 494614, size = 89493

But what can I do ? Please help me !

Changed in bzr:
status: Expired → Confirmed
Revision history for this message
jftempo (jfb-tempo-consulting) wrote :

More info:
 bzr branch -r 3368 lp:unifield-server is OK
but
 bzr branch -r 3369 lp:unifield-server failed

Revno 3369 is a merged commit.
Inside revno 3369:
  bzr branch -r 3359.2.64 lp:unifield-server is OK
but
  bzr branch -r 3359.2.65 lp:unifield-server failed

So revno 3359.2.65 in lp:unifield-server is corrupted.

I really need your help.
Thanks.

Revision history for this message
jftempo (jfb-tempo-consulting) wrote :

Fix by wgrant and vila by irc.
Lauchnpad repo was corrupted.

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