Package: bup
Version: 0.17b-2squeeze1
Severity: important

bup uses the Python assert statement for regular operations, not just
for additional sanity checks that go beyond what should be done during
normal operation (i.e. "debugging assertions"). Python disables assert
when running in optimised mode [1,2], e.g. by running with -O [3] or
setting the PYTHONOPTIMIZE environment variable [4].

One effect is that "bup join" does not work at all:

{{{
sascha.silbe@twin:~$ bup join -r /media/bup-encfs-plain xo15-sascha-home 
bup server: reading from stdin.
bup server: command: 'set-dir /media/bup-encfs-plain'
bup server: bupdir is '/media/bup-encfs-plain'
bup server: command: 'list-indexes'
bup server: command: 'cat xo15-sascha-home'
Traceback (most recent call last):
  File "/usr/lib/bup/cmd/bup-server", line 183, in <module>
    cmd(conn, rest)
  File "/usr/lib/bup/cmd/bup-server", line 132, in cat
    for blob in cat_pipe.join(id):
  File "/usr/lib/bup/bup/git.py", line 907, in join
    for d in self._join(self.get(id)):
  File "/usr/lib/bup/bup/git.py", line 894, in _join
    for blob in self.join(treeline[5:]):
  File "/usr/lib/bup/bup/git.py", line 907, in join
    for d in self._join(self.get(id)):
  File "/usr/lib/bup/bup/git.py", line 882, in _join
    type = it.next()
  File "/usr/lib/bup/bup/git.py", line 852, in _fast_get
    raise GitError('expected blob, got %r' % spl)
bup.git.GitError: expected blob, got ['\n']
Traceback (most recent call last):
  File "/usr/lib/bup/cmd/bup-join", line 31, in <module>
    for blob in cat(id):
  File "/usr/lib/bup/bup/client.py", line 215, in cat
    sz = struct.unpack('!I', self.conn.read(4))[0]
struct.error: unpack requires a string argument of length 4
Exception bup.client.ClientError: ClientError('server tunnel returned exit code 
1',) in <bound method Client.__del__ of <bup.client.Client instance at 
0x1f425f0>> ignored
}}}


It's possible that it silently breaks during backup in ways that will
only get noticed when one actually tries to restore the backup, so
I've raised the priority to important. I haven't audited the code to
check whether any code path used during backup stages actually uses
assert with operations that have side effects, so feel free to lower
the priority if you're sure it can't silently corrupt data if run in
optimise mode.

The version currently in sid (0.25~git2011.11.04-3) is affected as well.


[1] http://docs.python.org/reference/simple_stmts.html#the-assert-statement
[2] http://docs.python.org/library/constants.html#__debug__
[3] http://docs.python.org/using/cmdline.html#cmdoption-O
[4] http://docs.python.org/using/cmdline.html#envvar-PYTHONOPTIMIZE

-- System Information:
Debian Release: 6.0.4
  APT prefers stable-updates
  APT policy: (500, 'stable-updates'), (500, 'stable'), (1, 'experimental')
Architecture: amd64 (x86_64)

Kernel: Linux 2.6.32-5-amd64 (SMP w/2 CPU cores)
Locale: LANG=en_GB, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages bup depends on:
ii  git [git-core]          1:1.7.9.5-1      fast, scalable, distributed revisi
ii  git-core                1:1.7.2.5-3      fast, scalable, distributed revisi
ii  libc6                   2.11.3-3         Embedded GNU C Library: Shared lib
ii  python                  2.6.6-3+squeeze6 interactive high-level object-orie
ii  python-fuse             2:0.2.1-2        Python bindings for FUSE (Filesyst
ii  python-support          1.0.10           automated rebuilding support for P
ii  python-tornado          1.0.1-1          scalable, non-blocking web server 

Versions of packages bup recommends:
ii  par2                          0.4-11     Parity Archive Volume Set, for che

bup suggests no packages.

-- no debconf information



-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to