bzr: ERROR: exceptions.SystemError: Negative size passed to PyString_FromStringAndSize

Bug #681257 reported by Juan Miguel Taboada Godoy
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Bazaar
New
Undecided
Unassigned

Bug Description

After doing "bzr commit -m ..." we got a Segmentation Fault, then I tried "bzr check" and got this error:

$ bzr check
checked branch file:///var/www/our_project/ format Bazaar Branch Format 6 (bzr 0.15)
checked repository <bzrlib.transport.local.LocalTransport url=file:///var/www/our_project/> format <RepositoryFormatKnitPack1>
   504 revisions
  1960 file-ids
  5275 unique file texts
328137 repeated file texts
     0 unreferenced text versions
bzr: ERROR: exceptions.SystemError: Negative size passed to PyString_FromStringAndSize

Traceback (most recent call last):
  File "/usr/lib/python2.5/site-packages/bzrlib/commands.py", line 846, in run_bzr_catch_errors
    return run_bzr(argv)
  File "/usr/lib/python2.5/site-packages/bzrlib/commands.py", line 797, in run_bzr
    ret = run(*run_argv)
  File "/usr/lib/python2.5/site-packages/bzrlib/commands.py", line 499, in run_argv_aliases
    return self.run(**all_cmd_args)
  File "/usr/lib/python2.5/site-packages/bzrlib/builtins.py", line 2436, in run
    if len(list(repo_basis.iter_changes(tree_basis))):
  File "/usr/lib/python2.5/site-packages/bzrlib/tree.py", line 784, in iter_changes
    from_entries_by_dir = list(self.source.inventory.iter_entries_by_dir(
  File "/usr/lib/python2.5/site-packages/bzrlib/workingtree_4.py", line 1623, in _get_inventory
    self._generate_inventory()
  File "/usr/lib/python2.5/site-packages/bzrlib/workingtree_4.py", line 1479, in _generate_inventory
    self._dirstate._read_dirblocks_if_needed()
  File "/usr/lib/python2.5/site-packages/bzrlib/dirstate.py", line 1963, in _read_dirblocks_if_needed
    _read_dirblocks(self)
  File "_dirstate_helpers_c.pyx", line 694, in _dirstate_helpers_c._read_dirblocks_c
  File "_dirstate_helpers_c.pyx", line 661, in _dirstate_helpers_c.Reader._parse_dirblocks
  File "_dirstate_helpers_c.pyx", line 608, in _dirstate_helpers_c.Reader._get_entry
  File "_dirstate_helpers_c.pyx", line 502, in _dirstate_helpers_c.Reader.get_next_str
SystemError: Negative size passed to PyString_FromStringAndSize

bzr 1.5 on python 2.5.5 (linux2)
arguments: ['/usr/bin/bzr', 'check']
encoding: 'UTF-8', fsenc: 'UTF-8', lang: 'en_US.UTF-8'
plugins:
  bzrtools /usr/lib/python2.5/site-packages/bzrlib/plugins/bzrtools [1.5.0]
  launchpad /usr/lib/python2.5/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.

Thanks in advance.

Revision history for this message
Juan Miguel Taboada Godoy (juanmi-centrologic) wrote :

I upgraded to bzr 2.1.2 and I got a new error already reported as BUG number '681278'

Revision history for this message
Juan Miguel Taboada Godoy (juanmi-centrologic) wrote :

Is related to BUG #681278

Revision history for this message
Juan Miguel Taboada Godoy (juanmi-centrologic) wrote :

Hello, I found a temporal solution to repair the repository (I have to say now I am using bzr 2.1.2):

You can repair your bazaar repository (loosing the uncommited changes) using the next steps:
mv .bzr/checkout .bzr/oldcheckout
run bzr checkout --lightweight . ../tempcheckout
cp ../tempcheckout/.bzr/checkout .bzr/

Sincerely.

Revision history for this message
Vincent Ladeuil (vila) wrote :

This is a duplicate of bug #226036 which gives a workaround but for which we still don't know the root cause :-/

On the bright side, it seems to have been fixed in more recent releases anyway.

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.