From 126ad1686a3f4e0e9801a978c370f770ad8815a7 Mon Sep 17 00:00:00 2001 From: Peng Wang Date: Sun, 17 Feb 2019 17:47:52 +0800 Subject: [PATCH] common/ceph_timer: stop timer's thread when it is suspended otherwise the client could hang when shutting down Fixes: https://tracker.ceph.com/issues/37766 Signed-off-by: Peng Wang (cherry picked from commit a942722c5bffbacc8d30643dd9863ef844f0617e) --- src/common/ceph_timer.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/common/ceph_timer.h b/src/common/ceph_timer.h index 4b7438672d4..8e933012294 100644 --- a/src/common/ceph_timer.h +++ b/src/common/ceph_timer.h @@ -138,6 +138,8 @@ namespace ceph { } // Otherwise the event requeued itself } + if (suspended) + break; if (schedule.empty()) cond.wait(l); else -- 2.47.3