panic: runtime error: index out of range [1] with length 1


Using 1.6.1 on a Mac. Shorty after the startup Syncthing has issues.

I reinstalled Syncthing. Config was still available, reinstall did not help. I then deleted the DB files. Rescan and all seemed to be fine then. 3 hours later same starts again.

Attached the log (sorry, I had to replace by githubcom, otherwise I cant send), any hints maybe?

Thanks in advance!

=== [start] 19:57:52 INFO: syncthing v1.6.1 “Fermium Flea” (go1.14.4 darwin-amd64) 2020-06-02 09:49:22 UTC

Panic at 2020-06-13T19:58:19+02:00 panic: runtime error: index out of range [1] with length 1

goroutine 98 [running]: githubcom/syncthing/syncthing/lib/model.(*sendReceiveFolder).processNeeded(0xc0001b6380, 0xc000041a80, 0xc000959da0, 0xc000959ce0, 0xc000959c20, 0xc000959da0, 0xc000959c20, 0x4e261c0, 0xc0006b9c90, 0xc00285d520, …)

… a lot more and ending with

/Users/syncthing/agent/work/174e136266f8a219/lib/model/folder_sendrecv.go:247 +0x49 created by githubcom/syncthing/syncthing/lib/model.(*sendReceiveFolder).pullerIteration /Users/syncthing/agent/work/174e136266f8a219/lib/model/folder_sendrecv.go:245 +0x4a9

goroutine 425 [chan receive]: githubcom/syncthing/syncthing/lib/model.(*sendReceiveFolder).copierRoutine(0xc0001b6380, 0xc000959ce0, 0xc000959c80, 0xc000959d40) /Users/syncthing/agent/work/174e136266f8a219/lib/model/folder_sendrecv.go:1193 +0x476 githubcom/syncthing/syncthing/lib/model.(*sendReceiveFolder).pullerIteration.func2(0xc0001b6380, 0xc000959ce0, 0xc000959c80, 0xc000959d40, 0x4e261c0, 0xc0006b9c80) /Users/syncthing/agent/work/174e136266f8a219/lib/model/folder_sendrecv.go:247 +0x49 created by githubcom/syncthing/syncthing/lib/model.(*sendReceiveFolder).pullerIteration /Users/syncthing/agent/work/174e136266f8a219/lib/model/folder_sendrecv.go:245 +0x4a9

goroutine 424 [select]: githubcom/syncthing/syncthing/lib/model.(*sendReceiveFolder).dbUpdaterRoutine(0xc0001b6380, 0xc000959da0) /Users/syncthing/agent/work/174e136266f8a219/lib/model/folder_sendrecv.go:1614 +0x238 githubcom/syncthing/syncthing/lib/model.(*sendReceiveFolder).pullerIteration.func1(0xc0001b6380, 0xc000959da0, 0x4e261c0, 0xc0006b9ca0) /Users/syncthing/agent/work/174e136266f8a219/lib/model/folder_sendrecv.go:239 +0x35 created by githubcom/syncthing/syncthing/lib/model.(*sendReceiveFolder).pullerIteration /Users/syncthing/agent/work/174e136266f8a219/lib/model/folder_sendrecv.go:237 +0x414

goroutine 3829 [select]: net.(*netFD).connect.func2(0x4e28c00, 0xc0038b80c0, 0xc0038cc280, 0xc0063af980, 0xc0063af920) /Users/syncthing/sdk/go1.14.4/src/net/fd_unix.go:129 +0xba created by net.(*netFD).connect /Users/syncthing/sdk/go1.14.4/src/net/fd_unix.go:128 +0x22f

This is issue #6654, fixed in 1.7.0

Great, thanks for the quick reply. As 1.7.0 (final) is not yet available, should I downgrade (to which version?) or update to the RC?

Hey there! Just created an account to ask the same question: What to do until 1.7.0 is released? We are face the same issue with a very big impact on our network … Is there any workaround or way to get safely back to an old working build? Any way to manually fix the broken index?

Any other idea? (Btw: Glad to just having found that this is a bug … was already thinking about some other issue …)


I think this only happens for renames. So I know “don’t rename your files” is not very useful suggestion. Perhaps you can build your own version with the fix backported if you don’t want to run rc’s.

I indeed updated to 1.7.0 RC (by changing setting). As it’s RC of course with a backup. Seems to work ok. Other clients are still on 1.6.x.