[OpenSIPS-Devel] [OpenSIPS/opensips] e5b231: clusterer: Fix sync edge-case causing SHM accumula...
Liviu Chircu
noreply at github.com
Thu Oct 24 16:01:00 UTC 2024
Branch: refs/heads/master
Home: https://github.com/OpenSIPS/opensips
Commit: e5b2317ca9e9f33baef29205ecd792d8a5d5d2ed
https://github.com/OpenSIPS/opensips/commit/e5b2317ca9e9f33baef29205ecd792d8a5d5d2ed
Author: Liviu Chircu <liviu at opensips.org>
Date: 2024-10-24 (Thu, 24 Oct 2024)
Changed paths:
M modules/clusterer/sync.c
Log Message:
-----------
clusterer: Fix sync edge-case causing SHM accumulation
This patch fixes a specific sync sequence leading to indefinite
accumulation of BIN packets and SHM exhaustion, as follows:
1) Sync Receiver node times out the sync in sync_check_timer()
(default timeout is 5s, by no means difficult to achieve)
2) Sync Donor continues to send SYNC packets
(on Receiver side, cap state is updated: PROGRESSING)
3) ! Sync Donor node loses link-state mid-sync, due to the pings being
on the same TCP connection (and delayed, way in the back)
4) Sync Donor fails & drops remaining SYNC + SYNC-END packets, as link
is down. Due to this, the handle_sync_end(!is_timeout) procedure
is never ran on the Receiver, so the PROGRESSING flag is never
removed -> indefinite SHM buffering / memory leak
Thanks to Răzvan Crainea for helping with code & troubleshooting here!
To unsubscribe from these emails, change your notification settings at https://github.com/OpenSIPS/opensips/settings/notifications
More information about the Devel
mailing list