Project

General

Profile

Actions

Bug #80897

open
KB KB

rgw: a CompleteMultipartUpload that loses the head race leaks its parts

Bug #80897: rgw: a CompleteMultipartUpload that loses the head race leaks its parts

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.

_do_write_meta answers a lost race as success with meta.canceled set, and RadosMultipartUpload::complete ignores meta.canceled. The cancel removes the parts' index entries and the caller deletes the meta object, so nothing names the part objects any more, and nothing collects them.

Reproducer: qa workunit case test_losing_complete. A PutObject and a completion of an existing key are both held at write_meta_before_head_write, and the PutObject wins. The upload's two parts, four RADOS objects, remain after cleanup and GC.

Proposed fix: send a canceled completion's parts to GC under the upload id, as an abort does. It depends on U9's fix, so that a canceled write always means the head was not written.

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