panic: runtime error

Hi, My Syncthing V0.14.51.RC4 (windows 10) don’t start :frowning: config.xml (60.1 KB) syncthing.log (235.8 KB)

panic: runtime error: index out of range

[MCAKF] 16:18:13 INFO: Completed initial scan of sendreceive folder “XXXXXX” (mx25c-efbjl) Panic at 2018-09-24T16:18:13+02:00 panic: runtime error: index out of range

goroutine 120 [running]: github.com/syncthing/syncthing/lib/model.(*sendReceiveFolder).processNeeded(0xc0012fc580, 0xc00017b290, 0xc000269d60, 0xc0027caba0, 0xc0027caae0, 0xc0027cab40, 0xc0027ca9c0, 0xe59c20, 0xc00163f020, 0x60, …) C:/BuildAgent/work/src/github.com/syncthing/syncthing/lib/model/folder_sendrecv.go:464 +0x1518 github.com/syncthing/syncthing/lib/model.(*sendReceiveFolder).pullerIteration(0xc0012fc580, 0xc00017b290, 0xc000269d60, 0xc0012fc501, 0xc0027ca9c0, 0x2) C:/BuildAgent/work/src/github.com/syncthing/syncthing/lib/model/folder_sendrecv.go:271 +0x58d github.com/syncthing/syncthing/lib/model.(*sendReceiveFolder).pull(0xc0012fc580, 0xc0044c3d00) C:/BuildAgent/work/src/github.com/syncthing/syncthing/lib/model/folder_sendrecv.go:185 +0x5f3 github.com/syncthing/syncthing/lib/model.(*folder).Serve(0xc0012fc580) C:/BuildAgent/work/src/github.com/syncthing/syncthing/lib/model/folder.go:147 +0x7a2 github.com/syncthing/syncthing/vendor/github.com/thejerf/suture.(*Supervisor).runService.func1(0xc001a48960, 0xc000000020, 0x1822388, 0xc0012fc580) C:/BuildAgent/work/src/github.com/syncthing/syncthing/vendor/github.com/thejerf/suture/supervisor.go:540 +0x53 created by github.com/syncthing/syncthing/vendor/github.com/thejerf/suture.(*Supervisor).runService C:/BuildAgent/work/src/github.com/syncthing/syncthing/vendor/github.com/thejerf/suture/supervisor.go:528 +0x62

Regards. Sam

The error occurs when a file without a block list gets pulled:

		key := string(fi.Blocks[0].Hash)

However on incoming indexes and when creating files in the scanner, we check that the block list is non-empty. So I am currently at a loss as to how this panic might happen.

Can you please start Syncthing with model and db debug facilities enabled (assume you use synctrayzor, there’s a setting for that somewhere).

I have 2 servers and copy paste manually syncthing conf and manually change computer name and signature. Perhaps it is rhe pb ?

If yes, how can Export/Import all clients and shares.

Regards. Sam

I don’t see how that should be connected to this panic.

What is the command line for debuging ? (windows)

The env var is STTRACE and the value db,model. I don’t know about env vars on windows, searching for it brought up a thread of yours with info on it: Windows or Mac and GOMAXPROCS

syncthing.log (180.1 KB) panic-20180925-113453.log (259.3 KB) panic-20180925-113512.log (252.8 KB)

see log here

tks sam

Thanks a lot for your reports!
The offending file entry is AppData\Local\Microsoft\Windows\WebCache\WebCacheV01.dat. Meaning it somehow happened that it is present in the db without a block list. It would be interesting to see what’s in the db, unfortunately you can’t run rest calls, as it crashes immediately. Could you upload your database somewhere and make it available to me?

Edit: Actually it’s probably a lot easier if I create a debug build for you to run which will print the relevant information to the log.

1 Like

Can you capture logs again running the binary from this PR https://github.com/syncthing/syncthing/pull/5222, which you can download from the build server (you might need to login as guest): https://build.syncthing.net/repository/download/Syncthing_BuildWindows/27573:id/syncthing-windows-amd64-v0.14.51-rc.4%2B15-g369a020.zip or alternatively I uploaded it here: syncthing-windows-amd64-v0.14.51-rc.4 15-g369a020.zip (8.0 MB)

1 Like

Hi, Upload of database in progress (3.6Go)

Logs files here with specific debug option and bin :slight_smile: syncthing.log (103.6 KB) panic-20180926-132736.log (147.3 KB)

Tks Sam

1 Like

No need to upload the db, the problem is already clear from the logs. As usual, the cause for the problem is not yet clear :expressionless:

The relevant lines:

[MCAKF] 2018/09/26 13:27:36.338559 leveldb_dbinstance.go:320: INFO: extra debug: GetGlobal for mx25c-efbjl in AppData/Local/Microsoft/Windows/WebCache/WebCacheV01.dat: version list: {{{[{WOBFHTO 17}]}, 5FPONTX-MPO45ZQ-OZF5UVG-BAVWDRA-DXAVMWA-HFXP3PT-RSAPEFW-6PXN6AD}}
[MCAKF] 2018/09/26 13:27:36.339559 folder_sendrecv.go:464: INFO: sendreceive/mx25c-efbjl@0xc001158b00 File{Name:"AppData\\Local\\Microsoft\\Windows\\WebCache\\WebCacheV01.dat", Sequence:177099, Permissions:0644, ModTime:2018-05-04 19:33:40.7112479 +0200 CEST, Version:{[{WOBFHTO 17}]}, Length:52494336, Deleted:false, Invalid:true, LocalFlags:0x0, NoPermissions:false, BlockSize:0, Blocks:[]}
panic: runtime error: index out of range

It considers a file, that does not exist locally, and is invalid on one remote, as needed. This should be impossible, due to
https://github.com/syncthing/syncthing/blob/master/lib/db/leveldb_transactions.go#L158

@AudriusButkevicius @calmh Any ideas?

@Samuel_Bruyere Please keep a copy of your current config and db around. As a workaround, remove the folder with ID “mx25c-efbjl” from your config and then after starting Syncthing add it again - the error should be gone then (if it’s not, there’s an opportunity for more investigations :wink: ).

Ok tks

(backup and db save)

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.