[OpenSIPS-Devel] [OpenSIPS/opensips] acb687: b2b_entities: avoid deadlock for certain scenarios

Vlad Pătrașcu noreply at github.com
Tue Feb 21 21:06:23 UTC 2023


  Branch: refs/heads/3.1
  Home:   https://github.com/OpenSIPS/opensips
  Commit: acb68770655ce1de6233ccabf6b01dddb540204d
      https://github.com/OpenSIPS/opensips/commit/acb68770655ce1de6233ccabf6b01dddb540204d
  Author: Razvan Crainea <razvan at opensips.org>
  Date:   2023-02-21 (Tue, 21 Feb 2023)

  Changed paths:
    M modules/b2b_entities/dlg.c

  Log Message:
  -----------
  b2b_entities: avoid deadlock for certain scenarios

When a call was terminted with a BYE from the handler of the 200 OK
reply, the entities lock would remain locked, generating a deadlock.
This commit fixes this (and possible other) situations by generically
keeping a track when the lock is taken and unlock it before exiting.

Thanks to Vlad Patrascu for helping with debugging and solution for this

(cherry picked from commit 87661e1f14f9be6d957cd25c9f7dbe58d6ce0c82)


  Commit: 91d17a15156075b4a75c84d43f01ca06d1c2f931
      https://github.com/OpenSIPS/opensips/commit/91d17a15156075b4a75c84d43f01ca06d1c2f931
  Author: Ovidiu Sas <osas at voipembedded.com>
  Date:   2023-02-21 (Tue, 21 Feb 2023)

  Changed paths:
    M modules/b2b_entities/dlg.c

  Log Message:
  -----------
  b2b_entities: don't try to get the lock if the l;ock was alredy taken
  - closes #3011
  - this part of the code should be reviewed and cleaned up or clarity

(cherry picked from commit a7eb936241b6187a94416aae4f05314cecd915cd)


  Commit: 6316c518e13a3fe82eac93d4bf7716d06fe9d4bc
      https://github.com/OpenSIPS/opensips/commit/6316c518e13a3fe82eac93d4bf7716d06fe9d4bc
  Author: Vlad Patrascu <vladp at opensips.org>
  Date:   2023-02-21 (Tue, 21 Feb 2023)

  Changed paths:
    M modules/b2b_entities/dlg.c

  Log Message:
  -----------
  b2b_entities: remove no-op and improve code clarity

Related to #3011

(cherry picked from commit 4b3ff72b7fd76afb884fdd6488802d1ffe2bc4fa)


Compare: https://github.com/OpenSIPS/opensips/compare/e0b45850725e...6316c518e13a



More information about the Devel mailing list