Skip to content

CompleteMultipartUpload checksum failures return non-AWS error codes #48

Closed

Description

@Vonng

Expected Behavior

Checksum failures on CompleteMultipartUpload should use the error codes AWS S3 documents,
so SDK error handling and retry logic behave the same way against both.

Current Behavior

Three deviations, all verified with API-level probes:

Condition MinIO AWS S3
Full object checksum does not match the assembled object XAmzContentChecksumMismatch BadDigest
x-amz-checksum-type on completion disagrees with the type from CreateMultipartUpload InvalidArgument BadDigest
Composite upload completed without a checksum for some part InvalidPart InvalidRequest, with a message naming the algorithm and the missing part

Sources:

  • cmd/erasure-multipart.go returns hash.ChecksumMismatch, mapped to
    ErrContentChecksumMismatch in cmd/api-errors.go
  • cmd/erasure-multipart.go returns InvalidArgument on the checksum type mismatch
  • the composite case returns InvalidPart from the part validation loop

AWS references: "If the two values don't match, S3 fails the request with a BadDigest
error"

and "If the checksum type doesn't match the checksum type that was specified for the object
during the CreateMultipartUpload request, it'll result in a BadDigest
error"
.

Impact

Behavioural only - the requests are correctly rejected either way. It does mislead: this is
exactly what derailed the upstream report minio#20944, where the reporter pointed out
that AWS returns BadDigest where MinIO returns InvalidPart, and the difference was
dismissed as "a minor aberration". It cost them a day of debugging.

Notes

cmd/erasure-multipart-fullobject_test.go currently asserts the existing codes, with a
comment recording the AWS-documented values, so a future correction has to update the test
deliberately rather than silently.

Context

Found while root-causing #31.

Activity

  1. Vonng commented on Jul 29, 2026

    @Vonng
    MemberAuthor

    Correction to the evidence standard in the table above, after an independent audit.

    The MinIO column is directly observed. All three responses were reproduced with
    API-level probes on both the single-drive and erasure backends:
    XAmzContentChecksumMismatch, InvalidArgument, and InvalidPart respectively.

    The AWS column is not. No request was ever made against real AWS S3 while writing this
    issue — the AWS side is taken from documentation:

    • Rows 1 and 2 (BadDigest) are documented explicitly, and the citations in the issue body
      are the primary sources.
    • Row 3 is weaker. That AWS returns InvalidRequest with a message naming the algorithm
      and the missing part for a composite completion is drawn from secondary sources, not from
      an AWS reference page or a captured transcript. Treat it as unconfirmed until someone
      attaches a real AWS response.

    Rows 1 and 2 are enough on their own to justify the change. Anyone acting on row 3 should
    confirm the exact code and message against AWS first.

  2. added this to Siloand Siloon Aug 4, 2026
  3. moved this from Backlog to In progress in Siloon Aug 27, 2026
  4. moved this from In progress to Done in Siloon Aug 27, 2026
  5. added
    bug
    on Sep 15, 2026
  6. self-assigned this
    on Sep 15, 2026
  7. added theissue type on Sep 15, 2026
  8. added this to the 20260903 milestone on Sep 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bug

Type

Projects

  • Status
    Done

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions