mdathome-golang icon indicating copy to clipboard operation
mdathome-golang copied to clipboard

Occasional panic on db shrinking

Open Tristan971 opened this issue 3 years ago • 0 comments

As per messages on discord, I occasionally see this (running v1.5.4), and it seems to only happen right after the Shrinking database... message

2020-11-07T23:34:11Z Current diskcache size: 199.2 GiB, limit: 195.3 GiB
2020-11-07T23:34:11Z Shrinking diskcache size: 199.2 GiB, limit: 195.3 GiB
panic: runtime error: slice bounds out of range [:2] with length 0

goroutine 21 [running]:
github.com/lflare/mdathome-golang/pkg/diskcache.(*Cache).DeleteFile(0xc000579800, 0x0, 0x0, 0x2, 0x2)
github.com/lflare/mdathome-golang/pkg/diskcache/diskcache.go:17 +0x2ef
github.com/lflare/mdathome-golang/pkg/diskcache.(*Cache).StartBackgroundThread(0xc000579800)
github.com/lflare/mdathome-golang/pkg/diskcache/diskcache.go:166 +0x3c5
created by github.com/lflare/mdathome-golang/pkg/diskcache.New
github.com/lflare/mdathome-golang/pkg/diskcache/diskcache.go:256 +0x17f

And some more cases (last 6 hours)

2020-11-07 23_59_11-System - Overview - Grafana - Personal - Microsoft​ Edge

Tristan971 avatar Nov 07 '20 23:11 Tristan971