qsubprocess crashes with invalid bencode data from subprocess
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Bazaar Explorer |
Invalid
|
Undecided
|
Unassigned | ||
Bazaar Git Plugin |
Invalid
|
Undecided
|
Unassigned | ||
QBzr |
Fix Released
|
High
|
Alexander Belchenko |
Bug Description
I wanted to branch git://github.
The first time it went OK, the second I changed the destination directory and it failed with the message below. The new local repository/branch seems OK though.
bzr: ERROR: exceptions.
Traceback (most recent call last):
File "/usr/lib/
progress, transport_activity, messages = map(ensure_unicode, bencode.
File "_bencode_pyx.pyx", line 218, in _bencode_
File "_bencode_pyx.pyx", line 83, in _bencode_
File "_bencode_pyx.pyx", line 105, in _bencode_
File "_bencode_pyx.pyx", line 186, in _bencode_
File "_bencode_pyx.pyx", line 102, in _bencode_
File "_bencode_pyx.pyx", line 164, in _bencode_
ValueError: stream underflow
bzr 2.0.0 on python 2.6.4 (linux2)
arguments: ['/usr/bin/bzr', 'explorer']
encoding: 'UTF-8', fsenc: 'UTF-8', lang: 'en_US.UTF-8'
plugins:
bzrtools /usr/lib/
cvsps_import /home/seb/
dbus /usr/lib/
etckeeper /usr/lib/
explorer /usr/lib/
git /usr/lib/
gtk /usr/lib/
launchpad /usr/lib/
netrc_
qbzr /usr/lib/
svn /usr/lib/
Related branches
description: | updated |
Changed in bzr-git: | |
status: | New → Incomplete |
Changed in bzr-explorer: | |
status: | New → Invalid |
summary: |
- branching from github failed + qsubprocess crashes with invalid bencode data from subprocess |
Changed in qbzr: | |
status: | Confirmed → Fix Released |
assignee: | nobody → Alexander Belchenko (bialix) |
Changed in bzr-git: | |
status: | Incomplete → Invalid |
I don't know the specific cause, but looking at the traceback, this looks more like a bug in bzr-git that is provoking a bug in qbzr.
Specifically, I would guess that bzr-git somehow crashed, and that caused the output stream that was being watched to get truncated in the middle. This in turn caused qbzr to fail while parsing the stream.
I don't know what/how/why, but my initial guess would be that bzr-git segfaulted, which prevents anything buffered in stdout to get flushed.
Arguably qbzr should be having a try/except around the stream it is reading, so that it can give a nicer error to the user that the command was killed.