Project

General

Profile

Actions

Bug #80899

open
KB KB

rgw: a CopyObject that loses the head race leaks the source's tail

Bug #80899: rgw: a CopyObject that loses the head race leaks the source's tail

Added by Kyle Bader 2 months ago. Updated 2 months ago.

Status:
Fix Under Review
Priority:
Normal
Assignee:
Target version:
-
Due date:
% Done:

0%

Source:
Backport:
tentacle, umbrella
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Pull request ID:
Tags (freeform):
Merge Commit:
Fixed In:
Released In:
Upkeep Timestamp:

Description

Found with a formal model of RGW overwrites and multipart uploads P model, and reproduced on main at 44d50f6abb9 on a single-host vstart cluster, except where noted. By code review the same code is in tentacle, except where noted. The reproducers need a radosgw built with injection points. The workunit qa workunit sets its own knobs with ceph config set (qa/workunits/rgw/run-overwrite-races.sh <case>), deletes every key, runs radosgw-admin gc process --include-all, and expects no RADOS object of the bucket to remain.

copy_obj takes a reference on each of the source's tail objects before it writes the destination head, and rolls them back only when write_meta returns an error. A lost race returns 0 with meta.canceled set, so the references stay. Once the source is deleted or overwritten, its tail outlives every head that could name it.

Reproducer: qa workunit case test_losing_copy. A PutObject and a CopyObject to an existing key are both held at write_meta_before_head_write, and the PutObject wins. The source's tail remains after cleanup and GC.

Proposed fix: roll the references back when the write was canceled too.

KB Updated by Kyle Bader 2 months ago Actions #1

  • Pull request ID set to 72098

MH Updated by Matthew Heler 2 months ago Actions #2

  • Status changed from New to Fix Under Review
  • Assignee set to Kyle Bader
  • Backport changed from tentacle to tentacle, umbrella
Actions

Also available in: PDF Atom