Skip to content

Commit 81e092f

Browse files
committed
Merge PR ceph#52921 into main
* refs/pull/52921/head: pybind/mgr/volumes: log mutex locks to help debug deadlocks Reviewed-by: Venky Shankar <[email protected]>
2 parents 52a908a + 5e689f8 commit 81e092f

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/pybind/mgr/volumes/fs/async_job.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ def run(self):
3535
vol_job = None
3636
try:
3737
# fetch next job to execute
38-
with self.async_job.lock:
38+
with lock_timeout_log(self.async_job.lock):
3939
while True:
4040
if self.should_reconfigure_num_threads():
4141
log.info("thread [{0}] terminating due to reconfigure".format(thread_name))
@@ -64,12 +64,12 @@ def run(self):
6464
finally:
6565
# when done, unregister the job
6666
if vol_job:
67-
with self.async_job.lock:
67+
with lock_timeout_log(self.async_job.lock):
6868
self.async_job.unregister_async_job(vol_job[0], vol_job[1], thread_id)
6969
time.sleep(1)
7070
log.error("thread [{0}] reached exception limit, bailing out...".format(thread_name))
7171
self.vc.cluster_log("thread {0} bailing out due to exception".format(thread_name))
72-
with self.async_job.lock:
72+
with lock_timeout_log(self.async_job.lock):
7373
self.async_job.threads.remove(self)
7474

7575
def should_reconfigure_num_threads(self):
@@ -150,7 +150,7 @@ def run(self):
150150
def shutdown(self):
151151
self.stopping.set()
152152
self.cancel_all_jobs()
153-
with self.lock:
153+
with lock_timeout_log(self.lock):
154154
self.cv.notifyAll()
155155
self.join()
156156

0 commit comments

Comments
 (0)