]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
rgw/rados: resolve CopyObject crash from remote zonegroup
authorCasey Bodley <cbodley@redhat.com>
Mon, 9 Dec 2024 22:12:16 +0000 (17:12 -0500)
committerCasey Bodley <cbodley@redhat.com>
Mon, 9 Dec 2024 22:13:44 +0000 (17:13 -0500)
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 <cbodley@redhat.com>
Reported-by: Seena Fallah <seenafallah@gmail.com>
src/rgw/driver/rados/rgw_rados.cc

index 5a7cd92790a324f1c17db95b1a2af6adff84bff9..caa36166180733a96c26c7fc6fb106de385e9748 100644 (file)
@@ -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,