CLI 2.7.0 crashes when running check on 32 bit cpu

Hi. I’ve also got the same error message and can’t find why. It happens since updating the CLI to 2.7.0.

Here’s duplicacy_web.log:

2020/09/30 12:00:01 Starting schedule check at scheduled time 2020-0930 12:00
2020/09/30 12:00:01 Created log file /home/pi/.duplicacy-web/logs/check-20200930-120001.log
2020/09/30 12:00:01 Running /home/pi/.duplicacy-web/bin/duplicacy_linux_arm_2.7.0 [-log check -storage rpi4 -stats -a -tabular]
2020/09/30 12:00:01 Set current working directory to /home/pi/.duplicacy-web/repositories/localhost/all
2020/09/30 12:00:02 Created log file /home/pi/.duplicacy-web/logs/check-20200930-120002.log
2020/09/30 12:00:02 Running /home/pi/.duplicacy-web/bin/duplicacy_linux_arm_2.7.0 [-log check -storage onedrive -stats -a -tabular]
2020/09/30 12:00:02 Set current working directory to /home/pi/.duplicacy-web/repositories/localhost/all
2020/09/30 12:00:03 Created log file /home/pi/.duplicacy-web/logs/check-20200930-120003.log
2020/09/30 12:00:03 Running /home/pi/.duplicacy-web/bin/duplicacy_linux_arm_2.7.0 [-log check -storage b2 -stats -a -tabular]
2020/09/30 12:00:03 Set current working directory to /home/pi/.duplicacy-web/repositories/localhost/all
2020/09/30 12:00:40 The CLI executable returned an error: exit status 101, exit code: 101
2020/09/30 12:00:40 err: exit status 101, exitCode: 101

And this is the check which fails with the error:

Running check command from /home/pi/.duplicacy-web/repositories/localhost/all
Options: [-log check -storage rpi4 -stats -a -tabular]
2020-09-30 12:00:02.399 INFO STORAGE_SET Storage set to /home/pi/duplicacy
2020-09-30 12:00:02.591 INFO SNAPSHOT_CHECK Listing all chunks
2020-09-30 12:00:40.351 INFO SNAPSHOT_CHECK 1 snapshots and 459 revisions
2020-09-30 12:00:40.362 INFO SNAPSHOT_CHECK Total chunk size is 593,614M in 197500 chunks
exit status 101

Neither is particularly helpful…

Have you tried adding the -d switch to the global options for the job? This enabled debug mode and may tell you what’s happening.

I guess the CLI process was killed because of out of memory. You can see more error info if you run the CLI directly:

cd /home/pi/.duplicacy-web/repositories/localhost/all
/home/pi/.duplicacy-web/bin/duplicacy_*_2.7.0 -log check -storage rpi4 -stats -a -tabular

The web GUI currently doesn’t capture the stderr output from the CLI. I’ll fix that in the next release.

Thank you for the quick response.

I guess the CLI process was killed because of out of memory.

If so it seems like a leak. I have 4 GB of RAM and not much else is running on the system (constantly ~3.5 GB free). When I check htop while running the command the process never uses more than 100MB.

The command from CLI looks like this:

pi@raspberrypi:~/.duplicacy-web/repositories/localhost/all $ /home/pi/.duplicacy-web/bin/duplicacy_*_2.7.0 -log check -storage rpi4 -stats -a -tabular
2020-10-01 09:35:54.440 INFO STORAGE_SET Storage set to /home/pi/duplicacy
Enter storage password:****************************************************************
2020-10-01 09:36:40.063 INFO SNAPSHOT_CHECK Listing all chunks
2020-10-01 09:37:08.614 INFO SNAPSHOT_CHECK 1 snapshots and 481 revisions
2020-10-01 09:37:08.629 INFO SNAPSHOT_CHECK Total chunk size is 602,238M in 201611 chunks
runtime error: invalid memory address or nil pointer dereference
goroutine 6 [running]:
runtime/debug.Stack(0x41, 0x0, 0x0)
	/usr/local/go/src/runtime/debug/stack.go:24 +0x78
runtime/debug.PrintStack()
	/usr/local/go/src/runtime/debug/stack.go:16 +0x14
github.com/gilbertchen/duplicacy/src.CatchLogException()
	/Users/chgang/zincbox/go/src/github.com/gilbertchen/duplicacy/src/duplicacy_log.go:233 +0xf8
panic(0x9232f8, 0x12efd98)
	/usr/local/go/src/runtime/panic.go:522 +0x1a0
runtime/internal/atomic.goXadd64(0x26900bc, 0x103b50, 0x0, 0x1, 0x267ebc0)
	/usr/local/go/src/runtime/internal/atomic/atomic_arm.go:99 +0x1c
github.com/gilbertchen/duplicacy/src.(*ChunkDownloader).Download(0x2690070, 0x0, 0x0, 0x0, 0x267ebc0, 0x20, 0x0, 0x1, 0x0)
	/Users/chgang/zincbox/go/src/github.com/gilbertchen/duplicacy/src/duplicacy_chunkdownloader.go:494 +0x890
github.com/gilbertchen/duplicacy/src.CreateChunkDownloader.func1(0x2690070, 0x0)
	/Users/chgang/zincbox/go/src/github.com/gilbertchen/duplicacy/src/duplicacy_chunkdownloader.go:86 +0x60
created by github.com/gilbertchen/duplicacy/src.CreateChunkDownloader
	/Users/chgang/zincbox/go/src/github.com/gilbertchen/duplicacy/src/duplicacy_chunkdownloader.go:81 +0x1ec

Are you running Duplicacy on a 32-bit cpu? This is similar to Pruning crashes on 2.1.1 · Issue #469 · gilbertchen/duplicacy · GitHub. That is, the addition of a new variable to ChunkDownloader in 2.7.0 made an int64 variable (downloadedChunkSize) not 8-byte aligned, and go atomic functions can’t handle such int64 variables.

You’ll need to roll back to 2.6.2. To do this, edit ~/.duplicacy-web/duplicacy.json to set cli_version to 2.6.2 and then restart the web GUI.

Thank you. Then I’ll roll back for now then. Please tell me if you need any testing or so.

My CPU supports 64-bit, but the distro is running armv7l which is a 32-bit architecture I think.

Actually somewhat off-topic, but one reason I’ve went with arm7l instead of arm64 for my NAS is that there does not seem to be an arm64 binary for duplicacy-web.

CLI 2.7.1 has been released which should fix this issue: Release Duplicacy Command Line Version 2.7.1 · gilbertchen/duplicacy · GitHub

I also added a link to the linux arm64 web GUI executable to the download page if you want to switch to arm64.

1 Like

Thank you for the quick fix. I updated to 2.7.1 and it seems to work now!

Also thanks for the arm64 binary. I’ll definitely switch over next time I do some bigger changes of my NAS.

1 Like