Found mis-handled disk corruption or other internal bug
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Idoneità per principianti
- 25/100
Direzione di ricerca
Start at fastcache.go:318 and trace the SetBig disk-cache path that accesses b.chunks. Investigate how the nil chunk panic could arise and whether corruption can be detected without checksums; done would be a defined error path instead of a crash, with coverage for the reported condition if it can be reproduced.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
I am a heavy user of this cache in production and have ran into a bug. We save our cache to disk and have O(1GB) of cache per node storing many small and medium size objects using the SetBig function.
Yesterday we ran into a machine in a "zombie" situation piling up tens of thousands of goroutines doing cache lookups. They were all attempting to acquire the RLock to read a bucket in the cache.
Four goroutines were attempting to write to the cache and had paniced. Due to a quirk in our usage, we have a defer that will eventually also write to the cache under some circumstances that will run in the same goroutine where the panic happened. This results in deadlock.
The panic happened at fastcache.go:318, the first line in this snippet:
chunk := b.chunks[chunkIdx]
if chunk == nil {
chunk = getChunk()
chunk = chunk[:0]
}
I'm not sure how this would come up, but it should be handled instead of crashing by returning an error that corruption was found. This may not be possible given the lack of checksums in the library generally.
I don't have a great solution here, but I thought you should know about this. On our end, we are wrapping our usage with a defer function that will nuke the cache from disk, sync the directory, and call os.Exit.
- Lingua principale
- Go
- Stelle
- 2.4k
- Fork
- 199
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Preparare l'ambiente
Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di VictoriaMetrics/fastcache
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 35/100
VictoriaMetrics/fastcache#98 · 1 commento ·
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 35/100
VictoriaMetrics/fastcache#80 ·
-
Difficoltà 5/5 Più di una settimana Idoneità per principianti 25/100
VictoriaMetrics/fastcache#79 · 1 commento · 1 reazione ·
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 30/100
VictoriaMetrics/fastcache#75 ·
-
Difficoltà 5/5 Più di una settimana Idoneità per principianti 20/100
VictoriaMetrics/fastcache#74 ·
Tutte le issue di VictoriaMetrics/fastcache
Issue simili
-
A failed hydrate call can be dropped when the row's wait is ready tooForse già presa @turbot-agent-fleet l’ha presa oggi. Apertaagent:ready
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
turbot/steampipe-plugin-sdk#1018 · 2 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
enhancement needs-review
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
router-for-me/CLIProxyAPI#7976 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 88/100
uselagoon/lagoon-cli#501 · 1 reazione ·
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 85/100