Commit 5fbb9c5
committed
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 <[email protected]>1 parent 2c1058b commit 5fbb9c5
1 file changed
+2
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
481 | 481 | | |
482 | 482 | | |
483 | 483 | | |
| 484 | + | |
484 | 485 | | |
485 | 486 | | |
486 | 487 | | |
| |||
493 | 494 | | |
494 | 495 | | |
495 | 496 | | |
496 | | - | |
| 497 | + | |
497 | 498 | | |
498 | 499 | | |
499 | 500 | | |
| |||
0 commit comments