Failed: Arithmetic operation resulted in an overflow.
- [x] I have searched open and closed issues for duplicates.
Environment info
- Duplicati version: 2.0.2.1_beta_2017-08-01
- Operating system: Windows server 2016 standart
- Backend: FTP
Description
Backups was working fine. Today got error: Failed: Arithmetic operation resulted in an overflow. Details: System.OverflowException: Arithmetic operation resulted in an overflow. at ManagedLzma._7zip.Decoder.FileBufferedDecoderStream..ctor(Stream stream) at master._7zip.Legacy.ArchiveReader.GetCachedDecoderStream(CArchiveDatabaseEx _db, Int32 folderIndex, IPasswordProvider pw) at master._7zip.Legacy.ArchiveReader.OpenStream(CArchiveDatabaseEx _db, Int32 fileIndex, IPasswordProvider pw) at Duplicati.Library.Main.Volumes.VolumeReaderBase..ctor(ICompression compression, Options options) at Duplicati.Library.Main.Operation.CompactHandler.DoCompact(LocalDeleteDatabase db, Boolean hasVerifiedBackend, IDbTransaction& transaction) at Duplicati.Library.Main.Operation.DeleteHandler.DoRun(LocalDeleteDatabase db, IDbTransaction& transaction, Boolean hasVerifiedBacked, Boolean forceCompact) at Duplicati.Library.Main.Operation.BackupHandler.CompactIfRequired(BackendManager backend, Int64 lastVolumeSize) at Duplicati.Library.Main.Operation.BackupHandler.Run(String[] sources, IFilter filter) at Duplicati.Library.Main.Controller.<>c__DisplayClass16_0.<Backup>b__0(BackupResults result) at Duplicati.Library.Main.Controller.RunAction[T](T result, String[]& paths, IFilter& filter, Action`1 method)
Steps to reproduce
Duplicati running as service: Backup config: { "CreatedByVersion": "2.0.2.1", "Schedule": { "ID": 1, "Tags": [ "ID=1" ], "Time": "2018-02-01T03:00:00Z", "Repeat": "1D", "LastRun": "2018-01-31T03:00:00Z", "Rule": "AllowedWeekDays=Monday,Tuesday,Wednesday,Thursday,Friday,Saturday,Sunday", "AllowedDays": [ "mon", "tue", "wed", "thu", "fri", "sat", "sun" ] }, "Backup": { "ID": "1", "Name": "Monitor", "Tags": [], "TargetURL": "ftp://192.168.0.6//k-monitor/monitor?auth-username=k-monitor&auth-password=***", "DBPath": "C:\Windows\system32\config\systemprofile\AppData\Local\Duplicati\NRKNDDODTC.sqlite", "Sources": [ "C:\Monwin\" ], "Settings": [ { "Filter": "", "Name": "encryption-module", "Value": "", "Argument": null }, { "Filter": "", "Name": "compression-module", "Value": "zip", "Argument": null }, { "Filter": "", "Name": "dblock-size", "Value": "2GB", "Argument": null }, { "Filter": "", "Name": "keep-versions", "Value": "7", "Argument": null }, { "Filter": "", "Name": "--no-encryption", "Value": "true", "Argument": null }, { "Filter": "", "Name": "--synchronous-upload", "Value": "true", "Argument": null }, { "Filter": "", "Name": "--auto-cleanup", "Value": "true", "Argument": null }, { "Filter": "", "Name": "--compression-module", "Value": "7z", "Argument": null }, { "Filter": "", "Name": "--exclude-files-attributes", "Value": "temporary", "Argument": null } ], "Filters": [ { "Order": 0, "Include": false, "Expression": "C:\Monwin\DB\" } ], "Metadata": { "LastErrorDate": "20180131T031938Z", "LastErrorMessage": "Arithmetic operation resulted in an overflow.", "LastDuration": "00:17:42.1830985", "LastStarted": "20180130T030000Z", "LastFinished": "20180130T031742Z", "LastBackupDate": "20180130T030000Z", "BackupListCount": "7", "TotalQuotaSpace": "0", "FreeQuotaSpace": "0", "AssignedQuotaSpace": "-1", "TargetFilesSize": "5710359876", "TargetFilesCount": "35", "TargetSizeString": "5.32 GB", "SourceFilesSize": "10853389685", "SourceFilesCount": "1660", "SourceSizeString": "10.11 GB", "LastBackupStarted": "20180130T030000Z", "LastBackupFinished": "20180130T031742Z" }, "IsTemporary": false }, "DisplayNames": { "C:\Monwin\": "Monwin" } }
- Actual result: Backup failed
- Expected result: Backup created
Screenshots
Failed while executing "Backup" with id: 1 System.OverflowException: Arithmetic operation resulted in an overflow. at ManagedLzma._7zip.Decoder.FileBufferedDecoderStream..ctor(Stream stream) at master._7zip.Legacy.ArchiveReader.GetCachedDecoderStream(CArchiveDatabaseEx _db, Int32 folderIndex, IPasswordProvider pw) at master._7zip.Legacy.ArchiveReader.OpenStream(CArchiveDatabaseEx _db, Int32 fileIndex, IPasswordProvider pw) at Duplicati.Library.Main.Volumes.VolumeReaderBase..ctor(ICompression compression, Options options) at Duplicati.Library.Main.Operation.CompactHandler.DoCompact(LocalDeleteDatabase db, Boolean hasVerifiedBackend, IDbTransaction& transaction) at Duplicati.Library.Main.Operation.DeleteHandler.DoRun(LocalDeleteDatabase db, IDbTransaction& transaction, Boolean hasVerifiedBacked, Boolean forceCompact) at Duplicati.Library.Main.Operation.BackupHandler.CompactIfRequired(BackendManager backend, Int64 lastVolumeSize) at Duplicati.Library.Main.Operation.BackupHandler.Run(String[] sources, IFilter filter) at Duplicati.Library.Main.Controller.<>c__DisplayClass16_0.<Backup>b__0(BackupResults result) at Duplicati.Library.Main.Controller.RunAction[T](T result, String[]& paths, IFilter& filter, Action`1 method) at Duplicati.Library.Main.Controller.Backup(String[] inputsources, IFilter filter) at Duplicati.Server.Runner.Run(IRunnerData data, Boolean fromQueue)
Debug log
Why do you have --compression-module=zip AND --compression-module=7zip in your config? It kinda looks like you backed up with zip first and then changed to 7zip and now Duplicati is trying to unpack zip files as if they were 7zip files.
In this case I shuld scrap current backup and start from scarch in 7z format. But duplicati shuld handle this situation better. It shuld understand what comression is on older backups. Or it shuld not allow to change compression method on existing backup.
I agree it's definitely not a nice way to handle it. Should be wrapped and handled or communicated properly.
You may not have to scrap it. Can you try to see if the backup works when you remove the --compression-module=7zip argument?
Some backups is alredy created in 7z format. It will be more failures.
Thanks for explanation, but I think it's a bug.
Oh, it already created some 7z files on the backend...
So that's two things that need to be handled:
- Not backing up if compression is changed
- Not throwing crazy errors if trying to read with the wrong compression module.
If it's only a single set of dlist, dblock, and dindex files as 7z, then you can recover it by moving those 7z files out of the folder and trying again with the --compression-module=zip.
The individual snapshots are not related directly, so it only fails reading the old snapshots because it fails on the new 7z files first.
Disable or fix 7z/LZMA2 #3054 in 2.0.2.20_canary_2018-02-27 dodged the issue by adding a warning
"The 7z compression module has known issues and should only be used for experimental purposes"