I have got this strange panic today. I have searched here, on GitHub, and in Google, but I have been unable to find any relevant information on this specific error.
Once the panic happened, the database became somehow corrupted and started throwing corruption on data-block
errors leading to an endless restart loop. I have checked the disk (SSD) for possible hardware issues, but everything seems to be perfectly fine with it.
panic: leveldb: resource already relesed
goroutine 275853 [running]:
github.com/syndtr/goleveldb/leveldb/util.(*BasicReleaser).SetReleaser(0xc008f76800, 0x21de640, 0xc00b33d488)
github.com/syndtr/goleveldb@v1.0.1-0.20200815071216-d9e9293bd0f7/leveldb/util/util.go:63 +0xc7
github.com/syndtr/goleveldb/leveldb.(*DB).newRawIterator(0xc0000fe000, 0x0, 0x0, 0x0, 0x0, 0xc00b1611d0, 0x0, 0x1, 0xc008f2bd10)
github.com/syndtr/goleveldb@v1.0.1-0.20200815071216-d9e9293bd0f7/leveldb/db_iter.go:55 +0x345
github.com/syndtr/goleveldb/leveldb.(*DB).newIterator(0xc0000fe000, 0x0, 0x0, 0x0, 0x0, 0x4c4306, 0xc002d09640, 0x0, 0x12e2178)
github.com/syndtr/goleveldb@v1.0.1-0.20200815071216-d9e9293bd0f7/leveldb/db_iter.go:79 +0xa5
github.com/syndtr/goleveldb/leveldb.(*Snapshot).NewIterator(0xc00b1611a0, 0xc002d09640, 0x0, 0x0, 0x0)
github.com/syndtr/goleveldb@v1.0.1-0.20200815071216-d9e9293bd0f7/leveldb/db_snapshot.go:165 +0x18e
github.com/syncthing/syncthing/lib/db/backend.leveldbSnapshot.NewPrefixIterator(0xc00b1611a0, 0xc008905ae0, 0xc008f2bc80, 0x25, 0x25, 0x25, 0x25, 0x0, 0x0)
github.com/syncthing/syncthing/lib/db/backend/leveldb_backend.go:137 +0x114
github.com/syncthing/syncthing/lib/db.(*BlockFinder).Iterate(0xc0000063a8, 0xc002d40600, 0x18, 0x20, 0xc008eab320, 0x20, 0x20, 0xc002d09c28, 0x0)
github.com/syncthing/syncthing/lib/db/blockmap.go:48 +0x527
github.com/syncthing/syncthing/lib/model.(*sendReceiveFolder).copierRoutine(0xc00c4d5500, 0xc005825620, 0xc0058255c0, 0xc005825680)
github.com/syncthing/syncthing/lib/model/folder_sendrecv.go:1315 +0x92d
github.com/syncthing/syncthing/lib/model.(*sendReceiveFolder).pullerIteration.func2(0xc00c4d5500, 0xc005825620, 0xc0058255c0, 0xc005825680, 0x21f05f0, 0xc00c25e3f0)
github.com/syncthing/syncthing/lib/model/folder_sendrecv.go:268 +0x50
created by github.com/syncthing/syncthing/lib/model.(*sendReceiveFolder).pullerIteration
github.com/syncthing/syncthing/lib/model/folder_sendrecv.go:266 +0x4c5
panic-20210815-065956.log (1.6 MB)
PS I know that it should be spelled “released”, but I’ve just copied and pasted the error message as it is.