Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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! (cherry picked from commit e5b2317)
- Loading branch information