Found mis-handled disk corruption or other internal bug
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 5/5
- Thời gian dự kiến
- Hơn một tuần
- Mức phù hợp với người mới
- 25/100
Hướng nghiên cứu
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.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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.
- Ngôn ngữ chính
- Go
- Star
- 2.4k
- Fork
- 199
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Chuẩn bị môi trường
Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của VictoriaMetrics/fastcache
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 35/100
VictoriaMetrics/fastcache#98 · 1 bình luận ·
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 35/100
VictoriaMetrics/fastcache#80 ·
-
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 25/100
VictoriaMetrics/fastcache#79 · 1 bình luận · 1 reaction ·
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 30/100
VictoriaMetrics/fastcache#75 ·
-
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 20/100
VictoriaMetrics/fastcache#74 ·
Tất cả issue của VictoriaMetrics/fastcache
Issue tương tự
-
A failed hydrate call can be dropped when the row's wait is ready tooCó thể đã có người làm @turbot-agent-fleet đã nhận hôm nay. Đang mởagent:ready
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
turbot/steampipe-plugin-sdk#1018 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
enhancement needs-review
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
router-for-me/CLIProxyAPI#7976 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 88/100
uselagoon/lagoon-cli#501 · 1 reaction ·
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 85/100