]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
msg: drain stack before stopping processors to avoid shutdown hang 63261/head
authorNitzan Mordechai <nmordech@redhat.com>
Tue, 22 Apr 2025 16:23:16 +0000 (16:23 +0000)
committerNitzan Mordechai <nmordech@redhat.com>
Tue, 13 May 2025 07:53:22 +0000 (07:53 +0000)
commit5fbb9c5e464e3a2227f0c4729b2e6a1bc2f6f9d6
treefd6bb44f285a0325c957baa199f399fe5811b15e
parent2c1058b088daf8322a127c125a26fb4438f59124
msg: drain stack before stopping processors to avoid shutdown hang

`AsyncMessenger::shutdown()` called WorkerProcessor::stop() first,
killing the worker threads, then queued a C_drain callback via
stack->drain().  If a worker had already exited its event loop it never
processed the callback, so drain.wait() blocked forever and the monitor
shutdown hung for minutes.

Move stack->drain() ahead of the processors->stop() loop.  With the new
order the workers are still alive to acknowledge the drain.

Fixes: https://tracker.ceph.com/issues/71303
Signed-off-by: Nitzan Mordechai <nmordec@redhat.com>
src/msg/async/AsyncMessenger.cc