AlistGo/alist · error
[doubao_new] payload checksum mismatch: seq=%d start=%d end=
Error message
[doubao_new] payload checksum mismatch: seq=%d start=%d end=%d adler32=%s step2=%s
What it means
Second adler32 check in doubao_new: after appending the verified block into the shared groupBuf merge buffer, the hash of the appended slice (payloadStart..payloadEnd) no longer equals item.Checksum. Since the same bytes passed check 694 moments before, this fires when the buffer's memory was mutated concurrently or the slice bookkeeping is wrong.
Source
Thrown at drivers/doubao_new/driver.go:368
buf := make([]byte, int(item.Size))
n, err := tmpFile.ReadAt(buf, offset)
if err != nil && err != io.EOF && err != io.ErrUnexpectedEOF {
return nil, err
}
if n != len(buf) {
return nil, fmt.Errorf("[doubao_new] short read: seq=%d want=%d got=%d", item.Seq, len(buf), n)
}
buf = buf[:n]
realAdler := adler32String(buf)
if realAdler != item.Checksum {
return nil, fmt.Errorf("[doubao_new] block checksum mismatch: seq=%d offset=%d adler32=%s step2=%s", item.Seq, offset, realAdler, item.Checksum)
}
payloadStart := groupBuf.Len()
groupBuf.Write(buf)
payloadEnd := groupBuf.Len()
payloadAdler := adler32String(groupBuf.Bytes()[payloadStart:payloadEnd])
if payloadAdler != item.Checksum {
return nil, fmt.Errorf("[doubao_new] payload checksum mismatch: seq=%d start=%d end=%d adler32=%s step2=%s", item.Seq, payloadStart, payloadEnd, payloadAdler, item.Checksum)
}
groupSeqs = append(groupSeqs, item.Seq)
groupChecksums = append(groupChecksums, item.Checksum)
groupSizes = append(groupSizes, item.Size)
groupRealSize += int64(n)
groupExpectSum += item.Size
if len(groupSeqs) >= maxMergeBlockCount {
if err := flushGroup(); err != nil {
return nil, err
}
}
}
if err := flushGroup(); err != nil {
return nil, err
}
if up != nil {
up(100)View on GitHub (pinned to 843d9dc814)
Solutions
- Retry the upload — races are intermittent and usually pass
- Report upstream as a likely data race; include file size, block size, and whether parallel uploads were active
- Update to the latest doubao_new driver revision where buffer handling may be fixed
- As a workaround, disable concurrent upload tasks for this mount while uploading
- Run OpenList with the race detector enabled if you can reproduce locally to confirm the race
Defensive patterns
Strategy: validation
Validate before calling
// single-writer discipline for the merge buffer: only flushGroup touches groupBuf
// assert invariance cheaply before flush
if groupBuf.Len() != int(groupExpectSum) {
return fmt.Errorf("group buffer desynced: len=%d expect=%d", groupBuf.Len(), groupExpectSum)
} Try / catch
if err := flushGroup(); err != nil && strings.Contains(err.Error(), "payload checksum mismatch") {
// intermittent by nature (race); one retry is cheap, persistent failure is a bug report
return d.uploadPass(ctx, ...)
} Prevention
- Never append to groupBuf from multiple goroutines
- Serialize uploads to one mount when this error appears
- Report reproducible cases upstream — run with -race to confirm
When it happens
Trigger: Concurrent goroutines writing into groupBuf without synchronization, payloadStart/payloadEnd captured incorrectly after a buffer growth/copy, or (rare) a bug where buf was resliced between the two hash computations. This is essentially an internal-consistency assertion, not a network error.
Common situations: Almost always a driver bug report candidate: it indicates a data race or slice-aliasing issue in the group buffering logic, occasionally triggered by memory pressure or a changed adler32String implementation.
Related errors
- [doubao_new] block checksum mismatch: seq=%d offset=%d adler
- [doubao_new] merge blocks invalid body len: got=%d expect=%d
- upload part failed: crc32 mismatch, expected %s, got %s
- [doubao_new] merge blocks incomplete: %v
- [doubao_new] merge blocks missing seq %d
AI-assisted analysis of AlistGo/alist@843d9dc814 (2026-08-15).
Data as JSON: /api/errors/42ae192f7b530556.
Report an issue: GitHub.