panic: leveldb: resource already relesed

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.

Sounds like a bug in the database package and/or cosmic rays (this panic has never been reported by anyone else as far as I can see). (The misspelling is in the db package so it’s easy to search for in Sentry…)

Does the bug belong in the Syncthing issue tracker, or should I report it somewhere else?

I’ve also never seen this particular panic, and I did use Syncthing on the specific device in a similar configuration previously (although this is a fresh Windows installation right now).

Honestly I don’t think it belongs anywhere unless you can reproduce it. One-off mysterious panics that might be hardware related and only happened once aren’t something we can really troubleshoot.

This happened when trying to synchronise quite a large folder. I will try enabling debug logging and then download the same folder again. Let’s see if everything goes smoothly this time.

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