Project

General

Profile

Actions

Bug #69788

closed
MA MA

The background recovery is not showing any progress for crimson while crimson_osd_scheduler_concurrency is set

Bug #69788: The background recovery is not showing any progress for crimson while crimson_osd_scheduler_concurrency is set

Added by MOHIT AGRAWAL almost 2 years ago. Updated about 1 year ago.

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

0%

Source:
Backport:
Regression:
No
Severity:
2 - major
Reviewed:
Affected Versions:
ceph-qa-suite:
Pull request ID:
Tags (freeform):
Fixed In:
v20.0.0-164-g5579c10fde
Released In:
v20.2.0~923
Upkeep Timestamp:
2025-11-01T01:14:40+00:00

Description

The background recovery is not showing any progress for crimson when
crimson_osd_scheduler_concurrency is set more than 0. By default the
value of this parameter is 0.

MA Updated by MOHIT AGRAWAL almost 2 years ago Actions #1

Follow the steps to reproduce the same

1) Setup a crimson cluster on latest main branch 
  MGR=1 MON=1 OSD=3 MDS=0 ../src/vstart.sh -n --bluestore --crimson --crimson-smp 4 --without-dashboard --debug
2) Set crimson_osd_scheduler_concurrency for all osd to 5  
  ./bin/ceph config set osd.0 crimson_osd_scheduler_concurrency 5
  ./bin/ceph config set osd.1 crimson_osd_scheduler_concurrency 5
  ./bin/ceph config set osd.2 crimson_osd_scheduler_concurrency 5
3) Create a small pool  
   ./bin/ceph osd pool create test 4 4 replicated
4) Populate some data
   ./bin/rados -c /nvme0/ceph/build/ceph.conf -p test bench -b 4096 10 write --concurrent-ios 8 --no-cleanup
5) stop osd.0
   ./bin/ceph osd out 0
   ./bin/ceph osd stop 0
6) Then again populate some data
   ./bin/rados -c /nvme0/ceph/build/ceph.conf -p test bench -b 4096 10 write --concurrent-ios 8 --no-cleanup
7) mark osd.0 to in
   ./bin/ceph osd in 0
8) Start the osd.0 again manually
   /bin/sh /nvme0/ceph/src/ceph-run /nvme0/ceph/build/bin/crimson-osd --debug -i 0 -c /nvme0/ceph/build/ceph.conf -f          
9) Run ./bin/ceph -s to see the recovery progress

After checking the logs i have found below logs the recovery was not progress.

^[[32mDEBUG^[[0m 2025-02-04 18:35:54,075 [shard 1:main] osd - 0x0  pg_epoch 30 pg[2.3( v 25'7622 (0'0,25'7622] local-lis/les=29/30 n=7622 ec=18/18 lis/c=29/22 les/c/f=30/23/0 sis=29) [1,2,0]/[1,2] async=[0] r=0 lpr=29 pi=[22,29)/1 crt=25'7622 mlcod 0'0 active+recovering+undersized+degraded+remapped  BackgroundRecoveryT<T>::start: background_recovery(id=16780901, detail=BackgroundRecovery(2.3)): start
^[[32mDEBUG^[[0m 2025-02-04 18:35:54,076 [shard 1:main] osd - peering_event(id=19545, detail=PeeringEvent(from=2 pgid=2.3 sent=30 requested=30 evt=epoch_sent: 30 epoch_requested: 30 RemoteRecoveryReserved)): exit

After put more logs in source code i have found actual recovery was not progressed because acquire_throotle was not able to return a future because future depends on the the set_value set by wake() and it was not triggered because the condition was not fullfilled.


seastar::future<> OperationThrottler::acquire_throttle(
  crimson::osd::scheduler::params_t params)
{
  crimson::osd::scheduler::item_t item{params, seastar::promise<>()};
  auto fut = item.wake.get_future();
  scheduler->enqueue(std::move(item));
  return fut;
}

It is a kind of circular dependecy case where acquire_throttle depends on the wake and wake is
call by release_throttle and it was not calling by with_throttle because acquire_throttles was
not returned.

MA Updated by MOHIT AGRAWAL almost 2 years ago Actions #2

  • Status changed from New to Fix Under Review
  • Pull request ID set to 61647

MB Updated by Matan Breizman over 1 year ago Actions #3

  • Status changed from Fix Under Review to Resolved

UB Updated by Upkeep Bot over 1 year ago Actions #4

  • Merge Commit set to 5579c10fde3417e1630b9b27a71af09d08613f9d
  • Fixed In set to v20.0.0-164-g5579c10fde3
  • Upkeep Timestamp set to 2025-07-09T22:40:49+00:00

UB Updated by Upkeep Bot over 1 year ago Actions #5

  • Fixed In changed from v20.0.0-164-g5579c10fde3 to v20.0.0-164-g5579c10fde
  • Upkeep Timestamp changed from 2025-07-09T22:40:49+00:00 to 2025-07-14T19:37:20+00:00

UB Updated by Upkeep Bot about 1 year ago Actions #6

  • Released In set to v20.2.0~923
  • Upkeep Timestamp changed from 2025-07-14T19:37:20+00:00 to 2025-11-01T01:14:40+00:00
Actions

Also available in: PDF Atom