Bug #77804
closedcrimson/osd: backfill can deadlock BackfillState::Waiting when throttle budget is exhausted
0%
Description
crimson/osd: backfill can deadlock BackfillState::Waiting when throttle budget is exhausted with no in flight objects.
During mClock testing I found an issue related to backfill getting permanently stuck.
Reproducer steps
1) Setup a cluster
MGR=1 MON=1 OSD=4 RGW=0 MDS=0 ../src/vstart.sh -n --crimson --seastore --without-dashboard --debug --crimson-smp 4
2) Configure below parameters
./bin/ceph config set osd crimson_osd_scheduler_concurrency 5
./bin/ceph config set osd osd_min_pg_log_entries 1
./bin/ceph config set osd osd_max_pg_log_entries 2
./bin/ceph config set osd osd_pg_log_trim_min 0
3) Create a small pool
./bin/ceph osd pool create test 128 128 replicated
4) Populate some data
./bin/rados -p test bench 600 write --block-size 4096 --no-cleanup -t 16
5) Stop osd.0
./bin/ceph osd out 0
./bin/ceph osd stop 0
6) Again try to populate data
./bin/rados -p test bench 600 write --block-size 4096 --no-cleanup -t 16
7) Mark osd.0 in and restart ceph-osd
./bin/ceph osd in 0
/bin/sh /mnt/moagrawa/ceph_upstream/ceph/src/ceph-run /mnt/moagrawa/ceph_upstream/ceph/build/bin/crimson-osd --debug -i 0 -c /mnt/moagrawa/ceph_upstream/ceph/build/ceph.conf -f
After some time, the backfill process gets stuck. After debugging further I found it was stuck in the
Waiting state at this point:
BackfillState::Enqueuing::Enqueuing: backfill budget unavailable, entering Waiting
After adding more logs in the related functions, I found that there were no objects in flight
(no pending push) at the moment the state transitioned to Waiting. Because of that, the backfill
state machine was never resumed. The state "Waiting" only exits via an ObjectPushed event which is fired
exclusively by the completion of an in-flight push (PGRecovery::enqueue_push). With nothing in flight, no such event is ever generated, so the PG remains stuck in backfilling indefinitely.
MA Updated by MOHIT AGRAWAL 5 months ago
- Status changed from New to Fix Under Review
- Pull request ID set to 69824
UB Updated by Upkeep Bot 4 months ago
- Status changed from Fix Under Review to Resolved
- Merge Commit set to 95a007b9a054a6d84f2f8903aee6803b9369840c
- Fixed In set to v21.3.0-1287-g95a007b9a0
- Upkeep Timestamp set to 2026-07-22T12:27:57+00:00