]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw: Check `going_down` in other-than-`interval_set` loop
authorAdam C. Emerson <aemerson@redhat.com>
Wed, 1 Apr 2026 18:30:18 +0000 (14:30 -0400)
committerAdam C. Emerson <aemerson@redhat.com>
Wed, 8 Jul 2026 21:06:08 +0000 (17:06 -0400)
Without this we can end up in an infinite loop where we just fill the
log with -ECANCELED from `get_next()`. Duplicates a check in the
`blocked_operations` loop.

Fixes: https://tracker.ceph.com/issues/76094
Signed-off-by: Adam C. Emerson <aemerson@redhat.com>
src/rgw/rgw_coroutine.cc

index 314e704342b81b1d787149e3700748059b6d2587..961a52c309faef86dd3cf5398de83fa22c9f07ae 100644 (file)
@@ -731,7 +731,15 @@ int RGWCoroutinesManager::run(const DoutPrefixProvider *dpp, list<RGWCoroutinesS
       if (ret < 0) {
        ldout(cct, 5) << "completion_mgr.get_next() returned ret=" << ret << dendl;
       }
-      handle_unblocked_stack(context_stacks, scheduled_stacks, io, &blocked_count, &interval_wait_count);
+      // Without this check, `get_next` will error with -ECANCELED and this loop will never exit.
+      if (going_down) {
+        ldout(cct, 5) << __func__ << "(): was stopped, exiting" << dendl;
+        ret = -ECANCELED;
+        canceled = true;
+        break;
+      }
+      handle_unblocked_stack(context_stacks, scheduled_stacks, io,
+                             &blocked_count, &interval_wait_count);
     }
 
 next: