Actions
Bug #82471
closed
AA
MW
osd: EC CALL op that yields reuses a PG log version taken meanwhile (PGLog.h:675, at_version >= projected_last_update)
Bug #82471:
osd: EC CALL op that yields reuses a PG log version taken meanwhile (PGLog.h:675, at_version >= projected_last_update)
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):
Merge Commit:
Fixed In:
v22.0.0-1390-g704adc496b
Released In:
Upkeep Timestamp:
2026-11-23T16:17:08+00:00
Description
On a pool with allow_ec_optimizations, PrimaryLogPG::do_op() runs an op that contains a CALL in a coroutine. execute_ctx() takes the op's PG log version (projected_last_update + 1) before it runs the ops. A cls read in the CALL (cls_cxx_read) is an EC sync read, and ECBackend::objects_read_sync() yields until the read completes; the PG lock is released, and the coroutine later resumes in the same execute_ctx() with the version it took before. While it waits, do_op() parks other client ops, but work that does not go through do_op() can take versions: the snap trimmer (trim_object), watch timeouts (handle_watch_timeout), ops whose async EC reads complete (OpContext::finish_read -> execute_ctx), and others. The CALL then submits a version that is already used and the primary aborts in issue_repop(): - after one interloping log entry (for example a watch timeout): PGLog.h: 675: FAILED ceph_assert(e.version > head) PGLog::IndexedLog::add <- PrimaryLogPG::issue_repop <- PrimaryLogPG::execute_ctx <- PrimaryLogPG::do_op_impl <- coroutine in PrimaryLogPG::do_op - after two or more (a snap trim writes two): PrimaryLogPG.cc: 11763: FAILED ceph_assert(ctx->at_version >= projected_last_update) RBD hits it when image metadata (header, object map) is in a FastEC pool: object map updates (rbd.object_map_update) are CALLs that read the object map. Reproduced on main (25b65002899) with a 3-OSD vstart cluster and RBD images in a k=2 m=1 FastEC pool: - rbd snap purge (snap trimming) while discarding: the at_version assert, 3 of 3 runs - no snapshots, 4k writes into thin images while killed rbd watch clients' header watches time out: PGLog.h:675 The same images with their metadata in a replicated pool did not abort. Example, osd.0 PG 6.3s0 at debug_osd 20: execute_ctx ...rbd_object_map.15d5626eb3a:head [call lock.assert_locked,call rbd.object_map_update] ov 137'4505 av 137'4508 (the CALL yields on its EC reads) handle_watch_timeout ... rbd_header.15d92fc41e8a:head append_log ... [137'4508 (137'39) modify 6:dd280d42:::rbd_header.15d92fc41e8a:head by unknown.0.0:0 ...] (the CALL resumes) new_repop rep_tid 40648 on osd_op(client.5966.0:1861 ...rbd_object_map.15d5626eb3a:head ...) PGLog.h: 675: FAILED ceph_assert(e.version > head)
Raised by Claude Code (https://claude.com/claude-code).
AA Updated by Alex Ainscow about 1 month ago
- Status changed from New to Fix Under Review
- Pull request ID set to 73326
BS Updated by Bill Scales 28 days ago
- Backport set to umbrella
LF Updated by Laura Flores 21 days ago
Added to a QA batch.
RZ Updated by Radoslaw Zarzynski 14 days ago
In QA.
UB Updated by Upkeep Bot 10 days ago
- Copied to Backport #83463: umbrella: osd: EC CALL op that yields reuses a PG log version taken meanwhile (PGLog.h:675, at_version >= projected_last_update) added
UB Updated by Upkeep Bot 10 days ago
- Status changed from Fix Under Review to Backporting
- Merge Commit set to 704adc496bd0b0b01362185c09b6cdc5051e74c6
- Fixed In set to v22.0.0-1390-g704adc496b
- Upkeep Timestamp set to 2026-11-23T16:17:08+00:00
Actions