Bug #80899
openrgw: a CopyObject that loses the head race leaks the source's tail
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. 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
- Pull request ID set to 72098
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