[Home]

Summary:ASTERISK-27740: chan_sip: New Channel creation from new SIP dialog with Replaces failed to be properly tracked and destroyed
Reporter:Shannon Price (dt_sprice)Labels:
Date Opened:2018-03-13 11:55:30Date Closed:2018-04-10 10:00:05
Priority:MajorRegression?
Status:Closed/CompleteComponents:Channels/chan_sip/Transfers
Versions:13.19.1 Frequency of
Occurrence
Related
Issues:
Environment:CentOS Linux release 7.2.1511 (Core) 1cpu 2GB memory Attachments:( 0) messages.txt
( 1) refs
Description:When an existing Channel (A) is being replaced by a new channel (C) created from a new SIP dialog, the replacing channel (C) does not get properly tracked or destroyed as a channel. The SIP dialogs are properly terminated/destroyed however channel (C) is not fully destroyed. Channel (C) has 2 file descriptors left remaining in addition to the reference in core show channels. These will continue to accumulate.

First call fully setup
Channel              Location             State   Application(Data)
SIP/voxprox-dev01-00 17732507208@default: Up      Dial(SIP/10.1.144.4/1773250720
SIP/10.1.144.4-00000 17732507208@default: Up      AppDial((Outgoing Line))
2 active channels
1 active call
1 call processed

New Channel create from new SIP dialog
Channel              Location             State   Application(Data)
SIP/c1nb2-00000002   17732507208@default: Up      (None)
SIP/voxprox-dev01-00 h@default:6          Up      System(/opt/asterisk/var/lib/a
SIP/10.1.144.4-00000 17732507208@default: Up      AppDial((Outgoing Line))
3 active channels
1 active call
1 call processed

Channel replaced - doesn't show an active call anymore
SIP/c1nb2-00000002   17732507208@default: Up      (None)
SIP/10.1.144.4-00000 17732507208@default: Up      AppDial((Outgoing Line))
2 active channels
0 active calls
1 call processed

Call complete, Channel left. All SIP dialogs correctly destroyed.
Channel              Location             State   Application(Data)
SIP/c1nb2-00000002   17732507208@default: Up      (None)
0 active channels
0 active calls
1 call processed

For each channel left in this state, a timerfd and eventfd are left.
asterisk 2580 root   29u  a_inode                0,9        0     4852 [timerfd]
asterisk 2580 root   30u  a_inode                0,9        0     4852 [eventfd]
Comments:By: Asterisk Team (asteriskteam) 2018-03-13 11:55:30.804-0500

Thanks for creating a report! The issue has entered the triage process. That means the issue will wait in this status until a Bug Marshal has an opportunity to review the issue. Once the issue has been reviewed you will receive comments regarding the next steps towards resolution.

A good first step is for you to review the [Asterisk Issue Guidelines|https://wiki.asterisk.org/wiki/display/AST/Asterisk+Issue+Guidelines] if you haven't already. The guidelines detail what is expected from an Asterisk issue report.

Then, if you are submitting a patch, please review the [Patch Contribution Process|https://wiki.asterisk.org/wiki/display/AST/Patch+Contribution+Process].

By: Friendly Automation (friendly-automation) 2018-04-10 10:00:06.356-0500

Change 8730 merged by Jenkins2:
chan_sip.c: Fix INVITE with replaces channel ref leak.

[https://gerrit.asterisk.org/8730|https://gerrit.asterisk.org/8730]

By: Friendly Automation (friendly-automation) 2018-04-10 10:03:58.282-0500

Change 8731 merged by Jenkins2:
chan_sip.c: Fix INVITE with replaces channel ref leak.

[https://gerrit.asterisk.org/8731|https://gerrit.asterisk.org/8731]

By: Friendly Automation (friendly-automation) 2018-04-10 10:12:35.821-0500

Change 8732 merged by George Joseph:
chan_sip.c: Fix INVITE with replaces channel ref leak.

[https://gerrit.asterisk.org/8732|https://gerrit.asterisk.org/8732]