Bug #80895
closedrgw/lc: lifecycle aborts an expired multipart upload without the completion lock
0%
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.
handle_multipart_expiration calls RadosMultipartUpload::abort directly; bae9ed83edf gave the completion lock to AbortMultipartUpload only. An upload past its AbortIncompleteMultipartUpload age that is completed while lifecycle processes the bucket has its parts sent to GC after the completion wrote a head that names them. The abort's cls_version check does not catch it, because a completion does not bump the meta object's version.
Symptom, once GC has run: GET of the completed object returns NoSuchKey. The head and its manifest are intact; the first part object the manifest names is gone, and RGW reports that ENOENT as a 404 before sending any headers.
Reproducer: s3-tests test_lifecycle_abort_racing_complete_multipart s3-tests commit. RGW config: rgw_inject_delay_pattern = complete_mp_after_head_write, rgw_inject_delay_sec = 60, rgw_lc_debug_interval = 10, rgw_gc_obj_min_wait = 10, rgw_gc_processor_period = 10, with the same keys under [s3 main] in s3tests.conf.
Proposed fix: take the completion lock as AbortMultipartUpload does, and leave a locked upload for the next pass.
KB Updated by Kyle Bader 2 months ago
- Pull request ID set to 72099
MH Updated by Matthew Heler 2 months ago
- Status changed from New to Fix Under Review
- Assignee set to Kyle Bader
- Backport changed from tentacle to tentacle, umbrella
UB Updated by Upkeep Bot about 2 months ago
- Copied to Backport #81681: umbrella: rgw/lc: lifecycle aborts an expired multipart upload without the completion lock added
UB Updated by Upkeep Bot about 2 months ago
- Copied to Backport #81682: tentacle: rgw/lc: lifecycle aborts an expired multipart upload without the completion lock added
UB Updated by Upkeep Bot about 2 months ago
- Status changed from Fix Under Review to Backporting
- Merge Commit set to 6e80edda2dd3e405bc6de1f59ab7521b0bc5814d
- Fixed In set to v21.3.0-4313-g6e80edda2d
- Upkeep Timestamp set to 2026-10-13T05:10:13+00:00