Error after upgrading to 2.0.2.17_canary_2018-01-23 : Negating the minimum value of a twos complement number is invalid

I’ve recently upgraded to the latest canary build (2.0.2.17_canary_2018-01-23) from the previous canary build.

When running a backup with a local drive as destination, I get this error :

Jan 24, 2018 6:01 PM: Message
Fatal error
System.OverflowException: Negating the minimum value of a twos complement number is invalid.
   at Duplicati.Library.Main.BackendManager.Put(VolumeWriterBase item, IndexVolumeWriter indexfile, Boolean synchronous)
   at Duplicati.Library.Main.Operation.BackupHandler.RecreateMissingIndexFiles(BackendManager backend)
   at Duplicati.Library.Main.Operation.BackupHandler.Run(String[] sources, IFilter filter)

Jan 24, 2018 6:01 PM: Retry
Operation Put with file duplicati-i0d07427770b64815bcd3aa6ed92ef78c.dindex.zip attempt 5 of 5 failed with message: Negating the minimum value of a twos complement number is invalid.
System.OverflowException: Negating the minimum value of a twos complement number is invalid.
   at Duplicati.Library.Main.BackendManager.Put(VolumeWriterBase item, IndexVolumeWriter indexfile, Boolean synchronous)
   at Duplicati.Library.Main.Operation.BackupHandler.RecreateMissingIndexFiles(BackendManager backend)
   at Duplicati.Library.Main.Operation.BackupHandler.Run(String[] sources, IFilter filter)

Jan 24, 2018 6:01 PM: Message
Renaming "duplicati-ib3c68f71518a430ca70c81e8e048aade.dindex.zip" to "duplicati-i0d07427770b64815bcd3aa6ed92ef78c.dindex.zip"

I’ve tried to Recreate the DB, but no luck. I got several warnings (same OverflowException) instead of this fatal error, but it finished.

I can provide more information as needed.

Thanks.

I’m permanently getting the same error in german language. A freshly created backup from disk to disk created a Gigabyte of file, then error msg appears. In the error message, when I click “show” instead of dismiss, it does not show log, but says “The backup is missing, has it been deleted?”.

Backup command line:

“C:\Program Files\Duplicati 2\Duplicati.CommandLine.exe” backup “file://C:\Disk\WD50\Backup\Duplicati\Musik\” “M:\Musik\Library\” “M:\Musik_Einordnen\” --thread-priority=normal --backup-name="[Local] Music" --dbpath=“C:\Users\Michel\AppData\Local\Duplicati\KUPBRCXAVP.sqlite” --encryption-module=aes --compression-module=zip --dblock-size=500MB --passphrase=boo --retention-policy=“1W:1D,4W:1W,12M:1M” --zip-compression-method=None --disable-module=console-password-input

I’m also having this issue with 2.0.2.17_canary_2018-01-23.-x64.msi
I removed it and tried v2.0.2.16-2.0.2.16_canary_2018-01-18-x64.msi, and had the same error.
I then tried v2.0.2.14-2.0.2.14_canary_2017-12-22-x64.msi , same error.

Finally went back to v2.0.2.1_beta_2017-08-01-x64.msi and it works fine, no error.

It’s a problem, I cannot reliably backup now. I hope I won’thave to go back step by step to some archaic version…

How did you downgrade? Installation is often a mess for whatever reason: I downloaded duplicati-2.0.2.1_beta_2017-08-01-x64.exe - started it, installation ran, after the process there is no duplicati-trayicon.exe. Started the setup again, had the “Repair” option, used it. After the process, I could start duplicati-trayicon again (“C:\Program Files\Duplicati 2\Duplicati.GUI.TrayIcon.exe”) - the webgui, also after several incarnations of F5, Shift+F5, ctrl+f5, insists on being the latest 2018-01-23 Canary. But I think it is not, since now my old backup runs without above error.

EDIT: Wrong, it ends with above error. Looks like I have to go back to an even more archaic version like you.

Sucks hard now. I started duplicati-2.0.2.1_beta_2017-08-01-x64.msi - it offers me to unistall, which after the process it says it did (and I had a look, “c:\Program Files\Duplicati 2” was empty). Then I started duplicati-2.0.2.1_beta_2017-08-01-x64.msi again and I chose the install option, which after the process it said it did and indeed, lots of files in “c:\Program Files\Duplicati 2”.

I then started “C:\Program Files\Duplicati 2\Duplicati.GUI.TrayIcon.exe” - and every browser tells me I am running the awful “Duplicati - 2.0.2.17_canary_2018-01-23”.
That is the WebGui, maybe it tends to lie.
The files in Duplicati Program folder are all version 2.0.2.1. Nice, but I still get the “minimum value” error on backup.

To be safe, I uninstalled Duplicati now, because I don’t want it to mess with my remote terabytes. Yes I know, Canary in a production environment was a super bad idea. I have no clue currently how I can install an older, working version again.

Recreating the DB likely won’t resolve this issue for you as the .BackendManager.Put part of the error it indicates it’s likely a problem with trying to write a file to your destination.

@Tapio seems to be getting the error with a local Windows drive destination and you seem to be getting it with a local drive (not sure what OS) as well. If @kxboy can share what his destination type is (and OS, if it’s local) that might help point to where the problem might be in the code.

Now that I think about it, the format of the drives might matter as well - so if you know what your drive format is (exFAT, NTFS, FAT32, FAT16, etc.) please let us know.

I’m not at my machine but I can tell the target is either behind an NTFS link (mklink /d) and/or a partition mapped to a directory (via diskmanagement). Need to have a look. Target is definitely NTFS.

Cool, thanks! For what it’s worth, the actual error is likely due to trying to store a negative number “bigger” than the variable that’s set up for it.

If that’s really the case, the the fix is either:

  • easy (use a larger variable type)
  • hard (keep the currently variable type but figure out why this has suddenly started happening)

Here are some information:
OS is Windows 10.
Duplicati is installed on C:
Backup destination is on D: (no encryption is used)
All drives use NTFS.

I now mapped the target partition a drive letter via diskmanagement -> same problem.
“Upload volume size” is 100 MByte. No extra options. I.e., backup is pretty standard. Win7x64 here.

I hope this gets resolved, I’d like to use the new version with its retention options.

I’m using Windows 7 Pro, File system is NTFS. Backup is to the local disk, drive c.

I’ve got a similar issue: System.OverflowException: Negating the minimum value of a twos complement number is invalid. · Issue #2994 · duplicati/duplicati · GitHub

I believe a fix has been submitted here:

In the mean time, I suspect rolling back to something from before 2018-01-04 (such as 2.0.2.15_experimental_2018-01-03 or 2.0.2.14_canary_2017-12-22) will get you back to before the problem was exposed.

1 Like

I removed 2.0.2.17_canary_2018-01-23, using the control panel, Programs, Uninstall option and installed 2.0.2.14_canary_2017-12-22. Still getting the same error. However , the about screen still shows 2018-01-23. Are there additional steps required to fully remove a previous install to roll back?

Sounds to me like you did it all correctly, so in but sure why it’s still erroring. The version number could be due to browser caching - try checking version in a Private / Incognito window.

Oh, and it sounds like the error might be coming from having "too fast"of a destination… 8-O You wouldn’t happen to be writing to a fast drive, would you?

The same error in my case.

I merged two backup sets with the same password, sources and rebuild the database.

Duplicati rebuild the database successfully and then after each run it stops with this error.

Found this thread about the roll back issue.

Clearing the browser cache, or using a private window does not work.

You have to delete the c:\program data\duplicate folder to get a clean roll back. It seems that the installer will check this folder and install the latest version found here. I guess you could probably delete the subfolder that contains the latest version and that might work. However I did not test that.

Once I deleted the program data\duplicate folder, I reinstalled 2.0.2.1 beta and not longer get the twos complement error.

Also, the idea that this maybe caused by “too fast of a destination” I don’t think that is the case, as I did not have this issue before the latest canary, using the same drives and config files.

2 Likes

It’s a combination of things. Specifically, the code that is throwing the error is what formats byte numbers into KB, MB, GB, etc.

Until recently, that code wasn’t called for negative numbers. When that change rolled, the broken-ness of the formatting code when being called with very large negative numbers became exposed.

The only way we’ve (so far) figured out such large negatives could be generated involves very short timeframes used in some “bytes per second” style math.

Is this an update bug @kenkendk or maybe just an unfortunate side effect?

Would throttling be a workaround in this case?

EDIT: throttling at 1MB/s in upload/download doesn’t help. I will try lower…
EDIT 2: same issue when throttling at 100kb/s. So it doesn’t help at all… :frowning:

Good thought, but IIRC you are writing to a local drive and I think throttling only applies to network requests.

Even there, I’m not sure if it’s all network usage or only certain protocols (for example http, FTP, WebDAV but not SMB).

And I believe “drive too fast” is still a theory as we haven’t been able to replicate the issue. :frowning: