]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
osd: Fix memory leak of ECDummyOp 66961/head
authorAlex Ainscow <aainscow@uk.ibm.com>
Sun, 18 Jan 2026 22:13:54 +0000 (22:13 +0000)
committerAlex Ainscow <aainscow@uk.ibm.com>
Sun, 18 Jan 2026 22:25:23 +0000 (22:25 +0000)
Upon a pg falling idle, an ECDummy op is immediately generated.
This op causes the pg log to be committed. This op gets added to
the tid_to_op_map, however it does not get removed until the
interval ends.

The lack of remove is essentially a temporary "leak" and since the
op data structure is quite big, this can add up to significant
amounts of memory in a heavily loaded system.

The fix is simple - to add the op to the waiting list, so that it
gets cleaned up on when the op is finished.

Fixes: https://tracker.ceph.com/issues/74433
Signed-off-by: Alex Ainscow <aainscow@uk.ibm.com>
src/osd/ECCommon.cc

index c2782b2dc42f406c42cedddca141bc2454706e2b..36c69fa31ce1c753d57375fecd5e553b9edab398 100644 (file)
@@ -1032,6 +1032,7 @@ void ECCommon::RMWPipeline::finish_rmw(OpRef const &op) {
       nop->pipeline = this;
 
       tid_to_op_map[tid] = nop;
+      waiting_commit.push_back(nop);
 
       /* The cache is idle (we checked above) and this IO never blocks for reads
        * so we can skip the extent cache and immediately call the completion.