JuliusBrussee/caveman · critical
probe bytes did not round-trip
Error message
probe bytes did not round-trip
What it means
Probe writes 32 random bytes under a _cave_health/ key, reads them back, and compares; if the returned bytes differ from what was written it returns 'probe bytes did not round-trip'. This detects backends that claim success on Put/Get but corrupt, truncate, or return stale data — the probe body contains no tenant data and all versions are purged afterwards.
Solutions
- Investigate the backend integrity path: check for corrupting proxies, caches, or disk issues between the client and bucket.
- If a custom or in-memory Store is under test, fix it to copy returned bytes rather than aliasing the caller's slice.
- Re-run the probe to distinguish transient corruption from deterministic misbehavior.
- Verify bucket/versioning configuration isn't serving an older object version for the same key.
- Check for any other writer that could overwrite keys under the _cave_health/ prefix.
Example fix
// before (custom Store.Get) return m.data[key], nil // aliases internal slice, caller may see mutated data // after b := make([]byte, len(m.data[key])) copy(b, m.data[key]) return b, nil
Defensive patterns
Strategy: retry
Try / catch
if err := objectstore.Probe(ctx, store); err != nil {
if strings.Contains(err.Error(), "did not round-trip") {
return fmt.Errorf("backend data integrity failure: %w", err)
}
return err
} Prevention
- Run Probe at startup and in live contract tests to catch corruption early
- Ensure custom Store implementations copy byte slices instead of aliasing caller data
- Audit proxies/caches between client and bucket for mutation or staleness
- Keep versioning settings consistent so reads never serve stale versions of probe keys
When it happens
Trigger: Get returned different bytes than Put wrote (corrupting proxy or disk, truncated body); a caching layer or wrong-bucket routing served stale/different content for the key; a misbehaving mock or in-memory backend aliasing/mutating the slice; the object was overwritten between write and read by another process using the same probe key (astronomically unlikely due to randomness).
Common situations: Testing a new MinIO/S3 deployment or proxy with a broken cache layer; a buggy custom Store implementation; hardware/storage corruption discovered during a live contract test (TestLiveMinioContract) or startup health check.
Understand the failure class
Background: Checksum mismatch errors: "checksum verification failed", "digest mismatch", "expected vs actual checksum" — what they mean and how to fix them — this error's family across 41 libraries.
Related errors
- objectstore: object exceeds read limit
- objectstore: object not found
- objectstore: production read/write/delete probe failed
- broken supersession history at
- cave_tool_result_recovery_mismatch
AI-assisted analysis of JuliusBrussee/caveman@3ee70a1026 (2026-09-20).
Data as JSON: /api/errors/b8fa3ccb2ef22ce7.
Report an issue: GitHub.
Appendix: source
Thrown at shared/platform/objectstore/objectstore.go:255
key := "_cave_health/" + base64.RawURLEncoding.EncodeToString(probe)
if err := store.Put(ctx, key, probe, "application/octet-stream"); err != nil {
return err
}
cleaned := false
defer func() {
if !cleaned {
// Keep health checks within their caller deadline. A failed probe may
// leave one random, tenant-free canary for lifecycle cleanup; readiness
// must never hang on an unbounded background delete.
_ = PurgeObject(ctx, store, key)
}
}()
got, err := store.Get(ctx, key)
if err != nil {
return err
}
if !bytes.Equal(got, probe) {
return errors.New("probe bytes did not round-trip")
}
if err := PurgeObject(ctx, store, key); err != nil {
return err
}
cleaned = true
exists, err := store.Exists(ctx, key)
if err != nil {
return err
}
if exists {
return errors.New("probe object still exists after purge")
}
return nil
}
func (m *minioStore) Put(ctx context.Context, key string, body []byte, contentType string) error {
if contentType == "" {
contentType = "application/octet-stream"View on GitHub (pinned to 3ee70a1026)