Skip to content

Commit ca36171

Browse files
committed
rgw/rados: resolve CopyObject crash from remote zonegroup
in a multi-zonegroup multisite configuration, CopyObject can name buckets in other zonegroups. we call fetch_remote_obj() to perform this copy, but it was crashing due to interaction with the beast frontend's coroutines Fixes: https://tracker.ceph.com/issues/69169 Signed-off-by: Casey Bodley <[email protected]> Reported-by: Seena Fallah <[email protected]>
1 parent 90d0f03 commit ca36171

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/rgw/driver/rados/rgw_rados.cc

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4697,7 +4697,11 @@ int RGWRados::copy_obj(RGWObjectCtx& src_obj_ctx,
46974697

46984698
if (remote_src || !source_zone.empty()) {
46994699
rgw_zone_set_entry source_trace_entry{source_zone.id, std::nullopt};
4700-
const req_context rctx{dpp, y, nullptr};
4700+
// null_yield resolves a crash when calling progress_cb(), because the beast
4701+
// frontend tried to use this same yield context to write the progress
4702+
// response to the frontend socket. call fetch_remote_obj() synchronously so
4703+
// that only one thread tries to suspend that coroutine
4704+
const req_context rctx{dpp, null_yield, nullptr};
47014705
return fetch_remote_obj(dest_obj_ctx, remote_user, info, source_zone,
47024706
dest_obj, src_obj, dest_bucket_info, &src_bucket_info,
47034707
dest_placement, src_mtime, mtime, mod_ptr,

0 commit comments

Comments
 (0)