Project

General

Profile

Actions

Bug #78329

closed
AA JB

Potential corruption on read if Replica Split Ops is enabled

Bug #78329: Potential corruption on read if Replica Split Ops is enabled

Added by Alex Ainscow 5 months ago. Updated 2 months ago.

Status:
Backporting
Priority:
Normal
Category:
-
Target version:
-
Due date:
% Done:

0%

Source:
Backport:
umbrella
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Component(RADOS):
Pull request ID:
Tags (freeform):
Fixed In:
v21.3.0-3729-g713255da90
Released In:
Upkeep Timestamp:
2026-09-29T12:31:09+00:00

Description

Bug 1 — Out-of-order reassembly with wrapped replica window

Chunks are distributed starting from a randomly selected replica, but are reassembled in ascending acting-index order. When the starting replica is not index 0, the distribution window wraps around the replica list. Because reassembly does not account for this wrap, chunks are stitched together in the wrong order, silently returning corrupted data to the caller.

Bug 2 — Buffer aliasing from rounded-down chunk size

The per-replica chunk size is computed by rounding down (integer division). Under certain object-size / replica-count combinations this causes one extra chunk to be emitted, and that extra chunk reuses the same underlying buffer as an adjacent sub-read. The result is a silent double-use of the same buffer, producing corrupted read data.

Bug 3 — Divide-by-zero + std::out_of_range thrown from destructor → std::terminate

A multi-op request need only contain one op that meets the minimum split size threshold for ReplicaSplitOp to be applied to the entire request. Any op in that request whose size falls below the minimum is handed a chunk size of zero, triggering a divide-by-zero. The resulting exception (std::out_of_range) propagates from a destructor, which is undefined behaviour and in practice calls std::terminate, killing the client process.


Related issues 2 (1 open — 1 closed)

Related to RADOS - Bug #78645: umbrella: unconditionally disable split reads for replica poolsResolvedCallum James

Actions
Copied to RADOS - Backport #81116: umbrella: Potential corruption on read if Replica Split Ops is enabledIn ProgressJonathan Bailey

Actions

LF Updated by Laura Flores 4 months ago Actions #1

@Alex Ainscow are you working on this?

RZ Updated by Radoslaw Zarzynski 4 months ago Actions #2

  • Related to Bug #78645: umbrella: unconditionally disable split reads for replica pools added

LF Updated by Laura Flores 4 months ago Actions #3

LF Updated by Laura Flores 4 months ago Actions #4

Bump up

RZ Updated by Radoslaw Zarzynski 4 months ago Actions #5

Bump up.

LF Updated by Laura Flores 3 months ago Actions #6

Bump up

AA Updated by Alex Ainscow 3 months ago Actions #7

  • Pull request ID set to 70207

Apologies for the lack of updates, but we have been working on this.

The fix is 70207 - now associated with tracker.

We have been working on improvements to teuthology, so that we will not miss similar problems in the future - this has taken a little while. We are about ready to merge the fix.

KC Updated by Kefu Chai 2 months ago Actions #8

  • Status changed from New to Pending Backport

UB Updated by Upkeep Bot 2 months ago Actions #9

  • Status changed from Pending Backport to Resolved
  • Merge Commit set to 713255da9056cb4d34392a44128b0179ddc9a1c3
  • Fixed In set to v21.3.0-3729-g713255da90
  • Upkeep Timestamp set to 2026-09-29T05:09:32+00:00

AA Updated by Alex Ainscow 2 months ago Actions #10

  • Status changed from Resolved to Pending Backport
  • Backport set to umbrella

AA Updated by Alex Ainscow 2 months ago Actions #11

  • Assignee set to Alex Ainscow

UB Updated by Upkeep Bot 2 months ago Actions #12

  • Copied to Backport #81116: umbrella: Potential corruption on read if Replica Split Ops is enabled added

UB Updated by Upkeep Bot 2 months ago Actions #13

  • Status changed from Pending Backport to Backporting
  • Upkeep Timestamp changed from 2026-09-29T05:09:32+00:00 to 2026-09-29T12:31:09+00:00

JB Updated by Jonathan Bailey 2 months ago Actions #14

  • Assignee changed from Alex Ainscow to Jonathan Bailey
Actions

Also available in: PDF Atom