bzr: ERROR: exceptions.SystemError: Negative size passed to PyString_FromStringAndSize when dirstate file has additional \0 at the end of the file
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Bazaar |
Confirmed
|
Undecided
|
Unassigned |
Bug Description
if a dirstate file ends up with a spare \0 at the end of the file, the parser croaks. This may be happening because of the use of truncate()
I am running bzr via sftp over openvpn from a laptop to a server.
bzr return a seg-fault when I try to commit
See the following
flyvemaskine:
Segmentation fault
flyvemaskine:
Segmentation fault
flyvemaskine:
checked branch file://
checked repository <bzrlib.
bzr: ERROR: exceptions.
Traceback (most recent call last):
File "/usr/lib/
File "_dirstate_
File "_dirstate_
SystemError: Negative size passed to PyString_
bzr 1.3.1 on python 2.5.2.final.0 (linux2)
arguments: ['/usr/bin/bzr', 'check']
summary: |
bzr: ERROR: exceptions.SystemError: Negative size passed to - PyString_FromStringAndSize + PyString_FromStringAndSize when dirstate file has additional \0 at the + end of the file |
description: | updated |
description: | updated |
description: | updated |
Changed in bzr: | |
status: | Expired → Confirmed |
tags: | added: check-for-breezy |
I think I'm having the same problem. I have the following setup:
* I use bzr 1.5 under Ubuntu 8.04;
* Ubuntu is running under VirtualBox 1.6 with Windows XP Professional SP2 as host OS;
* the branch is on a NTFS partition and is accessed by Ubuntu through a (permanent) shared folder made with VirtualBox.
I can use the branch without problems for a while, then suddenly bzr throws an exception. If I delete the .bzr directory and recreate the branch the branch works fine... until the next "corruption". Below the output - first I invoke status, next a check:
ermiotto@ hardy-vbox: /mnt/shared/ intelligenti/ progetto_ si$ bzr status SystemError: Negative size passed to PyString_ FromStringAndSi ze
bzr: ERROR: exceptions.
Traceback (most recent call last): python2. 5/site- packages/ bzrlib/ commands. py", line 846, in run_bzr_ catch_errors python2. 5/site- packages/ bzrlib/ commands. py", line 797, in run_bzr python2. 5/site- packages/ bzrlib/ commands. py", line 499, in run_argv_aliases **all_cmd_ args) python2. 5/site- packages/ bzrlib/ commands. py", line 807, in ignore_pipe python2. 5/site- packages/ bzrlib/ builtins. py", line 178, in run pending= not no_pending) python2. 5/site- packages/ bzrlib/ status. py", line 117, in show_tree_status unversioned= want_unversione d) python2. 5/site- packages/ bzrlib/ tree.py" , line 93, in changes_from unversioned= want_unversione d, python2. 5/site- packages/ bzrlib/ decorators. py", line 127, in read_locked python2. 5/site- packages/ bzrlib/ tree.py" , line 734, in compare unversioned= want_unversione d) python2. 5/site- packages/ bzrlib/ delta.py" , line 217, in _compare_trees unversioned= want_unversione d): python2. 5/site- packages/ bzrlib/ workingtree_ 4.py", line 1836, in iter_changes _read_dirblocks _if_needed( ) python2. 5/site- packages/ bzrlib/ dirstate. py", line 1963, in _read_dirblocks _if_needed dirblocks( self) helpers_ c.pyx", line 694, in _dirstate_ helpers_ c._read_ dirblocks_ c helpers_ c.pyx", line 661, in _dirstate_ helpers_ c.Reader. _parse_ dirblocks helpers_ c.pyx", line 583, in _dirstate_ helpers_ c.Reader. _get_entry helpers_ c.pyx", line 502, in _dirstate_ helpers_ c.Reader. get_next_ str FromStringAndSi ze
File "/usr/lib/
return run_bzr(argv)
File "/usr/lib/
ret = run(*run_argv)
File "/usr/lib/
return self.run(
File "/usr/lib/
result = func(*args, **kwargs)
File "/usr/lib/
show_
File "/usr/lib/
want_
File "/usr/lib/
want_
File "/usr/lib/
return unbound(self, *args, **kwargs)
File "/usr/lib/
want_
File "/usr/lib/
want_
File "/usr/lib/
state.
File "/usr/lib/
_read_
File "_dirstate_
File "_dirstate_
File "_dirstate_
File "_dirstate_
SystemError: Negative size passed to PyString_
bzr 1.5 on python 2.5.2 (linux2) python2. 5/site- packages/ bzrlib/ plugins/ bzrtools [1.5.0] python2. 5/site- packages/ bzrlib/ plugins/ launchpad [unknown] /bugs.launchpad .net/bzr/ +filebug hardy-vbox: /mn...
arguments: ['/usr/bin/bzr', 'status']
encoding: 'UTF-8', fsenc: 'UTF-8', lang: 'en_US.UTF-8'
plugins:
bzrtools /usr/lib/
launchpad /usr/lib/
*** Bazaar has encountered an internal error.
Please report a bug at https:/
including this traceback, and a description of what you
were doing when the error occurred.
ermiotto@