[OpenSIPS-Devel] [OpenSIPS/opensips] f423f9: clusterer: Fix potential AB/BA sync deadlock on DO...
Liviu Chircu
noreply at github.com
Tue Oct 22 10:55:40 UTC 2024
Branch: refs/heads/3.4
Home: https://github.com/OpenSIPS/opensips
Commit: f423f90ece1da56028d9fbebd7e3cd8e9753eaae
https://github.com/OpenSIPS/opensips/commit/f423f90ece1da56028d9fbebd7e3cd8e9753eaae
Author: Liviu Chircu <liviu at opensips.org>
Date: 2024-10-22 (Tue, 22 Oct 2024)
Changed paths:
M bin_interface.c
M bin_interface.h
M modules/clusterer/sync.c
Log Message:
-----------
clusterer: Fix potential AB/BA sync deadlock on DONOR nodes
This deadlock was reproduced with usrloc, but may also affect other
sync-based modules, as follows:
---- sync DONOR node ----
1) [sync send Worker-1] grabs (A) cluster lock, then (B) usrloc hash lock
while building/sending the sync packets
2) [handle SIP REGISTER Worker-2] grabs (B) usrloc hash lock, then (A)
cluster lock when replicating data with cl_api.send_all()
This patch converts the "A+B" sequence in 1) into a "B,A" sequence.
(cherry picked from commit d89f1703f60aaaa2d6cca23aab191e5671dc0c83)
To unsubscribe from these emails, change your notification settings at https://github.com/OpenSIPS/opensips/settings/notifications
More information about the Devel
mailing list