When suspending while already in t_continue when processing a reply / suspending twice in a reply.

Thanks to @giavac #2721 we can now suspend more then once in a reply route.

This is working well, however a memory leak was detected.

This modification is proposing a solution that will prevent calling sip_msg_cloner over an already twice over the same pointer, creating the memory leak.

Pre-Submission Checklist

Type Of Change

I assume this is a non "breaking change" since it can only trigger in a very the specific case that was not supported anyway.
Conditions when this alternate behavior can trigger:
1- must be in t_suspend
2- must be in a reply if (msg->first_line.type == SIP_REPLY) {
3- must have an already cloned if (t->uac[branch].reply) {

An alternate solution would be to free everything in the cloned message and recreate it.

Checklist:

load test done that included connections, failures and timeouts while suspending multiple times.

 6(31) INFO: tm [t_suspend.c:126]: t_suspend(): [>>>SUSPEND<<<] cloning message !
53(78) INFO: tm [t_suspend.c:136]: t_suspend(): [>>>SUSPEND<<<] message already cloned, re-using ! 
Total 100000 INVITE calls sent in 1710825 ms at rate of 58/sec
Total 100000 connection responses received in 1714999 ms at rate of 58/sec:
>> Detailed connection responses received:
 - 200 connection responses:    24924     (OK)
 - 404 connection responses:    25145     (Not Found)
 - 408 connection responses:    24912     (Request Timeout)
 - 500 connection responses:    25019     (Internal Server Error)
>> Detailed disconnection responses received:
 - 200 disconnection responses:    24924     (OK)
                    ------
 TOTAL responses:    24924 (rate=14/sec)

Description


You can view, comment on, or merge this pull request online at:

  https://github.com/kamailio/kamailio/pull/2763

Commit Summary

File Changes

Patch Links:


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or unsubscribe.