Repository navigation
Conversation
A remote CheckParts stream that ends without a response and without an error (e.g. the grid mux is closed during a disconnect) made storageRESTClient.CheckParts return (nil, nil). checkObjectWithAllParts then dereferenced the nil response and crashed the whole server process. Return grid.ErrDisconnected from the client in that case, and treat a nil or short per-part result as an unreachable drive in checkObjectWithAllParts. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: Lucas Röhrs <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
A production node (Silo
RELEASE.2026-11-12T00-00-00Z, 10 nodes × 8 drives, EC:4) crashed during an automatic background heal:The unrecovered panic in the heal goroutine terminated the whole server process. At that time the cluster was under heavy listing load and logged grid i/o timeouts / reconnects between nodes.
Root cause
checkObjectWithAllPartsassumes thatCheckParts/VerifyFilealways returns a response when the error is nil, and indexesverifyResp.Results[p](addr=0x8= slice length of a nil*CheckPartsResp).storageRESTClient.CheckPartscan violate this:muxClient.closeLocked()closes the response channel without sending an error (e.g. onclose()during a disconnect, or afterINTERNAL ERROR: Response was blocked).handleOneWayStreamthen returns silently on the closed channel.Stream.Resultstreats the closed channel as a normal end and returnsnil.CheckPartsreturns(nil, nil).The local
xlStorageimplementations and the REST-basedVerifyFilealways return a result or an error.Changes
storageRESTClient.CheckParts: if the stream ends without a response and without an error, returngrid.ErrDisconnected(mapped toerrDiskNotFoundbytoStorageErr).checkObjectWithAllParts: defensively treat a nil or shortCheckPartsRespas an unreachable drive (errDiskNotFound) instead of dereferencing it. This also prevents an index-out-of-range panic if a drive reports fewer part results thanlatestMeta.Parts.I did not change the grid stream semantics (closed channel = success), because that affects all streaming RPCs. It may be worth a separate discussion.
Test evidence
TestCheckObjectWithAllPartsMissingResult(normal and deep scan): one drive returns(nil, nil), one returns a short result.erasure-healing-common.go:428.checkPartDiskNotFoundand the others ascheckPartSuccess.go test -tags kqueue,dev ./cmd -run 'CheckObjectWithAllParts|Heal|NativeAudit|StorageREST|CommonParities'passes.make verifierspasses (rebrand compatibility baseline unchanged).make buildproducessilo.make testsuite was not run.Compatibility notes
No change to storage format, wire protocol, RPC handlers, or any
MINIO_*/x-minio-*/.minio.sysidentifiers. The only behavioral change: a drive that previously produced(nil, nil)(and crashed the process) is now treated as offline for this heal check.Documentation impact
None.
Related
A separate issue about objects written by older MinIO releases failing read/list with
InsufficientReadQuorum(whilemc admin healrepairs them) will be filed separately. That issue triggered the heal that hit this panic.This fix was investigated and written with the assistance of AI (Claude by Anthropic). The analysis, the code, and the test results were reviewed by me before submission.
🤖 Generated with Claude Code