]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-ci.git/commit
mgr/prometheus: Use RLock to fix deadlock in HealthHistory
authorNitzan Mordechai <nmordech@redhat.com>
Tue, 9 Dec 2025 12:34:07 +0000 (12:34 +0000)
committerNitzan Mordechai <nmordch@li-2bf86dcc-35b8-11b2-a85c-b1dfd4248b42.ibm.com>
Wed, 7 Jan 2026 11:16:40 +0000 (13:16 +0200)
commit0c4e68af8e2bc005109b99c3db7f5004eead3c59
tree6e50420f8f8f16d0998462ad95ff8e420079e71d
parent2e87714b94a9e16c764ef6f97de50aecf1b0c41e
mgr/prometheus: Use RLock to fix deadlock in HealthHistory

The HealthHistory.check() method acquires the lock and then calls
HealthHistory.save(), which also tries to acquire the same lock.
With a regular Lock(), the same thread blocks trying to re-acquire it (deadlock).
Switch to RLock to allow nested acquisition by the same thread.
PR #65245 added the locks.

Fixes: https://tracker.ceph.com/issues/74148
Signed-off-by: Nitzan Mordechai <nmordech@ibm.com>
src/pybind/mgr/prometheus/module.py