From: Casey Bodley Date: Mon, 9 Dec 2024 22:12:16 +0000 (-0500) Subject: rgw/rados: resolve CopyObject crash from remote zonegroup X-Git-Tag: v20.0.0~180^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F61009%2Fhead;p=ceph.git 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 Reported-by: Seena Fallah --- diff --git a/src/rgw/driver/rados/rgw_rados.cc b/src/rgw/driver/rados/rgw_rados.cc index 5a7cd92790a3..caa361661807 100644 --- a/src/rgw/driver/rados/rgw_rados.cc +++ b/src/rgw/driver/rados/rgw_rados.cc @@ -4697,7 +4697,11 @@ int RGWRados::copy_obj(RGWObjectCtx& src_obj_ctx, if (remote_src || !source_zone.empty()) { rgw_zone_set_entry source_trace_entry{source_zone.id, std::nullopt}; - const req_context rctx{dpp, y, nullptr}; + // null_yield resolves a crash when calling progress_cb(), because the beast + // frontend tried to use this same yield context to write the progress + // response to the frontend socket. call fetch_remote_obj() synchronously so + // that only one thread tries to suspend that coroutine + const req_context rctx{dpp, null_yield, nullptr}; return fetch_remote_obj(dest_obj_ctx, remote_user, info, source_zone, dest_obj, src_obj, dest_bucket_info, &src_bucket_info, dest_placement, src_mtime, mtime, mod_ptr,