syncthing on Linux constantly crashing? restarting

Yesterday I installed syncthing on my Debian file server. It’s a low power machine with a fanless MiniITX motherboard. It’s running debian stretch 64 bit and as a samba file server it’s been utterly reliable. The first change was to change the gui to 0.0.0.0 as it has no desktop and put a password. It is running 0.14.18+dfsg1-2+b1 straight from the debian apt-get install thing. I did this command to make it start “systemctl enable syncthing@syncthing.service” Today I downloaded SyncTrayzorSetup-x64.exe and installed on my Windows 10 laptop. In the gui it says v1.1.4, Windows (64 bit)

I set up a new folder on both machines using the syncthing gui and put them in the same folder ID. Both folders were initially blank. Both machines found each other and it all seemed great.

Then I dragged a folder with nearly 4 gigs of files on the laptop to the syncthing folder, and it started syncing.

Then I noticed that the server device keeps connecting and disconnecting. When it disconnects the web gui disconnects as well. It seems to then automatically reconnect.

I notice that the uptime on the Windows laptop is over 1 hour but on the Debian server it’s never more than a minute.

I also notice that when connected that the CPU on the Debian server is 100%.

I have already set both sides to local discovery only. I only want it to sink when both devices are on the same LAN. This made no difference.

Then I set the upload and download limit on both Windows and Linux to 1000 KiB/s.

The files are slowing syncing but it is much slower than it was at first.

syncthing is using 100% CPU and 4.5% memory on Linux

This is the disc usage Filesystem Size Used Avail Use% Mounted on udev 481M 0 481M 0% /dev tmpfs 99M 12M 88M 12% /run /dev/sdb1 54G 3.9G 48G 8% / tmpfs 494M 0 494M 0% /dev/shm tmpfs 5.0M 0 5.0M 0% /run/lock tmpfs 494M 0 494M 0% /sys/fs/cgroup /dev/sdc1 1.8T 765G 975G 44% /home tmpfs 99M 0 99M 0% /run/user/0

The / disc is a 60G SSD and the /home is 2T spinny disc.

Can anyone tell me I should do to figure out what’s wrong or what I did wrong? thanks DNJ

I suggest you search for a simillar issue on some other forum thread and follow the steps.

First step is obviously check the logs.

I stopped it using systemctl and just ran it from command line. It panicked and told me where to look for the log file. Looking through the log I have this:-

[JSRI5] 22:40:49 INFO: Device {censored} client is “syncthing v1.1.4” named “DESKTOP-TIQEHL1” Panic at 2019-06-10T22:42:35+01:00 panic: runtime error: slice bounds out of range

etc etc etc

There is pages of stuff after that but the forum seems to think it’s links.

I searched for “panic: runtime error: slice bounds out of range” and the last hit is a post five year old

Now I have lots of log files

root@debserv:/home/syncthing/.config/syncthing# ls cert.pem https-cert.pem key.pem panic-20190610-224546.log panic-20190610-224922.log panic-20190610-225447.log config.xml https-key.pem panic-20190610-224235.log panic-20190610-224649.log panic-20190610-225117.log panic-20190610-225545.log csrftokens.txt index-v0.14.0.db panic-20190610-224411.log panic-20190610-224824.log panic-20190610-225312.log

root@debserv:/home/syncthing/.config/syncthing# grep panic * grep: index-v0.14.0.db: Is a directory panic-20190610-224235.log:panic: runtime error: slice bounds out of range panic-20190610-224235.log:panic(0xa12d00, 0xc42000c110) panic-20190610-224235.log: /usr/lib/go-1.7/src/runtime/panic.go:500 +0x1a1 panic-20190610-224411.log:panic: runtime error: slice bounds out of range panic-20190610-224411.log:panic(0xa12d00, 0xc42000c120) panic-20190610-224411.log: /usr/lib/go-1.7/src/runtime/panic.go:500 +0x1a1 panic-20190610-224546.log:panic: runtime error: slice bounds out of range panic-20190610-224546.log:panic(0xa12d00, 0xc42000c120) panic-20190610-224546.log: /usr/lib/go-1.7/src/runtime/panic.go:500 +0x1a1 panic-20190610-224649.log:panic: runtime error: slice bounds out of range panic-20190610-224649.log:panic(0xa12d00, 0xc42000c120) panic-20190610-224649.log: /usr/lib/go-1.7/src/runtime/panic.go:500 +0x1a1 panic-20190610-224824.log:panic: runtime error: slice bounds out of range panic-20190610-224824.log:panic(0xa12d00, 0xc42000c120) panic-20190610-224824.log: /usr/lib/go-1.7/src/runtime/panic.go:500 +0x1a1 panic-20190610-224922.log:panic: runtime error: slice bounds out of range panic-20190610-224922.log:panic(0xa12d00, 0xc42000c120) panic-20190610-224922.log: /usr/lib/go-1.7/src/runtime/panic.go:500 +0x1a1 panic-20190610-225117.log:panic: runtime error: slice bounds out of range panic-20190610-225117.log:panic(0xa12d00, 0xc42000c120) panic-20190610-225117.log: /usr/lib/go-1.7/src/runtime/panic.go:500 +0x1a1 panic-20190610-225312.log:panic: runtime error: slice bounds out of range panic-20190610-225312.log:panic(0xa12d00, 0xc42000c120) panic-20190610-225312.log: /usr/lib/go-1.7/src/runtime/panic.go:500 +0x1a1 panic-20190610-225447.log:panic: runtime error: slice bounds out of range panic-20190610-225447.log:panic(0xa12d00, 0xc42000c120) panic-20190610-225447.log: /usr/lib/go-1.7/src/runtime/panic.go:500 +0x1a1 panic-20190610-225545.log:panic: runtime error: slice bounds out of range panic-20190610-225545.log:panic(0xa12d00, 0xc42000c120) panic-20190610-225545.log: /usr/lib/go-1.7/src/runtime/panic.go:500 +0x1a1 panic-20190610-225740.log:panic: runtime error: slice bounds out of range panic-20190610-225740.log:panic(0xa12d00, 0xc42000c120) panic-20190610-225740.log: /usr/lib/go-1.7/src/runtime/panic.go:500 +0x1a1

You’ll need to upgrade on the debian: The variable block feature is not compatible with <0.14.46 (or something close to that), see e.g. apt.syncthing.net.

okay I have done that. So far so good.

Presumably I should report it to debian as a bug and that they need to update it.

thanks

Debian Stretch is a couple of years old. So this is expected, I don’t think there’s anything to report.

1 Like