AssertionError verify_file_chunks
When I run a borg check it always trows an exception at the same archive and file. It does not matter if I supply --repair or not.
It did occur after the upgrade to borg 1.1.1. I did a recreate of my whole repository with: borg recreate -v --chunker-params 16,23,20,4095 -C auto,lzma,9 --recompress if-different --debug --progress I cant say though if the recreate is responsible for the error.
Analyzing archive root-2016-10-30-22_01 (7/44)
somefile_backup_2016.10.12_13.41.16.zip: Previously missing file chunk is still missing (Byte 0-491063). It has a all-zero replacement chunk already.
Local Exception
Traceback (most recent call last):
File "/usr/local/lib/python3.5/dist-packages/borg/archiver.py", line 4049, in main
exit_code = archiver.run(args)
File "/usr/local/lib/python3.5/dist-packages/borg/archiver.py", line 3977, in run
return set_ec(func(args))
File "/usr/local/lib/python3.5/dist-packages/borg/archiver.py", line 148, in wrapper
return method(self, args, repository=repository, **kwargs)
File "/usr/local/lib/python3.5/dist-packages/borg/archiver.py", line 309, in do_check
verify_data=args.verify_data, save_space=args.save_space):
File "/usr/local/lib/python3.5/dist-packages/borg/archive.py", line 1158, in check
self.rebuild_refcounts(archive=archive, first=first, last=last, sort_by=sort_by, glob=glob)
File "/usr/local/lib/python3.5/dist-packages/borg/archive.py", line 1535, in rebuild_refcounts
verify_file_chunks(item)
File "/usr/local/lib/python3.5/dist-packages/borg/archive.py", line 1377, in verify_file_chunks
assert len(chunks_current) == len(chunks_healthy)
AssertionError
Platform: Linux hostname 4.4.0-96-generic #119-Ubuntu SMP Tue Sep 12 14:59:54 UTC 2017 x86_64 x86_64
Linux: Ubuntu 16.04 xenial
Borg: 1.1.1 Python: CPython 3.5.2
Something wicked there, both lists should have same length.
Before borg recreate I guess you used other chunker params?
Maybe it updates the one list but not the other, have to check that...
The Repository is quite old and a few of the old archives have been created with borg < 1.0 I checked the output from the recreate and on the old archives it says:
Processing root-2016-10-30-22_01
Rechunking archive from (unknown) to (16, 23, 20, 4095)
[...]
Processing root-2017-07-23-02_54
Rechunking archive from (unknown) to (16, 23, 20, 4095)
[..]
Processing root-2017-07-31-02_46
^
This the first one there was no "rechunking" message
I did a few more checks on specific archives and the error occurred on 3 more archives. All the not checkable archives have zero chunks in them. But I have some archives that have zero chunks and dont error out.
@fsironman if you could make a list of steps that reproduces the problem (using data that can also be reproduced), that would be nice as a test case.
I guess I've found the issue. As suspected, caused by the re-chunking - and it just kept the chunks healthy list as it was before - therefore the different lengths.
2 fixes needed:
- fix for problematic items being generated, #3218 first commit
- fix to deal with already existing problematic items, #3218 second commit