PYTHONOPTIMIZE causes rdiff-backup to crash

Bug #658413 reported by gwern on 2010-10-11
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
rdiff-backup (Ubuntu)
Low
Unassigned

Bug Description

Binary package hint: rdiff-backup

With a recently re-installed system:

$ uname -a
Linux craft 2.6.32-25-generic-pae #44-Ubuntu SMP Fri Sep 17 21:57:48 UTC 2010 i686 GNU/Linux
[10:41 AM] 36Mb$ lsb_release --all
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 10.04.1 LTS
Release: 10.04
Codename: lucid
[10:41 AM] 36Mb$ mkdir foo && rdiff-backup /home/gwern/music foo
Exception 'RPath instance has no attribute 'inc_compressed'' raised of class '<type 'exceptions.AttributeError'>':
  File "/usr/lib/pymodules/python2.6/rdiff_backup/Main.py", line 304, in error_check_Main
    try: Main(arglist)
  File "/usr/lib/pymodules/python2.6/rdiff_backup/Main.py", line 324, in Main
    take_action(rps)
  File "/usr/lib/pymodules/python2.6/rdiff_backup/Main.py", line 280, in take_action
    elif action == "backup": Backup(rps[0], rps[1])
  File "/usr/lib/pymodules/python2.6/rdiff_backup/Main.py", line 346, in Backup
    backup.Mirror(rpin, rpout)
  File "/usr/lib/pymodules/python2.6/rdiff_backup/backup.py", line 35, in Mirror
    DestS.set_rorp_cache(dest_rpath, source_rpiter, 0)
  File "/usr/lib/pymodules/python2.6/rdiff_backup/backup.py", line 154, in set_rorp_cache
    collated, Globals.pipeline_max_length*4, baserp)
  File "/usr/lib/pymodules/python2.6/rdiff_backup/backup.py", line 290, in __init__
    self.metawriter = metadata.ManagerObj.GetWriter()
  File "/usr/lib/pymodules/python2.6/rdiff_backup/metadata.py", line 575, in GetWriter
    metawriter = self.get_meta_writer(typestr, time)
  File "/usr/lib/pymodules/python2.6/rdiff_backup/metadata.py", line 556, in get_meta_writer
    typestr, time)
  File "/usr/lib/pymodules/python2.6/rdiff_backup/metadata.py", line 551, in _writer_helper
    return flatfileclass(rp, 'w', callback = self.add_incrp)
  File "/usr/lib/pymodules/python2.6/rdiff_backup/metadata.py", line 382, in __init__
    if compress and check_path and not rp_base.isinccompressed():
  File "/usr/lib/pymodules/python2.6/rdiff_backup/rpath.py", line 1228, in isinccompressed
    return self.inc_compressed

Traceback (most recent call last):
  File "/usr/bin/rdiff-backup", line 30, in <module>
    rdiff_backup.Main.error_check_Main(sys.argv[1:])
  File "/usr/lib/pymodules/python2.6/rdiff_backup/Main.py", line 304, in error_check_Main
    try: Main(arglist)
  File "/usr/lib/pymodules/python2.6/rdiff_backup/Main.py", line 324, in Main
    take_action(rps)
  File "/usr/lib/pymodules/python2.6/rdiff_backup/Main.py", line 280, in take_action
    elif action == "backup": Backup(rps[0], rps[1])
  File "/usr/lib/pymodules/python2.6/rdiff_backup/Main.py", line 346, in Backup
    backup.Mirror(rpin, rpout)
  File "/usr/lib/pymodules/python2.6/rdiff_backup/backup.py", line 35, in Mirror
    DestS.set_rorp_cache(dest_rpath, source_rpiter, 0)
  File "/usr/lib/pymodules/python2.6/rdiff_backup/backup.py", line 154, in set_rorp_cache
    collated, Globals.pipeline_max_length*4, baserp)
  File "/usr/lib/pymodules/python2.6/rdiff_backup/backup.py", line 290, in __init__
    self.metawriter = metadata.ManagerObj.GetWriter()
  File "/usr/lib/pymodules/python2.6/rdiff_backup/metadata.py", line 575, in GetWriter
    metawriter = self.get_meta_writer(typestr, time)
  File "/usr/lib/pymodules/python2.6/rdiff_backup/metadata.py", line 556, in get_meta_writer
    typestr, time)
  File "/usr/lib/pymodules/python2.6/rdiff_backup/metadata.py", line 551, in _writer_helper
    return flatfileclass(rp, 'w', callback = self.add_incrp)
  File "/usr/lib/pymodules/python2.6/rdiff_backup/metadata.py", line 382, in __init__
    if compress and check_path and not rp_base.isinccompressed():
  File "/usr/lib/pymodules/python2.6/rdiff_backup/rpath.py", line 1228, in isinccompressed
    return self.inc_compressed
AttributeError: RPath instance has no attribute 'inc_compressed'

A 'sudo apt-get remove --purge rdiff-backup' makes no difference.

This bug seems to be very similar to https://bugs.launchpad.net/ubuntu/+source/rdiff-backup/+bug/96258 but that bug was supposedly fixed years ago, and certainly long before Lucid.

Here is the output with verbosity turned up to the max:

$ mkdir foo && rdiff-backup -v9 /home/gwern/music foo
Mon Oct 11 10:47:10 2010 Using rdiff-backup version 1.2.8
Mon Oct 11 10:47:10 2010 Making directory foo/rdiff-backup-data
Mon Oct 11 10:47:10 2010 POSIX ACLs not supported by filesystem at /home/gwern/music
Mon Oct 11 10:47:10 2010 Unable to import win32security module. Windows ACLs
not supported by filesystem at /home/gwern/music
Mon Oct 11 10:47:10 2010 escape_dos_devices not required by filesystem at /home/gwern/music
Mon Oct 11 10:47:10 2010 -----------------------------------------------------------------
Detected abilities for source (read only) file system:
  Access control lists Off
  Extended attributes On
  Windows access control lists Off
  Case sensitivity On
  Escape DOS devices Off
  Escape trailing spaces Off
  Mac OS X style resource forks Off
  Mac OS X Finder information Off
-----------------------------------------------------------------
Mon Oct 11 10:47:10 2010 Making directory foo/rdiff-backup-data/rdiff-backup.tmp.0
Mon Oct 11 10:47:10 2010 Touching foo/rdiff-backup-data/rdiff-backup.tmp.0/5-_ a.snapshot.gz
Mon Oct 11 10:47:10 2010 Deleting foo/rdiff-backup-data/rdiff-backup.tmp.0/5-_ a.snapshot.gz
Mon Oct 11 10:47:10 2010 Touching foo/rdiff-backup-data/rdiff-backup.tmp.0/uniᄉ
Mon Oct 11 10:47:10 2010 Deleting foo/rdiff-backup-data/rdiff-backup.tmp.0/uniᄉ
Mon Oct 11 10:47:10 2010 Touching foo/rdiff-backup-data/rdiff-backup.tmp.0/:\"
Mon Oct 11 10:47:10 2010 Deleting foo/rdiff-backup-data/rdiff-backup.tmp.0/:\"
Mon Oct 11 10:47:10 2010 Touching foo/rdiff-backup-data/rdiff-backup.tmp.0/A
Mon Oct 11 10:47:10 2010 Deleting foo/rdiff-backup-data/rdiff-backup.tmp.0/A
Mon Oct 11 10:47:10 2010 Touching foo/rdiff-backup-data/rdiff-backup.tmp.0/foo
Mon Oct 11 10:47:10 2010 Deleting foo/rdiff-backup-data/rdiff-backup.tmp.0/foo
Mon Oct 11 10:47:10 2010 Making directory foo/rdiff-backup-data/rdiff-backup.tmp.0/hl
Mon Oct 11 10:47:10 2010 Touching foo/rdiff-backup-data/rdiff-backup.tmp.0/hardlinked_file1
Mon Oct 11 10:47:10 2010 Hard linking foo/rdiff-backup-data/rdiff-backup.tmp.0/hl/hardlinked_file2 to foo/rdiff-backup-data/rdiff-backup.tmp.0/hardlinked_file1
Mon Oct 11 10:47:10 2010 Extended attributes not supported by filesystem at foo/rdiff-backup-data/rdiff-backup.tmp.0
Mon Oct 11 10:47:10 2010 POSIX ACLs not supported by filesystem at foo/rdiff-backup-data/rdiff-backup.tmp.0
Mon Oct 11 10:47:10 2010 Unable to import win32security module. Windows ACLs
not supported by filesystem at foo/rdiff-backup-data/rdiff-backup.tmp.0
Mon Oct 11 10:47:10 2010 Touching foo/rdiff-backup-data/rdiff-backup.tmp.0/dir_inc_check
Mon Oct 11 10:47:10 2010 Deleting foo/rdiff-backup-data/rdiff-backup.tmp.0/dir_inc_check
Mon Oct 11 10:47:10 2010 Touching foo/rdiff-backup-data/rdiff-backup.tmp.0/regfile
Mon Oct 11 10:47:10 2010 Deleting foo/rdiff-backup-data/rdiff-backup.tmp.0/regfile
Mon Oct 11 10:47:10 2010 Touching foo/rdiff-backup-data/rdiff-backup.tmp.0/high_perms_file
Mon Oct 11 10:47:10 2010 Touching foo/rdiff-backup-data/rdiff-backup.tmp.0/high_perms_dir
Mon Oct 11 10:47:10 2010 Deleting foo/rdiff-backup-data/rdiff-backup.tmp.0/high_perms_file
Mon Oct 11 10:47:10 2010 Deleting foo/rdiff-backup-data/rdiff-backup.tmp.0/high_perms_dir
Mon Oct 11 10:47:10 2010 Touching foo/rdiff-backup-data/rdiff-backup.tmp.0/symlinked_file1
Mon Oct 11 10:47:10 2010 Deleting foo/rdiff-backup-data/rdiff-backup.tmp.0/symlinked_file2
Mon Oct 11 10:47:10 2010 Deleting foo/rdiff-backup-data/rdiff-backup.tmp.0/symlinked_file1
Mon Oct 11 10:47:10 2010 escape_dos_devices not required by filesystem at foo/rdiff-backup-data/rdiff-backup.tmp.0
Mon Oct 11 10:47:10 2010 Deleting foo/rdiff-backup-data/rdiff-backup.tmp.0
Mon Oct 11 10:47:10 2010 Removing directory foo/rdiff-backup-data/rdiff-backup.tmp.0
Mon Oct 11 10:47:10 2010 -----------------------------------------------------------------
Detected abilities for destination (read/write) file system:
  Ownership changing Off
  Hard linking On
  fsync() directories On
  Directory inc permissions On
  High-bit permissions On
  Symlink permissions Off
  Extended filenames On
  Windows reserved filenames Off
  Access control lists Off
  Extended attributes Off
  Windows access control lists Off
  Case sensitivity On
  Escape DOS devices Off
  Escape trailing spaces Off
  Mac OS X style resource forks Off
  Mac OS X Finder information Off
-----------------------------------------------------------------
Mon Oct 11 10:47:10 2010 Backup: must_escape_dos_devices = 0
Mon Oct 11 10:47:10 2010 Making directory foo/rdiff-backup-data/increments
Mon Oct 11 10:47:10 2010 Starting mirror /home/gwern/music to foo
Mon Oct 11 10:47:10 2010 Exception 'RPath instance has no attribute 'inc_compressed'' raised of class '<type 'exceptions.AttributeError'>':
  File "/usr/lib/pymodules/python2.6/rdiff_backup/Main.py", line 304, in error_check_Main
    try: Main(arglist)
  File "/usr/lib/pymodules/python2.6/rdiff_backup/Main.py", line 324, in Main
    take_action(rps)
  File "/usr/lib/pymodules/python2.6/rdiff_backup/Main.py", line 280, in take_action
    elif action == "backup": Backup(rps[0], rps[1])
  File "/usr/lib/pymodules/python2.6/rdiff_backup/Main.py", line 346, in Backup
    backup.Mirror(rpin, rpout)
  File "/usr/lib/pymodules/python2.6/rdiff_backup/backup.py", line 35, in Mirror
    DestS.set_rorp_cache(dest_rpath, source_rpiter, 0)
  File "/usr/lib/pymodules/python2.6/rdiff_backup/backup.py", line 154, in set_rorp_cache
    collated, Globals.pipeline_max_length*4, baserp)
  File "/usr/lib/pymodules/python2.6/rdiff_backup/backup.py", line 290, in __init__
    self.metawriter = metadata.ManagerObj.GetWriter()
  File "/usr/lib/pymodules/python2.6/rdiff_backup/metadata.py", line 575, in GetWriter
    metawriter = self.get_meta_writer(typestr, time)
  File "/usr/lib/pymodules/python2.6/rdiff_backup/metadata.py", line 556, in get_meta_writer
    typestr, time)
  File "/usr/lib/pymodules/python2.6/rdiff_backup/metadata.py", line 551, in _writer_helper
    return flatfileclass(rp, 'w', callback = self.add_incrp)
  File "/usr/lib/pymodules/python2.6/rdiff_backup/metadata.py", line 382, in __init__
    if compress and check_path and not rp_base.isinccompressed():
  File "/usr/lib/pymodules/python2.6/rdiff_backup/rpath.py", line 1228, in isinccompressed
    return self.inc_compressed

Traceback (most recent call last):
  File "/usr/bin/rdiff-backup", line 30, in <module>
    rdiff_backup.Main.error_check_Main(sys.argv[1:])
  File "/usr/lib/pymodules/python2.6/rdiff_backup/Main.py", line 304, in error_check_Main
    try: Main(arglist)
  File "/usr/lib/pymodules/python2.6/rdiff_backup/Main.py", line 324, in Main
    take_action(rps)
  File "/usr/lib/pymodules/python2.6/rdiff_backup/Main.py", line 280, in take_action
    elif action == "backup": Backup(rps[0], rps[1])
  File "/usr/lib/pymodules/python2.6/rdiff_backup/Main.py", line 346, in Backup
    backup.Mirror(rpin, rpout)
  File "/usr/lib/pymodules/python2.6/rdiff_backup/backup.py", line 35, in Mirror
    DestS.set_rorp_cache(dest_rpath, source_rpiter, 0)
  File "/usr/lib/pymodules/python2.6/rdiff_backup/backup.py", line 154, in set_rorp_cache
    collated, Globals.pipeline_max_length*4, baserp)
  File "/usr/lib/pymodules/python2.6/rdiff_backup/backup.py", line 290, in __init__
    self.metawriter = metadata.ManagerObj.GetWriter()
  File "/usr/lib/pymodules/python2.6/rdiff_backup/metadata.py", line 575, in GetWriter
    metawriter = self.get_meta_writer(typestr, time)
  File "/usr/lib/pymodules/python2.6/rdiff_backup/metadata.py", line 556, in get_meta_writer
    typestr, time)
  File "/usr/lib/pymodules/python2.6/rdiff_backup/metadata.py", line 551, in _writer_helper
    return flatfileclass(rp, 'w', callback = self.add_incrp)
  File "/usr/lib/pymodules/python2.6/rdiff_backup/metadata.py", line 382, in __init__
    if compress and check_path and not rp_base.isinccompressed():
  File "/usr/lib/pymodules/python2.6/rdiff_backup/rpath.py", line 1228, in isinccompressed
    return self.inc_compressed
AttributeError: RPath instance has no attribute 'inc_compressed'

gwern (gwern0) wrote :
Andreas Olsson (andol) wrote :

Thanks for including that extra debug data.

Could you tell me what file system /home/gwern/music, as well as the created foo folder, resides in? If you are unsure, the output of the command "mount" should provide all the necessary information.

Changed in rdiff-backup (Ubuntu):
status: New → Incomplete
gwern (gwern0) wrote :

The first line:

/dev/sda5 on / type ext4 (rw,errors=remount-ro)
proc on /proc type proc (rw)
none on /sys type sysfs (rw,noexec,nosuid,nodev)
none on /sys/fs/fuse/connections type fusectl (rw)
none on /sys/kernel/debug type debugfs (rw)
none on /sys/kernel/security type securityfs (rw)
none on /dev type devtmpfs (rw,mode=0755)
none on /dev/pts type devpts (rw,noexec,nosuid,gid=5,mode=0620)
none on /dev/shm type tmpfs (rw,nosuid,nodev)
none on /var/run type tmpfs (rw,nosuid,mode=0755)
none on /var/lock type tmpfs (rw,noexec,nosuid,nodev)
none on /lib/init/rw type tmpfs (rw,nosuid,mode=0755)
none on /var/lib/ureadahead/debugfs type debugfs (rw,relatime)
/dev/sda3 on /windows type fuseblk (rw,nosuid,nodev,allow_other,blksize=4096,default_permissions)
/dev/sda1 on /boot type ext4 (rw)
binfmt_misc on /proc/sys/fs/binfmt_misc type binfmt_misc (rw,noexec,nosuid,nodev)
gvfs-fuse-daemon on /home/gwern/.gvfs type fuse.gvfs-fuse-daemon (rw,nosuid,nodev,user=gwern)

/etc/fsb says:

UUID=c1c52df3-c2c7-4bf6-96de-8ab51c76f415 / ext4 errors=remount-ro 0 1

Andreas Olsson (andol) wrote :

Thanks

Can you now run the following command for me?

ls -ld /home/gwern/music

It might also be useful if you could run the following command, showing the content of the folder. Of course, that would reveal your music collection, which I understand if you don't want to do.

ls -la /home/gwern/music

I assume the backups are made with the user gwern?

For compassion, could you try creating a new folder, and fill it with a text file or two, and see if rdiff-backup works better when you try to backup that folder instead?

Andreas Olsson (andol) wrote :

Oh, and regarding bug #96258. It turns out that that bug wasn't actually properly fixed in rdiff-backup 1.1.12. Supposedly a more proper fix was applied to rdiff-backup 1.2.2. This according to http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=499332

(Not that I know if this is the same issue or not.)

gwern (gwern0) wrote :
Download full text (7.6 KiB)

[01:21 PM] 78Mb$ ls -ld /home/gwern/music
drwx------ 77 gwern gwern 4096 2010-10-11 11:44 /home/gwern/music/

Attached is also the output of ls -lR music/?field.comment=[01:21 PM] 78Mb$ ls -ld /home/gwern/music
drwx------ 77 gwern gwern 4096 2010-10-11 11:44 /home/gwern/music/

Attached is also the output of ls -lR music/

> I assume the backups are made with the user gwern?

So far as I am aware. I never added any options to rdiff-backup to change users or anything.

backing up anything, even an empty directory, seems to fail:

[01:23 PM] 78Mb$ mkdir foo
[01:23 PM] 78Mb$ cp music.txt foo/
`music.txt' -> `foo/music.txt'
[01:23 PM] 78Mb$ rdiff-backup foo bar
Exception 'RPath instance has no attribute 'inc_compressed'' raised of class '<type 'exceptions.AttributeError'>':
  File "/usr/lib/pymodules/python2.6/rdiff_backup/Main.py", line 304, in error_check_Main
    try: Main(arglist)
  File "/usr/lib/pymodules/python2.6/rdiff_backup/Main.py", line 324, in Main
    take_action(rps)
  File "/usr/lib/pymodules/python2.6/rdiff_backup/Main.py", line 280, in take_action
    elif action == "backup": Backup(rps[0], rps[1])
  File "/usr/lib/pymodules/python2.6/rdiff_backup/Main.py", line 346, in Backup
    backup.Mirror(rpin, rpout)
  File "/usr/lib/pymodules/python2.6/rdiff_backup/backup.py", line 35, in Mirror
    DestS.set_rorp_cache(dest_rpath, source_rpiter, 0)
  File "/usr/lib/pymodules/python2.6/rdiff_backup/backup.py", line 154, in set_rorp_cache
    collated, Globals.pipeline_max_length*4, baserp)
  File "/usr/lib/pymodules/python2.6/rdiff_backup/backup.py", line 290, in __init__
    self.metawriter = metadata.ManagerObj.GetWriter()
  File "/usr/lib/pymodules/python2.6/rdiff_backup/metadata.py", line 575, in GetWriter
    metawriter = self.get_meta_writer(typestr, time)
  File "/usr/lib/pymodules/python2.6/rdiff_backup/metadata.py", line 556, in get_meta_writer
    typestr, time)
  File "/usr/lib/pymodules/python2.6/rdiff_backup/metadata.py", line 551, in _writer_helper
    return flatfileclass(rp, 'w', callback = self.add_incrp)
  File "/usr/lib/pymodules/python2.6/rdiff_backup/metadata.py", line 382, in __init__
    if compress and check_path and not rp_base.isinccompressed():
  File "/usr/lib/pymodules/python2.6/rdiff_backup/rpath.py", line 1228, in isinccompressed
    return self.inc_compressed

Traceback (most recent call last):
  File "/usr/bin/rdiff-backup", line 30, in <module>
    rdiff_backup.Main.error_check_Main(sys.argv[1:])
  File "/usr/lib/pymodules/python2.6/rdiff_backup/Main.py", line 304, in error_check_Main
    try: Main(arglist)
  File "/usr/lib/pymodules/python2.6/rdiff_backup/Main.py", line 324, in Main
    take_action(rps)
  File "/usr/lib/pymodules/python2.6/rdiff_backup/Main.py", line 280, in take_action
    elif action == "backup": Backup(rps[0], rps[1])
  File "/usr/lib/pymodules/python2.6/rdiff_backup/Main.py", line 346, in Backup
    backup.Mirror(rpin, rpout)
  File "/usr/lib/pymodules/python2.6/rdiff_backup/backup.py", line 35, in Mirror
    DestS.set_rorp_cache(dest_rpath, source_rpiter, 0)
  File "/usr/lib/pymodules/python2.6/rdiff_backup/backup.py", line 154, in set_rorp_cache
    collated, Globals.pipeline_max...

Read more...

Andreas Olsson (andol) wrote :

Ok, sorry for not getting back to your earlier.

No, given that even such a basic source folder fails, I have no idea what the issue might be.

One thing you could try is sending an e-mail to the rdiff-backup-user mailing list. Perhaps someone there might have an idea what is wrong.

http://lists.nongnu.org/mailman/listinfo/rdiff-backup-users

gwern (gwern0) wrote :

After reinstalling a clean Ubuntu, creating a new user account, finding that rdiff-backup works, reproducing the error on my account with dash, and then perusing `env`, I think I finally found the problem.

My Bash config set the variable $PYTHONOPTIMIZE. If this variable is set to any value, rdiff-backup crashes. (It seems to be the only Python application I use which ever does that, which is why I couldn't figure it out for so long.) Calling `unset PYTHONOPTIMIZE` fixes it. My bisecting of my Bash config hadn't exposed it because apparently all my test shells would inherit that variable from the login shell.

Phew! Now, I suppose the question is why rdiff-backup fails so gracelessly. (Even if it ought to crash when that shell variable is defined, the message ought to be a *little* more informative than that!)

Andreas Olsson (andol) wrote :
Download full text (3.7 KiB)

Yepp, looks like that's it. I can reproduce it also on Natty with Python 2.7 and 1.2.8-5ubuntu3.

andreas@stilgar:~/temp$ mkdir alfa beta
andreas@stilgar:~/temp$ echo foo > alfa/bar.txt
andreas@stilgar:~/temp$ export PYTHONOPTIMIZE=true
andreas@stilgar:~/temp$ rdiff-backup alfa/ beta/
Exception 'RPath instance has no attribute 'inc_compressed'' raised of class '<type 'exceptions.AttributeError'>':
  File "/usr/lib/pymodules/python2.7/rdiff_backup/Main.py", line 304, in error_check_Main
    try: Main(arglist)
  File "/usr/lib/pymodules/python2.7/rdiff_backup/Main.py", line 324, in Main
    take_action(rps)
  File "/usr/lib/pymodules/python2.7/rdiff_backup/Main.py", line 280, in take_action
    elif action == "backup": Backup(rps[0], rps[1])
  File "/usr/lib/pymodules/python2.7/rdiff_backup/Main.py", line 346, in Backup
    backup.Mirror(rpin, rpout)
  File "/usr/lib/pymodules/python2.7/rdiff_backup/backup.py", line 35, in Mirror
    DestS.set_rorp_cache(dest_rpath, source_rpiter, 0)
  File "/usr/lib/pymodules/python2.7/rdiff_backup/backup.py", line 154, in set_rorp_cache
    collated, Globals.pipeline_max_length*4, baserp)
  File "/usr/lib/pymodules/python2.7/rdiff_backup/backup.py", line 290, in __init__
    self.metawriter = metadata.ManagerObj.GetWriter()
  File "/usr/lib/pymodules/python2.7/rdiff_backup/metadata.py", line 575, in GetWriter
    metawriter = self.get_meta_writer(typestr, time)
  File "/usr/lib/pymodules/python2.7/rdiff_backup/metadata.py", line 556, in get_meta_writer
    typestr, time)
  File "/usr/lib/pymodules/python2.7/rdiff_backup/metadata.py", line 551, in _writer_helper
    return flatfileclass(rp, 'w', callback = self.add_incrp)
  File "/usr/lib/pymodules/python2.7/rdiff_backup/metadata.py", line 382, in __init__
    if compress and check_path and not rp_base.isinccompressed():
  File "/usr/lib/pymodules/python2.7/rdiff_backup/rpath.py", line 1228, in isinccompressed
    return self.inc_compressed

Traceback (most recent call last):
  File "/usr/bin/rdiff-backup", line 30, in <module>
    rdiff_backup.Main.error_check_Main(sys.argv[1:])
  File "/usr/lib/pymodules/python2.7/rdiff_backup/Main.py", line 304, in error_check_Main
    try: Main(arglist)
  File "/usr/lib/pymodules/python2.7/rdiff_backup/Main.py", line 324, in Main
    take_action(rps)
  File "/usr/lib/pymodules/python2.7/rdiff_backup/Main.py", line 280, in take_action
    elif action == "backup": Backup(rps[0], rps[1])
  File "/usr/lib/pymodules/python2.7/rdiff_backup/Main.py", line 346, in Backup
    backup.Mirror(rpin, rpout)
  File "/usr/lib/pymodules/python2.7/rdiff_backup/backup.py", line 35, in Mirror
    DestS.set_rorp_cache(dest_rpath, source_rpiter, 0)
  File "/usr/lib/pymodules/python2.7/rdiff_backup/backup.py", line 154, in set_rorp_cache
    collated, Globals.pipeline_max_length*4, baserp)
  File "/usr/lib/pymodules/python2.7/rdiff_backup/backup.py", line 290, in __init__
    self.metawriter = metadata.ManagerObj.GetWriter()
  File "/usr/lib/pymodules/python2.7/rdiff_backup/metadata.py", line 575, in GetWriter
    metawriter = self.get_meta_writer(typestr, time)
  File "/usr/lib/pymodules/python...

Read more...

Andreas Olsson (andol) wrote :

Note that we get a slightly different crash when applied to an once success backup.

andreas@stilgar:~/temp$ unset PYTHONOPTIMIZE
andreas@stilgar:~/temp$ rm -rf alfa/ beta/
andreas@stilgar:~/temp$ mkdir alfa beta
andreas@stilgar:~/temp$ echo foo > alfa/bar.txt
andreas@stilgar:~/temp$ rdiff-backup alfa/ beta/
andreas@stilgar:~/temp$ export PYTHONOPTIMIZE=true
andreas@stilgar:~/temp$ rdiff-backup alfa/ beta/
Exception 'RPath instance has no attribute 'inc_timestr'' raised of class '<type 'exceptions.AttributeError'>':
  File "/usr/lib/pymodules/python2.7/rdiff_backup/Main.py", line 304, in error_check_Main
    try: Main(arglist)
  File "/usr/lib/pymodules/python2.7/rdiff_backup/Main.py", line 324, in Main
    take_action(rps)
  File "/usr/lib/pymodules/python2.7/rdiff_backup/Main.py", line 280, in take_action
    elif action == "backup": Backup(rps[0], rps[1])
  File "/usr/lib/pymodules/python2.7/rdiff_backup/Main.py", line 337, in Backup
    backup_final_init(rpout)
  File "/usr/lib/pymodules/python2.7/rdiff_backup/Main.py", line 502, in backup_final_init
    prevtime = backup_get_mirrortime()
  File "/usr/lib/pymodules/python2.7/rdiff_backup/Main.py", line 493, in backup_get_mirrortime
    if mirror_rps: return mirror_rps[0].getinctime()
  File "/usr/lib/pymodules/python2.7/rdiff_backup/rpath.py", line 1236, in getinctime
    return Time.stringtotime(self.inc_timestr)

Traceback (most recent call last):
  File "/usr/bin/rdiff-backup", line 30, in <module>
    rdiff_backup.Main.error_check_Main(sys.argv[1:])
  File "/usr/lib/pymodules/python2.7/rdiff_backup/Main.py", line 304, in error_check_Main
    try: Main(arglist)
  File "/usr/lib/pymodules/python2.7/rdiff_backup/Main.py", line 324, in Main
    take_action(rps)
  File "/usr/lib/pymodules/python2.7/rdiff_backup/Main.py", line 280, in take_action
    elif action == "backup": Backup(rps[0], rps[1])
  File "/usr/lib/pymodules/python2.7/rdiff_backup/Main.py", line 337, in Backup
    backup_final_init(rpout)
  File "/usr/lib/pymodules/python2.7/rdiff_backup/Main.py", line 502, in backup_final_init
    prevtime = backup_get_mirrortime()
  File "/usr/lib/pymodules/python2.7/rdiff_backup/Main.py", line 493, in backup_get_mirrortime
    if mirror_rps: return mirror_rps[0].getinctime()
  File "/usr/lib/pymodules/python2.7/rdiff_backup/rpath.py", line 1236, in getinctime
    return Time.stringtotime(self.inc_timestr)
AttributeError: RPath instance has no attribute 'inc_timestr'
andreas@stilgar:~/temp$

summary: - rdiff-backup crashes with compression error (inc_compressed)
+ PYTHONOPTIMIZE causes rdiff-backup to crash
Changed in rdiff-backup (Ubuntu):
status: Incomplete → Confirmed
importance: Undecided → Low
Andreas Olsson (andol) wrote :

(By the way, nice job finding the culprint.)

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.