assertion error on bzr get_next() called when there are no chars left

Bug #670165 reported by dlebauer
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Bazaar
Confirmed
Undecided
Unassigned

Bug Description

bzr 2.0.3 on python 2.4.3 on linux redhat

Just updating a file from emacs using M-x vv C-c C-c as usual, got the following error:

Traceback (most recent call last):
  File "/usr/lib64/python2.4/site-packages/bzrlib/commands.py", line 842, in exception_to_return_code
    return the_callable(*args, **kwargs)
  File "/usr/lib64/python2.4/site-packages/bzrlib/commands.py", line 1037, in run_bzr
    ret = run(*run_argv)
  File "/usr/lib64/python2.4/site-packages/bzrlib/commands.py", line 654, in run_argv_aliases
    return self.run(**all_cmd_args)
  File "/usr/lib64/python2.4/site-packages/bzrlib/commands.py", line 1052, in ignore_pipe
    result = func(*args, **kwargs)
  File "/usr/lib64/python2.4/site-packages/bzrlib/builtins.py", line 319, in run
    show_pending=(not no_pending), verbose=verbose)
  File "/usr/lib64/python2.4/site-packages/bzrlib/status.py", line 118, in show_tree_status
    want_unversioned=want_unversioned)
  File "/usr/lib64/python2.4/site-packages/bzrlib/tree.py", line 95, in changes_from
    want_unversioned=want_unversioned,
  File "/usr/lib64/python2.4/site-packages/bzrlib/decorators.py", line 138, in read_locked
    result = unbound(self, *args, **kwargs)
  File "/usr/lib64/python2.4/site-packages/bzrlib/tree.py", line 977, in compare
    want_unversioned=want_unversioned)
  File "/usr/lib64/python2.4/site-packages/bzrlib/delta.py", line 230, in _compare_trees
    want_unversioned=want_unversioned):
  File "/usr/lib64/python2.4/site-packages/bzrlib/tree.py", line 103, in iter_changes
    extra_trees, require_versioned, want_unversioned=want_unversioned)
  File "/usr/lib64/python2.4/site-packages/bzrlib/workingtree_4.py", line 2070, in iter_changes
    state._read_dirblocks_if_needed()
  File "/usr/lib64/python2.4/site-packages/bzrlib/dirstate.py", line 2200, in _read_dirblocks_if_needed
    _read_dirblocks(self)
  File "_dirstate_helpers_pyx.pyx", line 767, in bzrlib._dirstate_helpers_pyx._read_dirblocks
  File "_dirstate_helpers_pyx.pyx", line 733, in bzrlib._dirstate_helpers_pyx.Reader._parse_dirblocks
  File "_dirstate_helpers_pyx.pyx", line 654, in bzrlib._dirstate_helpers_pyx.Reader._get_entry
  File "_dirstate_helpers_pyx.pyx", line 572, in bzrlib._dirstate_helpers_pyx.Reader.get_next_str
  File "_dirstate_helpers_pyx.pyx", line 554, in bzrlib._dirstate_helpers_pyx.Reader.get_next
AssertionError: get_next() called when there are no chars left

bzr 2.0.3 on python 2.4.3 (Linux-2.6.18-164.11.1.el5xen-x86_64-with-redhat-5.4-Tikanga)
arguments: ['/usr/bin/bzr', 'status']
encoding: 'UTF-8', fsenc: 'UTF-8', lang: 'en_US.UTF-8'
plugins:
  launchpad /usr/lib64/python2.4/site-packages/bzrlib/plugins/launchpad [2.0.3]
  netrc_credential_store /usr/lib64/python2.4/site-packages/bzrlib/plugins/netrc_credential_store [2.0.3]

*** Bazaar has encountered an internal error. This probably indicates a
    bug in Bazaar. You can help us fix it by filing a bug report at
        https://bugs.launchpad.net/bzr/+filebug
    including this traceback and a description of the problem.

Revision history for this message
John A Meinel (jameinel) wrote : Re: [Bug 670165] [NEW] assertion error on bzr get_next() called when there are no chars left

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

On 11/2/2010 5:53 PM, dlebauer wrote:
> Public bug reported:
>
> bzr 2.0.3 on python 2.4.3 on linux redhat
>
...

> File "_dirstate_helpers_pyx.pyx", line 554, in bzrlib._dirstate_helpers_pyx.Reader.get_next
> AssertionError: get_next() called when there are no chars left

This indicates a corrupted dirstate file. We expected there to be more
content (the end-of-content has not been reached), but there are no
bytes left.

Generally this means the file was truncated/corrupted by the filesystem.

The easiest way to fix it, is to check out into another location, and
then copy the .bzr/checkout/dirstate file over.

John
=:->

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

iEYEARECAAYFAkzRgQIACgkQJdeBCYSNAAP5GgCgqRW+3HP7wO8IVPM+0TrGA12V
XwIAoINnahb3apoYZznMoIMcQnn6mqFb
=koNq
-----END PGP SIGNATURE-----

Vincent Ladeuil (vila)
Changed in bzr:
status: New → Confirmed
Revision history for this message
Vincent Ladeuil (vila) wrote :

@dlebauer: Did the workaround recommended by John worked ?

We only rarely hear about this kind of failure so it's hard to diagnose, any weird event you can remember before this failure occurred ?

You're using a pretty old version: 2.0.3 was released 2009-12-14 and 2.0.6 is the latest release in the 2.0 series.
The current stable release is 2.2.1, I don't have a precise pointer but I'm pretty sure it has been packaged for redhat, so you should be able to upgrade.

Revision history for this message
dlebauer (dlebauer) wrote : Re: [Bug 670165] Re: assertion error on bzr get_next() called when there are no chars left

Sorry, ever since I uninstalled bzr explorer, I haven't had any issues
so I haven't tried the workaround. Just now, I reinstalled bzr
explorer to see if I could reproduce the error but I got stuck when I
attempted to open a branch on the redhat server, it gives me errors
related to a previous directory relocation using "mv" instead of "bzr
mv", e.g. when I try to open the new branch it says that the old
branch directory is not a branch.

I will be sure to report back if I can get this issue fixed and
recreate the error.

Thanks,

David

On Fri, Nov 12, 2010 at 5:47 AM, Vincent Ladeuil
<email address hidden> wrote:
> @dlebauer: Did the workaround recommended by John worked ?
>
> We only rarely hear about this kind of failure so it's hard to diagnose,
> any weird event you can remember before this failure occurred ?
>
> You're using a pretty old version: 2.0.3 was released 2009-12-14 and 2.0.6 is the latest release in the 2.0 series.
> The current stable release is 2.2.1, I don't have a precise pointer but I'm pretty sure it has been packaged for redhat, so you should be able to upgrade.
>
> --
> assertion error on bzr get_next() called when there are no chars left
> https://bugs.launchpad.net/bugs/670165
> You received this bug notification because you are a direct subscriber
> of the bug.
>

--
David LeBauer, PhD
Energy Biosciences Institute
University of Illinois Urbana-Champaign
1206 W. Gregory Drive
Urbana, IL  61801, U.S.A.

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.