Bug 1109563

Summary: [abrt] rdiff-backup: Main.py:907:checkdest_need_check:AssertionError: Found too many current_mirror incs!
Product: [Fedora] Fedora Reporter: Jan Vlug <jan.public>
Component: rdiff-backupAssignee: Kevin Fenzi <kevin>
Status: CLOSED EOL QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 20CC: frank, kevin
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Unspecified   
URL: https://retrace.fedoraproject.org/faf/reports/bthash/81849765f99cbbc3c4b181754a0052712e37169c
Whiteboard: abrt_hash:4f25dc706fe9b47e008d5ab3e3d72cd26c78b57e
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-06-30 01:03:09 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
File: backtrace
none
File: environ
none
Unsuccessful attempt to recover from the problem
none
Successful attempt to recover from the problem none

Description Jan Vlug 2014-06-15 12:08:16 UTC
Version-Release number of selected component:
rdiff-backup-1.2.8-11.fc20

Additional info:
reporter:       libreport-2.2.2
cmdline:        /usr/bin/python /bin/rdiff-backup --exclude /home/jan/.mozilla/firefox/sok6fp2o.ddddddddddd --exclude /home/jan/Download --exclude /home/jan/.VirtualBox/Machines --exclude /tmp --exclude /mnt --exclude /proc --exclude /backup/externalHDD --exclude /media --exclude /lib --exclude /lib64 --exclude /bin --exclude /dev --exclude /lost+found --exclude /misc --exclude /net --exclude /opt --exclude /sbin --exclude /selinux --exclude /srv --exclude /usr --exclude /var --exclude /sys --exclude /iso --exclude /old_system --exclude /media/Backup --exclude /run/media / /run/media/jan/BigExternalDisk/backup
executable:     /bin/rdiff-backup
kernel:         3.14.7-200.fc20.x86_64
runlevel:       N 5
type:           Python
uid:            0

Truncated backtrace:
Main.py:907:checkdest_need_check:AssertionError: Found too many current_mirror incs!

Traceback (most recent call last):
  File "/bin/rdiff-backup", line 30, in <module>
    rdiff_backup.Main.error_check_Main(sys.argv[1:])
  File "/usr/lib64/python2.7/site-packages/rdiff_backup/Main.py", line 304, in error_check_Main
    try: Main(arglist)
  File "/usr/lib64/python2.7/site-packages/rdiff_backup/Main.py", line 324, in Main
    take_action(rps)
  File "/usr/lib64/python2.7/site-packages/rdiff_backup/Main.py", line 280, in take_action
    elif action == "backup": Backup(rps[0], rps[1])
  File "/usr/lib64/python2.7/site-packages/rdiff_backup/Main.py", line 337, in Backup
    backup_final_init(rpout)
  File "/usr/lib64/python2.7/site-packages/rdiff_backup/Main.py", line 501, in backup_final_init
    checkdest_if_necessary(rpout)
  File "/usr/lib64/python2.7/site-packages/rdiff_backup/Main.py", line 916, in checkdest_if_necessary
    need_check = checkdest_need_check(dest_rp)
  File "/usr/lib64/python2.7/site-packages/rdiff_backup/Main.py", line 907, in checkdest_need_check
    assert len(curmir_incs) == 2, "Found too many current_mirror incs!"
AssertionError: Found too many current_mirror incs!

Local variables in innermost frame:
curmirroot: <rdiff_backup.rpath.RPath instance at 0x2624ab8>
curmir_incs: [<rdiff_backup.rpath.RPath instance at 0x2625128>, <rdiff_backup.rpath.RPath instance at 0x26256c8>, <rdiff_backup.rpath.RPath instance at 0x2625c68>]
dest_rp: <rdiff_backup.rpath.RPath instance at 0x2624638>
filename: 'increments'

Potential duplicate: bug 928869

Comment 1 Jan Vlug 2014-06-15 12:08:20 UTC
Created attachment 908897 [details]
File: backtrace

Comment 2 Jan Vlug 2014-06-15 12:08:22 UTC
Created attachment 908898 [details]
File: environ

Comment 3 Kevin Fenzi 2014-06-15 16:20:59 UTC
Can you provide the output of: 

rdiff-backup --check-destination-dir /run/media/jan/BigExternalDisk/backup

It sounds like something tampered with the backup or it has become corrupt.

Comment 4 Jan Vlug 2014-06-15 19:18:09 UTC
[root@thorin ~]# ls -la /run/media/jan/BigExternalDisk/backup/rdiff-backup-data/current_mirror*
-rw-------. 1 root root 10 May 28 21:17 /run/media/jan/BigExternalDisk/backup/rdiff-backup-data/current_mirror.2014-05-28T21:17:52+02:00.data
-rw-------. 1 root root 10 May 30 10:58 /run/media/jan/BigExternalDisk/backup/rdiff-backup-data/current_mirror.2014-05-30T10:58:29+02:00.data
-rw-------. 1 root root 10 May 31 19:13 /run/media/jan/BigExternalDisk/backup/rdiff-backup-data/current_mirror.2014-05-31T15:46:55+02:00.data
[root@thorin ~]# rdiff-backup --check-destination-dir /run/media/jan/BigExternalDisk/backup
Exception 'Found too many current_mirror incs!' raised of class '<type 'exceptions.AssertionError'>':
  File "/usr/lib64/python2.7/site-packages/rdiff_backup/Main.py", line 304, in error_check_Main
    try: Main(arglist)
  File "/usr/lib64/python2.7/site-packages/rdiff_backup/Main.py", line 324, in Main
    take_action(rps)
  File "/usr/lib64/python2.7/site-packages/rdiff_backup/Main.py", line 282, in take_action
    elif action == "check-destination-dir": CheckDest(rps[0])
  File "/usr/lib64/python2.7/site-packages/rdiff_backup/Main.py", line 865, in CheckDest
    need_check = checkdest_need_check(dest_rp)
  File "/usr/lib64/python2.7/site-packages/rdiff_backup/Main.py", line 907, in checkdest_need_check
    assert len(curmir_incs) == 2, "Found too many current_mirror incs!"

Traceback (most recent call last):
  File "/bin/rdiff-backup", line 30, in <module>
    rdiff_backup.Main.error_check_Main(sys.argv[1:])
  File "/usr/lib64/python2.7/site-packages/rdiff_backup/Main.py", line 304, in error_check_Main
    try: Main(arglist)
  File "/usr/lib64/python2.7/site-packages/rdiff_backup/Main.py", line 324, in Main
    take_action(rps)
  File "/usr/lib64/python2.7/site-packages/rdiff_backup/Main.py", line 282, in take_action
    elif action == "check-destination-dir": CheckDest(rps[0])
  File "/usr/lib64/python2.7/site-packages/rdiff_backup/Main.py", line 865, in CheckDest
    need_check = checkdest_need_check(dest_rp)
  File "/usr/lib64/python2.7/site-packages/rdiff_backup/Main.py", line 907, in checkdest_need_check
    assert len(curmir_incs) == 2, "Found too many current_mirror incs!"
AssertionError: Found too many current_mirror incs!

So indeed there are too many current_mirror incs...

Comment 5 Jan Vlug 2014-06-15 19:20:43 UTC
Can I savely remove two of them? If so, which ones?

Comment 6 Jan Vlug 2014-06-15 19:32:06 UTC
This problem is probably related to bug 1103430

Comment 7 Kevin Fenzi 2014-06-16 03:24:54 UTC
ok. First, if you have space to save off a copy of your backup before messing with it that might be good. Backups of backups. ;) 

Try deleting the middle of the three (not the newest and not the oldest). 

Then run --check-destination-dir again and it should regress back to the oldest one if the newest one didn't finish.

Comment 8 Jan Vlug 2014-06-29 08:45:47 UTC
Created attachment 913146 [details]
Unsuccessful attempt to recover from the problem

Comment 9 Jan Vlug 2014-06-29 08:47:31 UTC
Thanks Kevin, I tried the suggestion of comment #7. But had no success.

First I made a backup of the backup :)

Next, I removed the middle current_mirror:
rm /run/media/jan/BigExternalDisk/backup/rdiff-backup-data/current_mirror.2014-05-30T10:58:29+02:00.data

Next I did:
rdiff-backup --check-destination-dir /run/media/jan/BigExternalDisk/backup

Which provided not output on the console.

Next I tried a backup:
./rdiff-backup.sh
Which ended with:
IOError: CRC check failed 0xae8a87e != 0x5d485adcL

(See attachment 'Unsuccessful attempt to recover from the problem' for all the details)

Comment 10 Kevin Fenzi 2014-07-13 21:28:39 UTC
Sorry for the long delay here, been swamped. ;( 

So, that didn't work out... could you try the other two duplicates?

It might be that it's not going to be easy to recover from. ;(

Comment 11 Jan Vlug 2014-08-30 16:55:01 UTC
Sorry for my late repy:
After removing the newst current_mirror file, first rdiff-backup failed again, next I did a:
rdiff-backup --check-destination-dir ...
Then I tried rdiff-backup again and it succeeded.

I will attach a file with the detailed commands.

Thanks for your support!

Has this bug to remain open? The underlaying problem is not solved.

Comment 12 Jan Vlug 2014-08-30 16:56:50 UTC
Created attachment 932942 [details]
Successful attempt to recover from the problem

Details of the commands that I issues to recover from the problem.

Comment 13 Kevin Fenzi 2014-08-31 14:45:27 UTC
ok, and I see you filed 2 more bugs shortly after? 

So, things aren't all well with that backup repo still?

Comment 14 Jan Vlug 2014-08-31 20:34:29 UTC
These bugs were created by ABRT, I think that the crashes occurred while trying to fix the issue reported in this bug. I report all crashes via ABRT. Feel free to close the new issues if they do not provide you enough details for further investigation.

Comment 15 Kevin Fenzi 2014-09-02 15:58:06 UTC
Ah, makes sense. 

So, everything is working again with that backup? 

Is there anything further to do here?

Comment 16 Jan Vlug 2014-09-06 07:21:48 UTC
The problems with my backup are solved. Thanks for your support!
However, the issue that rdiffbackup can crash or corrupt when hibernating or shutting down the (file) system is still there.
I backup to an external BTFS USB disk. Sometimes I forget that a backup is running when I hibernate or shut down the system. This results often in rdiffbackup / BTFS problems.

This is a list of ABRT reports that are probably related to this:
bug #1135707
bug #1135706
bug #1103430
bug #1103166
bug #1005543
bug #987281
bug #929436

Comment 17 Kevin Fenzi 2014-09-06 16:54:59 UTC
Well, I'm not sure what I can do about that. 

You shouldn't hibernate while doing backups. 

You may be able to wrap your backup in 'systemd-inhibit' to prevent the hibernate/shutdown from happening, however that could cause other problems if it inhibits that and you put the machine in an enclosed space or the like.

Comment 18 Fedora End Of Life 2015-05-29 12:07:16 UTC
This message is a reminder that Fedora 20 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 20. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as EOL if it remains open with a Fedora  'version'
of '20'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 20 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Comment 19 Fedora End Of Life 2015-06-30 01:03:09 UTC
Fedora 20 changed to end-of-life (EOL) status on 2015-06-23. Fedora 20 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
bug.

Thank you for reporting this bug and we are sorry it could not be fixed.