Skip to content

Commit f287d66

Browse files
Merge pull request ceph#63261 from NitzanMordhai/wip-nitzan-msg-shutdown-hang-drain
msg: drain stack before stopping processors to avoid shutdown hang
2 parents fa90b85 + 5fbb9c5 commit f287d66

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/msg/async/AsyncMessenger.cc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -481,6 +481,7 @@ int AsyncMessenger::shutdown()
481481
{
482482
ldout(cct,10) << __func__ << " " << get_myaddrs() << dendl;
483483

484+
stack->drain();
484485
// done! clean up.
485486
for (auto &&p : processors)
486487
p->stop();
@@ -493,7 +494,7 @@ int AsyncMessenger::shutdown()
493494
stop_cond.notify_all();
494495
stopped = true;
495496
lock.unlock();
496-
stack->drain();
497+
497498
return 0;
498499
}
499500

0 commit comments

Comments
 (0)