Project

General

Profile

Actions

Bug #78202

closed
KC YS

osd/scrubber: async scrub reservation GRANT always sends nonce 0, defeating the primary's staleness check

Bug #78202: osd/scrubber: async scrub reservation GRANT always sends nonce 0, defeating the primary's staleness check

Added by Kefu Chai 5 months ago. Updated 3 months ago.

Status:
Backporting
Priority:
Normal
Assignee:
Category:
Scrub/Repair
Target version:
-
Due date:
% Done:

0%

Source:
Backport:
squid, tentacle, umbrella
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Component(RADOS):
OSD
Pull request ID:
Tags (freeform):
Fixed In:
v21.3.0-1811-gc09a72cde6
Released In:
Upkeep Timestamp:
2026-08-27T18:44:26+00:00

Description

ReplicaActive::react(const ReserverGranted&) (src/osd/scrubber/
scrub_machine.cc) builds the GRANT from pending_reservation_nonce after
zeroing it two lines earlier:

pending_reservation_nonce = 0;  // no longer pending
auto grant_msg = make_message<MOSDScrubReserve>(
    ..., MOSDScrubReserve::GRANT, m_pg->pg_whoami, pending_reservation_nonce);

User impact: negligible in practice, which is why it went unnoticed. On the common path the grant is accepted regardless of nonce, so the bug is silent during normal scrubbing. It only matters in a race: a grant for a superseded
request arriving from the peer the primary is still waiting on is accepted as current, and the primary advances its reservation round on a stale ack. The worst effect is transient: a scrub proceeding on stale reservation state, or
momentarily exceeding osd_max_scrubs. No data-integrity, availability, or crash impact; scrub still validates data correctly, only reservation scheduling is affected, and only under the race.

Only the async path is affected (the default: wait_for_resources with osd_scrub_disable_reservation_queuing=false). The sync grant and the REJECT path already send m.reservation_nonce, so the fix matches them.


Related issues 3 (3 open — 0 closed)

Copied to RADOS - Backport #79101: squid: osd/scrubber: async scrub reservation GRANT always sends nonce 0, defeating the primary's staleness checkNewYuechi Sun

Actions
Copied to RADOS - Backport #79102: umbrella: osd/scrubber: async scrub reservation GRANT always sends nonce 0, defeating the primary's staleness checkNewYuechi Sun

Actions
Copied to RADOS - Backport #79103: tentacle: osd/scrubber: async scrub reservation GRANT always sends nonce 0, defeating the primary's staleness checkNewYuechi Sun

Actions

LF Updated by Laura Flores 5 months ago Actions #1

Sent to QA.

LF Updated by Laura Flores 4 months ago Actions #2

Added to a QA batch

KS Updated by Kamoltat (Junior) Sirivadhna 4 months ago Actions #3

bump up

RZ Updated by Radoslaw Zarzynski 4 months ago Actions #4

In QA.

RZ Updated by Radoslaw Zarzynski 4 months ago Actions #5

Still in QA.

UB Updated by Upkeep Bot 4 months ago Actions #6

  • Status changed from Fix Under Review to Pending Backport
  • Merge Commit set to c09a72cde6a3764bab1a4bf0fa2d3fcaaf445efd
  • Fixed In set to v21.3.0-1811-gc09a72cde6
  • Upkeep Timestamp set to 2026-08-06T01:48:45+00:00

UB Updated by Upkeep Bot 4 months ago Actions #7

  • Copied to Backport #79101: squid: osd/scrubber: async scrub reservation GRANT always sends nonce 0, defeating the primary's staleness check added

UB Updated by Upkeep Bot 4 months ago Actions #8

  • Copied to Backport #79102: umbrella: osd/scrubber: async scrub reservation GRANT always sends nonce 0, defeating the primary's staleness check added

UB Updated by Upkeep Bot 4 months ago Actions #9

  • Copied to Backport #79103: tentacle: osd/scrubber: async scrub reservation GRANT always sends nonce 0, defeating the primary's staleness check added

UB Updated by Upkeep Bot 4 months ago Actions #10

  • Tags (freeform) set to backport_processed

UB Updated by Upkeep Bot 3 months ago Actions #11

  • Status changed from Pending Backport to Backporting
  • Tags (freeform) deleted (backport_processed)
  • Upkeep Timestamp changed from 2026-08-06T01:48:45+00:00 to 2026-08-27T18:44:26+00:00
Actions

Also available in: PDF Atom