Branch: refs/heads/3.5
  Home:   https://github.com/OpenSIPS/opensips
  Commit: 0f86eeb8eaca7050e80f47cf62b77dae5689c049
      
https://github.com/OpenSIPS/opensips/commit/0f86eeb8eaca7050e80f47cf62b77dae5689c049
  Author: Liviu Chircu <li...@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!

(cherry picked from commit e5b2317ca9e9f33baef29205ecd792d8a5d5d2ed)


  Commit: 82645f0ced6143ddf1cef37c9e73b25f7b11c605
      
https://github.com/OpenSIPS/opensips/commit/82645f0ced6143ddf1cef37c9e73b25f7b11c605
  Author: Liviu Chircu <li...@opensips.org>
  Date:   2024-10-24 (Thu, 24 Oct 2024)

  Changed paths:
    M modules/clusterer/sync.c

  Log Message:
  -----------
  clusterer sync: Fix several SHM leaks on error cases (Donor side)

(cherry picked from commit 101396a59c23f91bc821c36b9bc1bd2e5daa1d35)


Compare: 
https://github.com/OpenSIPS/opensips/compare/5170a0bdc459...82645f0ced61

To unsubscribe from these emails, change your notification settings at 
https://github.com/OpenSIPS/opensips/settings/notifications

_______________________________________________
Devel mailing list
Devel@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/devel

Reply via email to