Project

General

Profile

Actions

Bug #68649

closed
PD AA

osd: ENOENT on clone suggests osd bug

Bug #68649: osd: ENOENT on clone suggests osd bug

Added by Patrick Donnelly about 2 years ago. Updated 21 days ago.

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

0%

Source:
Q/A
Backport:
umbrella,tentacle
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Component(RADOS):
Pull request ID:
Tags (freeform):
Fixed In:
v21.3.0-3159-gadf3339fa6
Released In:
Upkeep Timestamp:
2026-10-02T12:27:42+00:00

Description

https://pulpito.ceph.com/pdonnell-2024-10-19_04:01:03-fs-wip-pdonnell-testing-20241019.005706-debug-wip-pdonnell-i66704-default-smithi/7956018/

2024-10-19T05:22:28.630 INFO:tasks.ceph.osd.4.smithi161.stderr:2024-10-19T05:22:28.620+0000 7fad0c7a6640 -1 bluestore(/var/lib/ceph/osd/ceph-4) _txc_add_transaction error (2) No such file or directory not handled on operation 30 (op 0, counting from 0)
2024-10-19T05:22:28.630 INFO:tasks.ceph.osd.4.smithi161.stderr:2024-10-19T05:22:28.620+0000 7fad0c7a6640 -1 bluestore(/var/lib/ceph/osd/ceph-4) ENOENT on clone suggests osd bug
2024-10-19T05:22:28.640 INFO:tasks.ceph.osd.4.smithi161.stderr:/home/jenkins-build/build/workspace/ceph-dev-new-build/ARCH/x86_64/AVAILABLE_ARCH/x86_64/AVAILABLE_DIST/centos9/DIST/centos9/MACHINE_SIZE/gigantic/release/19.3.0-5701-ge1867c54/rpm/el9/BUILD/ceph-19.3.0-5701-ge1867c54/src/os/bluestore/BlueStore.cc: In function 'void BlueStore::_txc_add_transaction(BlueStore::TransContext*, ObjectStore::Transaction*)' thread 7fad0c7a6640 time 2024-10-19T05:22:28.633614+0000
2024-10-19T05:22:28.640 INFO:tasks.ceph.osd.4.smithi161.stderr:/home/jenkins-build/build/workspace/ceph-dev-new-build/ARCH/x86_64/AVAILABLE_ARCH/x86_64/AVAILABLE_DIST/centos9/DIST/centos9/MACHINE_SIZE/gigantic/release/19.3.0-5701-ge1867c54/rpm/el9/BUILD/ceph-19.3.0-5701-ge1867c54/src/os/bluestore/BlueStore.cc: 15864: ceph_abort_msg("unexpected error")
2024-10-19T05:22:28.640 INFO:tasks.ceph.osd.4.smithi161.stderr: ceph version 19.3.0-5701-ge1867c54 (e1867c54af7199208fbac40d7424efafffccd4db) squid (dev)
2024-10-19T05:22:28.640 INFO:tasks.ceph.osd.4.smithi161.stderr: 1: (ceph::__ceph_abort(char const*, int, char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)+0xbd) [0x562495ad0ba3]
2024-10-19T05:22:28.640 INFO:tasks.ceph.osd.4.smithi161.stderr: 2: (BlueStore::_txc_add_transaction(BlueStore::TransContext*, ceph::os::Transaction*)+0x1da1) [0x562495962339]
2024-10-19T05:22:28.640 INFO:tasks.ceph.osd.4.smithi161.stderr: 3: (BlueStore::queue_transactions(boost::intrusive_ptr<ObjectStore::CollectionImpl>&, std::vector<ceph::os::Transaction, std::allocator<ceph::os::Transaction> >&, boost::intrusive_ptr<TrackedOp>, ThreadPool::TPHandle*)+0x322) [0x562495962a80]
2024-10-19T05:22:28.641 INFO:tasks.ceph.osd.4.smithi161.stderr: 4: ceph-osd(+0x430a3c) [0x5624952eea3c]
2024-10-19T05:22:28.641 INFO:tasks.ceph.osd.4.smithi161.stderr: 5: (OSD::dispatch_context(PeeringCtx&, PG*, std::shared_ptr<OSDMap const>, ThreadPool::TPHandle*)+0x123) [0x56249535a8a5]
2024-10-19T05:22:28.641 INFO:tasks.ceph.osd.4.smithi161.stderr: 6: (OSD::dequeue_peering_evt(OSDShard*, PG*, std::shared_ptr<PGPeeringEvent>, ThreadPool::TPHandle&)+0x464) [0x5624953704f6]
2024-10-19T05:22:28.641 INFO:tasks.ceph.osd.4.smithi161.stderr: 7: (ceph::osd::scheduler::PGPeeringItem::run(OSD*, OSDShard*, boost::intrusive_ptr<PG>&, ThreadPool::TPHandle&)+0x50) [0x562495625396]
2024-10-19T05:22:28.641 INFO:tasks.ceph.osd.4.smithi161.stderr: 8: (OSD::ShardedOpWQ::_process(unsigned int, ceph::heartbeat_handle_d*)+0x332a) [0x56249538c9e2]
2024-10-19T05:22:28.641 INFO:tasks.ceph.osd.4.smithi161.stderr: 9: (ShardedThreadPool::shardedthreadpool_worker(unsigned int)+0x565) [0x562495aa85b5]
2024-10-19T05:22:28.641 INFO:tasks.ceph.osd.4.smithi161.stderr: 10: ceph-osd(+0xbea887) [0x562495aa8887]
2024-10-19T05:22:28.641 INFO:tasks.ceph.osd.4.smithi161.stderr: 11: (Thread::entry_wrapper()+0x45) [0x562495aa9bf9]
2024-10-19T05:22:28.641 INFO:tasks.ceph.osd.4.smithi161.stderr: 12: (Thread::_entry_func(void*)+0xd) [0x562495aa9c0f]
2024-10-19T05:22:28.641 INFO:tasks.ceph.osd.4.smithi161.stderr: 13: /lib64/libc.so.6(+0x89c52) [0x7fad2ee89c52]
2024-10-19T05:22:28.641 INFO:tasks.ceph.osd.4.smithi161.stderr: 14: /lib64/libc.so.6(+0x10ec80) [0x7fad2ef0ec80]
2024-10-19T05:22:28.641 INFO:tasks.ceph.osd.4.smithi161.stderr:*** Caught signal (Aborted) **
2024-10-19T05:22:28.641 INFO:tasks.ceph.osd.4.smithi161.stderr: in thread 7fad0c7a6640 thread_name:

See also: /teuthology/pdonnell-2024-10-19_04:01:03-fs-wip-pdonnell-testing-20241019.005706-debug-wip-pdonnell-i66704-default-smithi/7956018/remote/smithi161/log/ceph-osd.4.log.gz

The osd log signal dump is a mess.


Related issues 3 (2 open — 1 closed)

Related to Ceph - Bug #68691: common/log: thread names repeated and wrongResolvedPatrick Donnelly

Actions
Copied to RADOS - Backport #81318: umbrella: osd: ENOENT on clone suggests osd bugFix Under ReviewAlex Ainscow

Actions
Copied to RADOS - Backport #81319: tentacle: osd: ENOENT on clone suggests osd bugFix Under ReviewAlex Ainscow

Actions

PD Updated by Patrick Donnelly about 2 years ago Actions #1

  • Related to Bug #68691: common/log: thread names repeated and wrong added

LF Updated by Laura Flores about 2 years ago Actions #2

  • Project changed from RADOS to bluestore
  • Assignee set to Adam Kupczyk

Hey @Adam Kupczyk can you take a look at this if it's a problem with bluestore?

AK Updated by Adam Kupczyk over 1 year ago Actions #3

  • Status changed from New to Need More Info
  • Priority changed from High to Normal

AA Updated by Alex Ainscow 3 months ago Actions #4

This is a claude-generated, but carefully reviewed/verified explanation of the problem. This assumes a recent recreate is the same problem, but it seems very plausible, so I am going to use this tracker:

  1. Bug 68649 — Divergent-Rewind-then-Split on pg 3.2 / osd.11: Detailed Log Timeline

Cluster / build: ceph 21.3.0-1149-g14f2714d
Date of incident: 2026-07-18, ~01:12–01:14 UTC
PG: 3.2 (EC pool, k+m=14 shards), later split child 3.22
Actors: primary osd.12 (shard s0), recovering shard osd.11 (s11), log-source osd.13 (s2), sibling backfill target osd.15 (s1)
Log files analysed:
- `ceph-osd.12.log.gz` — the PRIMARY (osd.12)
- `ceph-osd.11.log.gz` — the recovering replica (osd.11)
- `ceph-osd.15.log.gz` — sibling shard that crashed first

Key versions: log tail 823'88; divergent entries 904'89 (`trial18849837-46:95`) and 904'90 (`trial18849837-46:head`); authoritative prior_versions 823'87 / 823'88.


  1. Timeline (epoch by epoch)
  1. Epoch 883 — osd.11 joins pg 3.2 as a BACKFILL target
    File: `ceph-osd.12.log.gz` / osd.12
    grep: `zgrep -a "choose_acting want=" ceph-osd.12.log.gz | grep 3.2s0`

```
2026-07-18T01:12:56.772+0000 7f2f5c4c1640 10 osd.12 pg_epoch: 884 pg[3.2s0( v 823'88 (823'88,823'88] local-lis/les=865/866 n=2 ec=32/32 lis/c=837/837 les/c/f=838/839/0 sis=883) [NONE,15,NONE,NONE,NONE,NONE,NONE,NONE,NONE,NONE,NONE,11,NONE,NONE]/[12,3,13,1,5,8,14,15,4,9,6,7,15,11]p12(0) backfill=[11(11),15(1)] r=0 lpr=883 pi=[837,883)/1 crt=823'88 lcod 375'41 mlcod 0'0 remapped+peering mbc={} ps=[1f~1,23~2,26~5,2d~5d,8c~1,8e~4,97~1]] PeeringState::choose_acting choose_acting want=[12,3,13,1,5,8,14,15,4,9,6,7,15,11] backfill_targets=11(11),15(1) async_recovery_targets=
```
Meaning: In the interval starting at epoch 883 the primary places osd.11 (position 11) and osd.15 (position 1) as backfill targets (not acting, not async-recovery). The authoritative log is empty/trimmed at tail=head=**823'88**.

On osd.11 the shard is a stray backfill target with an empty log at 823'88 and `last_backfill = MIN`:
File: `ceph-osd.11.log.gz` / osd.11
grep: `zgrep -a "3.2s11(" ceph-osd.11.log.gz | grep "lb MIN" | grep "pg_epoch: 900"`
```
2026-07-18T01:13:27.106+0000 7fbc63077640 10 osd.11 pg_epoch: 900 pg[3.2s11( v 823'88 (823'88,823'88] lb MIN local-lis/les=865/866 n=0 ec=32/32 lis/c=837/837 les/c/f=838/839/0 sis=883) [NONE,15,NONE,NONE,NONE,NONE,NONE,NONE,NONE,NONE,NONE,11,NONE,NONE]/[12,3,13,1,5,8,14,15,4,9,6,7,15,11]p12(0) r=-1 lpr=883 pi=[837,883)/1 pct=0'0 crt=823'88 lcod 0'0 active+remapped mbc={} ps=[1f~1,23~2,26~5,2d~5d,8c~1,8e~4,97~1]] PeeringState::activate_map
```
Meaning: osd.11 is a role `r=-1` stray, `lb MIN` (nothing backfilled yet), log empty at 823'88.


  1. Epochs 902–904 — recovery data pushed to osd.11 (MOSDPGPush)
    File: `ceph-osd.11.log.gz` / osd.11
    grep: `zgrep -a "MOSDPGPush(3.2s11" ceph-osd.11.log.gz | grep trial18849837-46`

```
2026-07-18T01:13:34.143+0000 7fbc62876640 10 osd.11 pg_epoch: 902 pg[3.2s11( v 823'88 (823'88,823'88] lb MIN ...] _handle_message: MOSDPGPush(3.2s11 902/883 [PushOp(3:45cfbf7e:::trial18849837-46:95, version: 823'87, data_included: [0~131072], ...),PushOp(3:45cfbf7e:::trial18849837-46:head, version: 823'88, data_included: [0~131072], ...)]) v4
```
Meaning: The primary streams the two objects to osd.11 as backfill pushes. Note the pushed object versions are the authoritative ones: `:95@823'87` and `:head@823'88` — the data osd.11 receives is the pre-divergence content.


  1. Epoch 904 (01:13:37.985) — backfill FINISHES, last_backfill → MAX
    File: `ceph-osd.11.log.gz` / osd.11
    grep: `zgrep -a "pg_backfill(finish 3.2s11" ceph-osd.11.log.gz`

```
2026-07-18T01:13:37.985+0000 7fbc63077640 10 osd.11 pg_epoch: 904 pg[3.2s11( v 823'88 (823'88,823'88] lb MIN ...] _handle_message: pg_backfill(finish 3.2s11 e 904/904 lb MAX) v3
2026-07-18T01:13:37.985+0000 7fbc63077640 20 osd.11 pg_epoch: 904 pg[3.2s11( v 823'88 (823'88,823'88] local-lis/les=865/866 n=0 ...] PeeringState::update_backfill_progress final 6815744 replaces local 12713984
2026-07-18T01:13:37.985+0000 7fbc63077640 10 osd.11 pg_epoch: 904 pg[3.2s11( v 823'88 (823'88,823'88] local-lis/les=865/866 n=2 ...] do_peering_event: epoch_sent: 904 epoch_requested: 904 RecoveryDone
```
Meaning: The primary declares backfill complete (`lb MAX`); the `lb` field disappears from the state string (== MAX), object count goes `n=0 → n=2`, and osd.11 fires `RecoveryDone`. osd.11 now holds a complete object copy but its log is still empty at 823'88.

⚠ TIMING WINDOW #1 — backfill-finish must land, yet the shard must still be a backfill target (`!is_acting`) when the next write arrives.
Backfill is declared done at 01:13:37.985 (epoch 904), but the interval change that promotes osd.11 into acting is epoch 905 (01:13:38.548) — ~0.56 s later. In that gap osd.11 is data-complete but still `r=-1` backfill. This is essential: the EC write that arrives next (below) is appended via the backfill/async roll-forward path because the shard is not yet acting. Had the write arrived a fraction later (already acting) it would have been a normal in-interval write and committed uniformly; had it arrived before `lb MAX` the object would not have existed to modify. The window is exactly this sub-second gap.


  1. Epoch 904 (01:13:38.288) — EC partial-write rolls osd.11 forward to 904'90
    File: `ceph-osd.11.log.gz` / osd.11
    grep: `zgrep -a "MOSDECSubOpWrite(3.2s11 904" ceph-osd.11.log.gz` and `zgrep -a "rolling forward because of backfill/async_recovery" ceph-osd.11.log.gz`

```
2026-07-18T01:13:38.288+0000 7fbc7cbfd640 1 -- ... <== osd.12 ... MOSDECSubOpWrite(3.2s11 904/883 ECSubWrite(tid=159, reqid=osd.12.0:159, at_version=904'90, trim_to=0'0, pg_committed_to=823'88)) ...
2026-07-18T01:13:38.288+0000 7fbc62876640 20 osd.11 pg_epoch: 904 pg[3.2s11( ...] handle_sub_write log_operation: log_entries.size=2 updated_hit_set_history=none trim_to=0'0 roll_forward_to=823'88 pg_committed_to=823'88 transaction_applied=1 async=0
2026-07-18T01:13:38.288+0000 7fbc62876640 10 osd.11 pg_epoch: 904 pg[3.2s11( v 823'88 (823'88,823'88] ...] PeeringState::append_log append_log log((823'88,823'88], crt=823'88) [904'89 (823'87) modify 3:45cfbf7e:::trial18849837-46:95 by unknown.0.0:0 2026-07-18T01:13:38.288679+0000 0 snaps [8a, 8b, 8d, 92, 94, 95] ObjectCleanRegions ...,904'90 (823'88) modify 3:45cfbf7e:::trial18849837-46:head by unknown.0.0:0 ...]
2026-07-18T01:13:38.288+0000 7fbc62876640 20 osd.11 pg_epoch: 904 pg[3.2s11( v 904'89 (823'88,904'89] ...] PeeringState::append_log append_log: rolling forward because of backfill/async_recovery, soid=3:45cfbf7e:::trial18849837-46:95 entry=904'89 (823'87) modify ...
2026-07-18T01:13:38.288+0000 7fbc62876640 20 osd.11 pg_epoch: 904 pg[3.2s11( v 904'90 (823'88,904'90] ...] PeeringState::append_log append_log: rolling forward because of backfill/async_recovery, soid=3:45cfbf7e:::trial18849837-46:head entry=904'90 (823'88) modify ...
```
Meaning: osd.12 sends an EC sub-op write at `at_version=904'90` carrying two log entries. Because osd.11 is a (data-complete) backfill target, `append_log` rolls forward both entries, advancing crt 823'88 → 904'89 → 904'90. osd.11's log is now `(823'88,904'90]`.

The two entries are recorded with EC `written_shards` sets. NOTE on encoding:
`pg_log_entry_t::is_written_shard(s)` returns `written_shards.empty() ||
written_shards.contains(s)` (osd_types.h) — so an empty `written_shards` set
means the entry is a FULL write to ALL shards
, and a non-empty set is a
partial write listing exactly the shards that participated:
grep: `zgrep -a "partial_write version=904" ceph-osd.11.log.gz`
```
2026-07-18T01:13:38.288+0000 7fbc62876640 20 osd.11 pg_epoch: 904 pg[3.2s11( v 904'89 (823'88,904'89] ...] partial_write version=904'89 written_shards={} ... previous_version=823'88
2026-07-18T01:13:38.288+0000 7fbc62876640 20 osd.11 pg_epoch: 904 pg[3.2s11( v 904'90 (823'88,904'90] ...] partial_write version=904'90 written_shards={0,8,9,10,11,12,13} ... previous_version=904'89
```
And the primary's own shard accounting confirms:
File: `ceph-osd.12.log.gz` / osd.12
grep: `zgrep -a "written_shards shard_info" ceph-osd.12.log.gz | grep trial18849837-46`
```
2026-07-18T01:13:38.288+0000 7f2f5c4c1640 20 osd.12 pg_epoch: 904 pg[3.2s0( ...] written_shards shard_info: oid=3:45cfbf7e:::trial18849837-46:95 version=904'89 written={} shard_versions={}
2026-07-18T01:13:38.288+0000 7f2f5c4c1640 20 osd.12 pg_epoch: 904 pg[3.2s0( ...] written_shards shard_info: oid=3:45cfbf7e:::trial18849837-46:head version=904'90 written={0,8,9,10,11,12,13} shard_versions={1=817'83,2=817'83,3=817'83,4=817'83,5=817'83,6=817'83,7=817'83}
```
Meaning: Entry 904'89 (`written_shards={}`) is a FULL write to all shards; entry 904'90 (`written_shards={0,8,9,10,11,12,13}`) is a partial write to those 7 shards (shards 1–7 lag at 817'83). Critically, `pg_committed_to` stays at 823'88 — although the writes are planned for those shards, they are in-flight / not yet committed, and the master-log source used at epoch 909 (osd.13, shard 2) has not applied them.

⚠ TIMING WINDOW #2 — the entries must be uncommitted yet already rolled forward on the target.
`pg_committed_to` stays at `823'88`, so neither entry has been declared committed; yet because osd.11 is a (data-complete) backfill target it rolls them forward into its log via the roll-forward path (crt → 904'90). The bug requires this mismatch: not yet committed cluster-wide, but present as a rolled-forward, non-rollbackable log entry on the recovering shard. If the writes had committed they would have survived as authoritative; if they had not been rolled forward, the target's log would stay clean.


  1. Epoch 905 (01:13:38.548 / 01:13:39.492) — new interval; osd.11 promoted backfill → FULL ACTING
    File: `ceph-osd.11.log.gz` / osd.11 — advance to 905:
    grep: `zgrep -a "handle_advance_map: 905" ceph-osd.11.log.gz | grep 3.2s11`
    ```
    2026-07-18T01:13:38.548+0000 7fbc63077640 10 osd.11 pg_epoch: 904 pg[3.2s11( v 904'90 (823'88,904'90] ... crt=904'90 ...] handle_advance_map: 905
    ```

File: `ceph-osd.12.log.gz` / osd.12 — the choose_acting decision:
grep: `zgrep -a "choose_async_recovery_ec result" ceph-osd.12.log.gz | grep "pg_epoch: 905"` and `zgrep -a "all_info osd.11(11)" ceph-osd.12.log.gz`
```
2026-07-18T01:13:39.492+0000 7f2f5ccc2640 10 osd.12 pg_epoch: 905 pg[3.2s0( v 904'90 (823'88,904'90] ...] PeeringState::choose_acting all_info osd.11(11) 3.2s11( v 904'90 (823'88,904'90] local-lis/les=865/866 n=2 ec=32/32 lis/c=865/883 les/c/f=866/904/0 sis=905)
2026-07-18T01:13:39.492+0000 7f2f5ccc2640 10 osd.12 pg_epoch: 905 pg[3.2s0( ...] PeeringState::choose_acting all_info osd.13(2) 3.2s2( v 823'88 (823'88,823'88] local-lis/les=883/884 n=2 ec=32/32 lis/c=837/837 les/c/f=838/839/0 sis=905)
2026-07-18T01:13:39.492+0000 7f2f5ccc2640 10 osd.12 pg_epoch: 905 pg[3.2s0( ...] PeeringState::find_best_info calc_acting prefer osd.12(0) because it is current primary
2026-07-18T01:13:39.492+0000 7f2f5ccc2640 20 osd.12 pg_epoch: 905 pg[3.2s0( ...] PeeringState::choose_async_recovery_ec result want=[12,15,13,1,5,8,14,15,4,9,6,11,15,11] async_recovery=
2026-07-18T01:13:39.492+0000 7f2f5ccc2640 10 osd.12 pg_epoch: 905 pg[3.2s0( ...] PeeringState::choose_acting choose_acting want=[12,15,13,1,5,8,14,15,4,9,6,11,15,11] backfill_targets= async_recovery_targets=
```
Meaning: In the new interval `sis=905`, osd.11(11) reports last_update 904'90 — matching the primary's 904'90. Because it is data-complete and log-current, `choose_async_recovery_ec` returns empty (`async_recovery=`), so osd.11 is placed into full acting at position 11 with no backfill and no async-recovery targets. Note osd.13(2) alone is behind at 823'88 (it never got the partials) — it becomes the master-log source next.

⚠ TIMING WINDOW #3 — osd.11 becomes acting-eligible precisely because it rolled the (doomed) partials forward.
osd.11 qualifies as a first-class acting shard only because its last_update (904'90) equals the authoritative max — which is true only because it rolled forward the very entries that are about to be declared divergent. Had the interval changed before the roll-forward, osd.11 would have stayed a backfill/async target and the entries would have been recovered normally instead of becoming stuck-divergent.


  1. Epoch 909 (01:13:45.337) — GetLog picks osd.13 (which LACKS the partials); authoritative log REWINDS 904'90 → 823'88
    File: `ceph-osd.12.log.gz` / osd.12
    grep: `zgrep -a "received master log from osd.13" ceph-osd.12.log.gz` and `zgrep -a "has written shards {} so is divergent" ceph-osd.12.log.gz`
    ```
    2026-07-18T01:13:45.336+0000 7f2f5ccc2640 10 osd.12 pg_epoch: 909 pg[3.2s0( v 904'90 (823'88,904'90] ...] state<Started/Primary/Peering/GetLog>: GetLog: received master log from osd.13(2)
    2026-07-18T01:13:45.337+0000 7f2f5ccc2640 10 osd.12 pg_epoch: 909 pg[3.2s0( v 904'90 (823'88,904'90] ...] PeeringState::proc_master_log proc_master_log for osd.13(2): log((823'88,823'88], crt=823'88) missing(0 may_include_deletes = 1)
    2026-07-18T01:13:45.337+0000 7f2f5ccc2640 10 osd.12 pg_epoch: 909 pg[3.2s0( v 904'90 (823'88,904'90] ...] PeeringState::proc_master_log entry 904'89 has written shards {} so is divergent
    2026-07-18T01:13:45.337+0000 7f2f5ccc2640 10 osd.12 pg_epoch: 909 pg[3.2s0( v 823'88 (823'88,823'88] ...] PeeringState::proc_master_log peer osd.13(2) now 3.2s2( v 823'88 (823'88,823'88] ... ) missing(0 may_include_deletes = 1)
    ```
    Meaning: GetLog adopts osd.13's log as master. osd.13 (shard 2) never applied the uncommitted entries, so its log ends at 823'88. In `proc_master_log`, while trying to wind the primary's log forward, entry 904'89 is a FULL write (`written_shards={}`), so `is_written_shard(from=osd.13/shard 2)` is true — shard 2 should have had this write but its master log does not reach it, so it is the first divergent entry (`has written shards {} so is divergent`, PeeringState.cc:3475). The primary's OWN authoritative log therefore rewinds from 904'90 back to (823'88,823'88] — visible in the state string flipping from `v 904'90 (823'88,904'90]` to `v 823'88 (823'88,823'88]`.

⚠ TIMING WINDOW #4 — the master-log source must be a shard that never applied the uncommitted entries.
GetLog selected osd.13(2), whose log stopped at 823'88 (it never applied the in-flight 904'89/904'90). Because 904'89 is a full write that shard 2 was expected to hold, `proc_master_log` flags it divergent and the authoritative log rewinds to 823'88. If instead a shard that had applied 904'90 had been chosen as master, the authoritative log would have kept 904'90 and osd.11 would have matched it (no rewind).


  1. Epoch 909 (01:13:45.538) — proc_replica_log rewinds osd.11 to 823'88 with missing(2)
    File: `ceph-osd.12.log.gz` / osd.12
    grep: `zgrep -a "proc_replica_log for osd.11" ceph-osd.12.log.gz` and `zgrep -a "peer osd.11(11) now" ceph-osd.12.log.gz`
    ```
    2026-07-18T01:13:45.538+0000 7f2f5ccc2640 10 osd.12 pg_epoch: 909 pg[3.2s0( v 823'88 (823'88,823'88] ...] PeeringState::proc_replica_log proc_replica_log for osd.11(11): 3.2s11( v 904'90 (823'88,904'90] local-lis/les=865/866 n=2 ec=32/32 lis/c=883/883 les/c/f=884/904/0 sis=905) log((823'88,904'90], crt=904'90) missing(0 may_include_deletes = 1)
    ```
    Divergent-entry merge for the two objects:
    grep: `zgrep -a "_merge_object_divergent_entries" ceph-osd.12.log.gz | grep trial18849837-46`
    ```
    2026-07-18T01:13:45.538+0000 7f2f5ccc2640 10 _merge_object_divergent_entries: hoid 3:45cfbf7e:::trial18849837-46:95 must be rolled back or recovered, attempting to rollback
    2026-07-18T01:13:45.538+0000 7f2f5ccc2640 10 _merge_object_divergent_entries: hoid 3:45cfbf7e:::trial18849837-46:95 cannot roll back, removing and adding to missing
    2026-07-18T01:13:45.538+0000 7f2f5ccc2640 10 _merge_object_divergent_entries: hoid 3:45cfbf7e:::trial18849837-46:95 prior_version 823'87 <= info.log_tail 823'88
    2026-07-18T01:13:45.538+0000 7f2f5ccc2640 10 _merge_object_divergent_entries: hoid 3:45cfbf7e:::trial18849837-46:head cannot roll back, removing and adding to missing
    2026-07-18T01:13:45.538+0000 7f2f5ccc2640 10 _merge_object_divergent_entries: hoid 3:45cfbf7e:::trial18849837-46:head prior_version 823'88 <= info.log_tail 823'88
    ```
    Result:
    ```
    2026-07-18T01:13:45.538+0000 7f2f5ccc2640 10 peer osd.11(11) last_update now 823'88
    2026-07-18T01:13:45.538+0000 7f2f5ccc2640 10 osd.12 pg_epoch: 909 pg[3.2s0( v 823'88 (823'88,823'88] ...] PeeringState::proc_replica_log peer osd.11(11) now 3.2s11( v 823'88 lc 0'0 (823'88,823'88] local-lis/les=865/866 n=2 ec=32/32 lis/c=883/883 les/c/f=884/904/0 sis=905) missing(2 may_include_deletes = 1)
    ```
    Meaning: osd.11's log entries 904'89/904'90 are divergent; their prior_versions (823'87, 823'88) are `<= log_tail 823'88`, so they cannot roll back and are removed and added to missing. osd.11 is rewound to last_update=823'88, last_complete=0'0, missing(2).

Confirmed on osd.11's own side:
File: `ceph-osd.11.log.gz` / osd.11
grep: `zgrep -a "activate - not complete" ceph-osd.11.log.gz | grep 3.2s11`
```
2026-07-18T01:13:45.661+0000 7fbc62876640 10 osd.11 pg_epoch: 909 pg[3.2s11( v 823'88 (823'88,823'88] local-lis/les=905/909 n=2 ec=32/32 lis/c=883/883 les/c/f=884/904/0 sis=905) [NONE,15,NONE,NONE,NONE,NONE,NONE,NONE,NONE,NONE,NONE,11,NONE,NONE]/[12,15,13,1,5,8,14,15,4,9,6,11,15,11]p12(0) r=11 lpr=905 pi=[883,905)/1 crt=823'88 lcod 904'90 remapped m=2 mbc={} ps=[1f~1,23~2,26~5,2d~5d,8c~1,8e~4,97~1]] PeeringState::activate activate - not complete, missing(2 may_include_deletes = 1)
```
Meaning: osd.11 accepts the rewound state: empty log at 823'88, `m=2`.


  1. Epoch 913 (01:13:53.976) — pg_num split 3.2 → child 3.22 (before the 2 missing objects are recovered)
    File: `ceph-osd.11.log.gz` / osd.11
    grep: `zgrep -a "split_into split_bits" ceph-osd.11.log.gz | grep 3.2s11`
    ```
    2026-07-18T01:13:53.976+0000 7fbc62876640 10 osd.11 pg_epoch: 913 pg[3.2s11( v 823'88 (823'88,823'88] local-lis/les=905/909 n=2 ec=32/32 lis/c=905/883 les/c/f=909/904/0 sis=913 pruub=12.580278397s) [NONE,15,NONE,NONE,NONE,NONE,NONE,NONE,NONE,NONE,NONE,11,NONE,NONE]/[12,15,13,1,5,8,14,15,4,9,6,11,15,11]p12(0) r=11 lpr=913 pi=[883,913)/2 crt=823'88 lcod 904'90 remapped NOTIFY pruub 1295.703979492s@ m=2 mbc={} ps=[1f~1,23~2,26~5,2d~5d,8c~1,8e~4,97~1]] split_into split_bits 6
    ```
    Meaning: The parent pg 3.2 splits (pg_num up) into child 3.22 while still carrying `m=2`. The child inherits the parent's rewound state.

⚠ TIMING WINDOW #5 — the split must occur BEFORE the 2 missing objects are recovered.
osd.11 entered epoch 909 with `missing(2)` and had not yet re-fetched the two objects when the split at epoch 913 fired. The split hands the child a pg whose `last_complete last_update 823'88` with `missing(2)` baked in. If recovery had completed first, missing would be empty and the child would be clean.


  1. Epoch 916 (01:13:57.803) — child 3.22 GetMissing fast-path falsely marks osd.11 up-to-date
    File: `ceph-osd.12.log.gz` / osd.12
    grep: `zgrep -a "has no missing, identical log" ceph-osd.12.log.gz | grep 3.22 | grep "osd.11(11)"`
    ```
    2026-07-18T01:13:57.803+0000 7f2f5c4c1640 10 osd.12 pg_epoch: 916 pg[3.22s0( v 823'88 (823'88,823'88] local-lis/les=905/909 n=1 ec=913/32 lis/c=905/883 les/c/f=909/904/0 sis=916) [NONE,15,NONE,NONE,NONE,NONE,NONE,NONE,NONE,NONE,NONE,11,NONE,NONE]/[12,15,13,1,5,8,14,15,4,9,6,11,15,11]p12(0) r=0 lpr=916 pi=[883,916)/2 crt=823'88 lcod 0'0 mlcod 0'0 remapped+peering mbc={} ps=[1f~1,23~2,26~5,2d~5d,8c~1,8e~4,97~1]] state<Started/Primary/Peering/GetMissing>: osd.11(11) has no missing, identical log
    ```
    And activation treats it as clean:
    grep: `zgrep -a "is up to date, queueing in pending_activators" ceph-osd.12.log.gz | grep 3.22 | grep "osd.11(11)"`
    ```
    2026-07-18T01:13:58.069+0000 7f2f5ccc2640 10 osd.12 pg_epoch: 917 pg[3.22s0( v 823'88 (823'88,823'88] ...] PeeringState::activate activate peer osd.11(11) is up to date, queueing in pending_activators
    ```
    Meaning: In the child pg the GetMissing fast-path sees the child's log is byte-identical to the primary's (both empty at 823'88) and concludes osd.11 "has no missing, identical log / up to date" — erasing the knowledge of the 2 missing objects. This is the core bug.

⚠ TIMING WINDOW #6 — the identical-log fast-path fires on the child.
Because the child's log is empty (tail==head==823'88) and identical to the primary's empty log, GetMissing takes the "identical log ⇒ no missing" shortcut, even though the pre-split `proc_master_log` for the same shard had reported `missing(2)`. The child is activated with the two objects silently absent.


  1. Epoch 922 (01:14:05.173) — proc_master_log on the child still knows missing(2) (contradiction)
    File: `ceph-osd.12.log.gz` / osd.12
    grep: `zgrep -a "proc_master_log for osd.11(11)" ceph-osd.12.log.gz | grep 3.22`
    ```
    2026-07-18T01:14:05.173+0000 7f2f5c4c1640 10 osd.12 pg_epoch: 922 pg[3.22s0( v 919'90 (823'88,919'90] ...] PeeringState::proc_master_log proc_master_log for osd.11(11): log((823'88,823'88], crt=823'88) missing(2 may_include_deletes = 1)
    2026-07-18T01:14:05.173+0000 7f2f5c4c1640 10 osd.12 pg_epoch: 922 pg[3.22s0( v 919'90 (823'88,919'90] ...] PeeringState::proc_master_log entry 919'89 has written shards {} so is divergent
    2026-07-18T01:14:05.173+0000 7f2f5c4c1640 10 osd.12 pg_epoch: 922 pg[3.22s0( v 823'88 (823'88,823'88] ...] PeeringState::proc_master_log peer osd.11(11) now 3.22s11( v 823'88 (823'88,823'88] ...) missing(2 may_include_deletes = 1)
    ```
    Meaning: A later peering pass on the child re-derives `missing(2)` for osd.11 — but the object copies were already lost/never fetched, so subsequent client I/O (a snap/clone modify) references a clone that does not exist on disk → the BlueStore transaction hits ENOENT.

  1. Crash 1 — osd.15 (01:14:01.239) — ENOENT on clone `:95` in BlueStore
    File: `ceph-osd.15.log.gz` / osd.15
    grep: `zgrep -a "_txc_add_transaction op 14 got ENOENT on 1#3:45cfbf7e:::trial18849837-46:95" ceph-osd.15.log.gz`
    ```
    2026-07-18T01:14:01.239+0000 7f53f6156640 10 bluestore(/var/lib/ceph/osd/ceph-15) _txc_add_transaction op 14 got ENOENT on 1#3:45cfbf7e:::trial18849837-46:95#
    2026-07-18T01:14:01.239+0000 7f53f6156640 -1 bluestore(/var/lib/ceph/osd/ceph-15) _txc_add_transaction error (2) No such file or directory not handled on operation 14 (op 0, counting from 0)
    2026-07-18T01:14:01.241+0000 7f53f6156640 -1 /ceph/rpmbuild/BUILD/ceph-21.3.0-1149-g14f2714d/src/os/bluestore/BlueStore.cc: In function 'void BlueStore::_txc_add_transaction(TransContext*, ObjectStore::Transaction*)' thread 7f53f6156640 time 2026-07-18T01:14:01.240446+0000
    ```
    Meaning: osd.15 (the sibling backfill target, also rewound with missing) applies a transaction that clones/modifies `trial18849837-46:95`, but the object is absent on disk → unhandled ENOENT → assert/crash.
  1. Crash 2 — osd.11 (01:14:52.113) — ENOENT on `:head` in BlueStore
    File: `ceph-osd.11.log.gz` / osd.11
    grep: `zgrep -a "_txc_add_transaction op 17 got ENOENT on b#3:45cfbf7e:::trial18849837-46:head" ceph-osd.11.log.gz`
    ```
    2026-07-18T01:14:52.113+0000 7fbc63077640 10 bluestore(/var/lib/ceph/osd/ceph-11) _txc_add_transaction op 17 got ENOENT on b#3:45cfbf7e:::trial18849837-46:head#
    2026-07-18T01:14:52.113+0000 7fbc63077640 -1 bluestore(/var/lib/ceph/osd/ceph-11) _txc_add_transaction error (2) No such file or directory not handled on operation 17 (op 0, counting from 0)
    ```
    Meaning: osd.11 — falsely activated as up-to-date in child 3.22 — later applies a transaction touching `trial18849837-46:head`, which it never actually holds (it was in missing(2)) → unhandled ENOENT → crash. This is the fatal manifestation of bug 68649.

  1. Summary of the causal chain

1. Epoch 883: osd.11 joins pg 3.2 as a backfill target; authoritative log tail=head=**823'88** (fully trimmed).
2. Epochs 902–904: primary pushes objects `:95@823'87` and `:head@823'88` to osd.11 (backfill data).
3. Epoch 904 (01:13:37.985): backfill finishes (`lb MAX`, `RecoveryDone`); osd.11 is data-complete but log still empty at 823'88, still `r=-1` backfill.
4. Epoch 904 (01:13:38.288): an EC sub-op write (`at_version=904'90`, `pg_committed_to=823'88`) arrives - entry 904'89 a FULL write (`written_shards={}` = all shards), entry 904'90 a partial write to `{0,8,9,10,11,12,13}`; because the shard is a backfill target, `append_log` rolls both forward, advancing osd.11's log to (823'88,904'90]. Both remain uncommitted (`pg_committed_to` stays 823'88).
5. Epoch 905: new interval; osd.11's last_update 904'90 matches the auth max, so `choose_async_recovery_ec` finds nothing to recover → osd.11 is placed into full acting.
6. Epoch 909: GetLog selects osd.13 (shard 2, which never applied the uncommitted entries, log at 823'88) as master; because 904'89 is a full write shard 2 should have held, `proc_master_log` flags it divergent (`has written shards {} so is divergent`) and rewinds the authoritative log to 823'88, and `proc_replica_log` rewinds osd.11 to last_update=823'88, last_complete=0'0, missing(2) (the two entries cannot roll back: prior_version ≤ log_tail).
7. Epoch 913: pg_num split 3.2 → 3.22 before the 2 missing objects are recovered; child inherits `last_complete==last_update==823'88` with missing(2).
8. Epoch 916: child's GetMissing identical-log fast-path declares osd.11 "has no missing, identical log / up to date" — losing the missing(2) record.
9. Epochs 922+: subsequent client/clone I/O references the never-recovered objects; BlueStore hits unhandled ENOENT → osd.15 crashes (01:14:01, clone `:95`) and osd.11 crashes (01:14:52, `:head`).

  1. Summary of timing windows

- ⚠ #1 — backfill-finish vs interval change (~0.56 s gap, epoch 904→905): osd.11 must be data-complete (`lb MAX`) yet still a backfill target (`!is_acting`) when the 904'90 write arrives, so it takes the roll-forward path.
- ⚠ #2 — entries uncommitted but rolled forward: 904'89 (`written_shards={}` = full write) and 904'90 (partial write to `{0,8,9,10,11,12,13}`) stay uncommitted (`pg_committed_to=823'88`) yet are rolled forward into the target's log (non-rollbackable).
- ⚠ #3 — acting-eligibility via the doomed entries: osd.11 becomes a full acting member only because rolling those entries forward made its last_update equal the authoritative max.
- ⚠ #4 — master-log source lacks the partials: GetLog at 909 picks osd.13 (log at 823'88), triggering the authoritative rewind; a 904'90-holding source would have avoided it.
- ⚠ #5 — split before recovery: the pg_num split (913) lands while osd.11 still has `missing(2)`, baking the missing objects into the child.
- ⚠ #6 — identical-log fast-path on the child: the child's empty log matches the primary's, so GetMissing shortcuts to "no missing," erasing the missing(2) and allowing activation → later ENOENT crash.


  1. Mapping to the unit-test reproduction (ECPeeringTestFixture)

`TestECFailoverWithPeering.DivergentLogRewindThenSplit` drives the same real
peering/EC code paths (`append_log` roll-forward, `proc_replica_log`,
`rewind_divergent_log`, `PeeringState::split_into`, `GetMissing`). It is fully
organic — nothing about the bug state is hand-set. The only harness extensions
are opt-in plumbing that is a no-op for every other test.

Real system (log) Harness reproduction
--- ---
Aggressive log trimming to tail T=823'88 opt-in `enable_log_trimming` + `set_target_pg_log_entries(1)` + `CEPH_OSDMAP_PGLOG_HARDLIMIT`; the write path calls `update_trim_to()` / `complete_write()` like `PrimaryLogPG`, so real trimming occurs
osd.11 is a backfill target (`!is_acting`) that finished its data backfill (`lb MAX`) but was not yet promoted (window #1) the harness models no backfill data movement, so the target is instead made an async-recovery target — the other organic `!is_acting` role (`lb==MAX` + one missing "trigger" object, `osd_async_recovery_min_cost=0`). Same `append_log` roll-forward path; nothing faked.
EC entries rolled forward while uncommitted (window #2) blocked write (`suspend_primary_to_osd`) applied to the `!is_acting` target → real `append_log` roll-forward (crt → head)
`last_complete` climbs to head while `!is_acting` recover the pre-existing "trigger" missing via the real log-based recovery path
promotion to acting because `last_update` matches (window #3) interval change (`mark_osd_down`) after the roll-forward
GetLog master lacks the uncommitted entries → authoritative rewind; `proc_replica_log` → `missing(2)`, `last_complete==last_update` (window #4) same interval change; `rewind_divergent_log` clamps `last_complete` to the tail
split before recovery (window #5) `split_pg()` runs the real `PeeringState::split_into` while the target still has `missing(2)`; objects hashed into the child via `set_object_hash()`
GetMissing identical-log fast-path clears missing (window #6) real child peering
PrimaryLogPG would clone the missing object → ENOENT (the safeguard is in PrimaryLogPG, not EC/peering/BlueStore) no PrimaryLogPG exists, so the test evaluates its exact gate — `is_degraded_or_backfilling_object(head)` (PrimaryLogPG.cc:655) — against the child primary's peering state and asserts it would block the clone. Fails without the `reset_complete_to` fix.

AA Updated by Alex Ainscow 3 months ago Actions #5

  • Project changed from bluestore to RADOS

LF Updated by Laura Flores 3 months ago Actions #6

@aainscow did this happen in a teuthology job? If so, can you link the job?

AA Updated by Alex Ainscow 3 months ago Actions #7

  • Pull request ID set to 71525

LF Updated by Laura Flores 3 months ago Actions #8

  • Status changed from Need More Info to Fix Under Review

LF Updated by Laura Flores 3 months ago Actions #9

  • Status changed from Fix Under Review to Pending Backport

@Alex Ainscow should this be backported to at least tentacle given the target version? If so, let's update the backport fields.

LF Updated by Laura Flores 3 months ago Actions #10

  • Assignee changed from Adam Kupczyk to Alex Ainscow

UB Updated by Upkeep Bot 3 months ago Actions #11

  • Status changed from Pending Backport to Resolved
  • Merge Commit set to adf3339fa601e191b40b92ba112f3d4175377dd6
  • Fixed In set to v21.3.0-3159-gadf3339fa6
  • Upkeep Timestamp set to 2026-09-16T00:44:53+00:00

AA Updated by Alex Ainscow 2 months ago Actions #12

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

UB Updated by Upkeep Bot 2 months ago Actions #13

  • Copied to Backport #81318: umbrella: osd: ENOENT on clone suggests osd bug added

UB Updated by Upkeep Bot 2 months ago Actions #14

  • Copied to Backport #81319: tentacle: osd: ENOENT on clone suggests osd bug added

UB Updated by Upkeep Bot 2 months ago Actions #15

  • Status changed from Pending Backport to Backporting
  • Upkeep Timestamp changed from 2026-09-16T00:44:53+00:00 to 2026-10-02T12:27:42+00:00

AA Updated by Alex Ainscow 21 days ago Actions #16

/a/aainscow-2026-11-11_22:19:05-rados-wip-aainscow-stretch-poolmig-main-261111c-distro-default-gibba/749278

Actions

Also available in: PDF Atom