Summary: | ASTERISK-15161: [patch] Asterisk doesn't free udp ports | ||
Reporter: | Andrey Solovyev (corruptor) | Labels: | |
Date Opened: | 2009-11-18 07:48:54.000-0600 | Date Closed: | 2009-12-24 10:02:13.000-0600 |
Priority: | Major | Regression? | Yes |
Status: | Closed/Complete | Components: | Core/Netsock |
Versions: | Frequency of Occurrence | ||
Related Issues: | |||
Environment: | Attachments: | ( 0) 20091208__issue15627__1.4.diff.txt ( 1) 20091208__issue15627__1.6.0.diff.txt ( 2) asterisk_console.txt ( 3) callflow ( 4) fullcallflow ( 5) sip_trace.log ( 6) sipshow.txt | |
Description: | I've had this problem on 1.4.26 also. I've recently upgraded to 1.6.0.17 and problem also exists here. Concurrent number of calls is usually not more than 25. All calls are SIP to SIP. Number of udp ports used by asterisk is growing. For example at the moment of writing this note: 34 active channels 17 active calls 1871 calls processed Total number of udp ports open - 1023 At the other moment it could be a little bit lower but anyway it is growing. There are many queues and different ivrs on the server. We also use AMI for originating calls for our CC. I've noticed that asterisk writes warnings to log, for example: WARNING[26372] chan_sip.c: Trying to destroy "6009EE42DD5A4BDA81A18571C82B76310x0ad20c43", not found in dialog list?!?! I don't know if it's related or not. Please help me to debug this problem. Sorry if I've chosen the wrong category. | ||
Comments: | By: Leif Madsen (lmadsen) 2009-11-19 09:58:51.000-0600 Can you provide some additional information such as console output, sip debug and history (per the bug guidelines), and output of 'sip show channels'? That might get us started. I'm not sure what else to ask for at this time. By: Andrey Solovyev (corruptor) 2009-11-20 05:16:59.000-0600 Output of "sip show channels" is usual (I've uploaded it). I will try narrowing this problem during weekend and night when the server isn't busy by making different calls. I will post the results next week. As for now it's quite hard to post something from console output or sip debug because it is huge. By: Andrey Solovyev (corruptor) 2009-11-20 09:06:51.000-0600 I've managed to find out what causes this problem. Some of our call center employees use softphone SJphone/1.65.377a. I've uploaded the sip dialog (file callflow) after which asterisk doesn't free udp two ports. You can also see the full version of it. Asterisk is at 10.150.32.194. SjPhone is behind NAT 10.150.32.98. I've checked all sip call flows related to used UDP port and they are all the same. This happens if call isn't answered and caller (SjPhone) cancels the call. I guess that SjPhone shouldn't send second invite. Should asterisk send OK to that INVITE? It seems that earlier asterisk have had protection against this because we use this softphone for a quite long and the problem appeared when we moved from 1.4.21.2 to 1.4.26 but I am not sure about this... Is this asterisk bug or should we change our softphones? By: Andrey Solovyev (corruptor) 2009-11-20 10:19:37.000-0600 Since I am able to reproduce this I've tested version 1.6.0.13 and asterisk closes the ports. Version 1.6.0.18 - doesn't. I can test other versions later and we'll when this behaviour has chenged. By: Andrey Solovyev (corruptor) 2009-11-23 02:29:29.000-0600 The behaviour has changed between 1.6.0.13 and 1.6.0.14 By the way UDPTL ports aren't closed also if t38_udptl is enabled. By: Andrey Solovyev (corruptor) 2009-11-23 09:53:46.000-0600 Small patch in the issue ASTERISK-14382 (commited to svn r206775) caused the behaviour I experience. Unfortunately I can't say why. By: Liutauras (luca942) 2009-11-24 02:28:14.000-0600 After a lot of debugging I have revealed that this behavior is provoked by auto-congesting channel. NOTICE[25556] chan_sip.c: Auto-congesting SIP/test-00000007 I have attached 2 files sip_trace.log and asterisk_cosole.txt for more details. A call from 52040449 was made to SIP line "test". SIP line was successfully registered, but I have simulated network failure to provoke auto-congestion on Asterisk. This is very common situation in real life, when registered SIP line becomes unreachable due to end-user connection failure. After unsuccessfull call all 4 UDP sockets 14536, 14537, 13526, 13527 remained opened. They are closed only if you reboot Asterisk. By: Tilghman Lesher (tilghman) 2009-12-08 17:29:32.000-0600 Patch uploaded; needs your testing to verify that it solves (or doesn't solve) the issue. By: Digium Subversion (svnbot) 2009-12-10 10:53:51.000-0600 Repository: asterisk Revision: 234095 U branches/1.4/channels/chan_sip.c ------------------------------------------------------------------------ r234095 | tilghman | 2009-12-10 10:08:20 -0600 (Thu, 10 Dec 2009) | 17 lines When we receive no response at all to our INVITE, allow the channel to be destroyed. (closes issue ASTERISK-14576) Reported by: falves11 Patches: 20091209__issue15627__1.6.0.diff.txt uploaded by tilghman (license 14) 20091209__issue15627__1.4.diff.txt uploaded by tilghman (license 14) Tested by: falves11 Review: https://reviewboard.asterisk.org/r/446/ (closes issue ASTERISK-14653) Reported by: dant (closes issue ASTERISK-15161) Reported by: corruptor (closes issue ASTERISK-14337) Reported by: falves11 (issue ASTERISK-14500) Reported by: lftsy ------------------------------------------------------------------------ http://svn.digium.com/view/asterisk?view=rev&revision=234095 By: Digium Subversion (svnbot) 2009-12-10 10:55:19.000-0600 Repository: asterisk Revision: 234129 _U trunk/ U trunk/channels/chan_sip.c ------------------------------------------------------------------------ r234129 | tilghman | 2009-12-10 10:24:26 -0600 (Thu, 10 Dec 2009) | 24 lines Merged revisions 234095 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r234095 | tilghman | 2009-12-10 10:08:20 -0600 (Thu, 10 Dec 2009) | 9 lines When we receive no response at all to our INVITE, allow the channel to be destroyed. (closes issue ASTERISK-14576) Reported by: falves11 Patches: 20091209__issue15627__1.6.0.diff.txt uploaded by tilghman (license 14) 20091209__issue15627__1.4.diff.txt uploaded by tilghman (license 14) Tested by: falves11 Review: https://reviewboard.asterisk.org/r/446/ (closes issue ASTERISK-14653) Reported by: dant (closes issue ASTERISK-15161) Reported by: corruptor (closes issue ASTERISK-14337) Reported by: falves11 (issue ASTERISK-14500) Reported by: lftsy ........ ------------------------------------------------------------------------ http://svn.digium.com/view/asterisk?view=rev&revision=234129 By: Digium Subversion (svnbot) 2009-12-10 10:56:24.000-0600 Repository: asterisk Revision: 234131 _U branches/1.6.0/ U branches/1.6.0/channels/chan_sip.c ------------------------------------------------------------------------ r234131 | tilghman | 2009-12-10 10:30:22 -0600 (Thu, 10 Dec 2009) | 29 lines Merged revisions 234129 via svnmerge from https://origsvn.digium.com/svn/asterisk/trunk ................ r234129 | tilghman | 2009-12-10 10:24:26 -0600 (Thu, 10 Dec 2009) | 16 lines Merged revisions 234095 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ When we receive no response at all to our INVITE, allow the channel to be destroyed. (closes issue ASTERISK-14576) Reported by: falves11 Patches: 20091209__issue15627__1.6.0.diff.txt uploaded by tilghman (license 14) 20091209__issue15627__1.4.diff.txt uploaded by tilghman (license 14) Tested by: falves11 Review: https://reviewboard.asterisk.org/r/446/ (closes issue ASTERISK-14653) Reported by: dant (closes issue ASTERISK-15161) Reported by: corruptor (closes issue ASTERISK-14337) Reported by: falves11 (issue ASTERISK-14500) Reported by: lftsy ........ ................ ------------------------------------------------------------------------ http://svn.digium.com/view/asterisk?view=rev&revision=234131 By: Digium Subversion (svnbot) 2009-12-10 10:57:17.000-0600 Repository: asterisk Revision: 234132 _U branches/1.6.1/ U branches/1.6.1/channels/chan_sip.c ------------------------------------------------------------------------ r234132 | tilghman | 2009-12-10 10:30:32 -0600 (Thu, 10 Dec 2009) | 31 lines Merged revisions 234129 via svnmerge from https://origsvn.digium.com/svn/asterisk/trunk ................ r234129 | tilghman | 2009-12-10 10:24:26 -0600 (Thu, 10 Dec 2009) | 16 lines Merged revisions 234095 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r234095 | tilghman | 2009-12-10 10:08:20 -0600 (Thu, 10 Dec 2009) | 9 lines When we receive no response at all to our INVITE, allow the channel to be destroyed. (closes issue ASTERISK-14576) Reported by: falves11 Patches: 20091209__issue15627__1.6.0.diff.txt uploaded by tilghman (license 14) 20091209__issue15627__1.4.diff.txt uploaded by tilghman (license 14) Tested by: falves11 Review: https://reviewboard.asterisk.org/r/446/ (closes issue ASTERISK-14653) Reported by: dant (closes issue ASTERISK-15161) Reported by: corruptor (closes issue ASTERISK-14337) Reported by: falves11 (issue ASTERISK-14500) Reported by: lftsy ........ ................ ------------------------------------------------------------------------ http://svn.digium.com/view/asterisk?view=rev&revision=234132 By: Digium Subversion (svnbot) 2009-12-10 10:57:47.000-0600 Repository: asterisk Revision: 234133 _U branches/1.6.2/ U branches/1.6.2/channels/chan_sip.c ------------------------------------------------------------------------ r234133 | tilghman | 2009-12-10 10:30:40 -0600 (Thu, 10 Dec 2009) | 31 lines Merged revisions 234129 via svnmerge from https://origsvn.digium.com/svn/asterisk/trunk ................ r234129 | tilghman | 2009-12-10 10:24:26 -0600 (Thu, 10 Dec 2009) | 16 lines Merged revisions 234095 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r234095 | tilghman | 2009-12-10 10:08:20 -0600 (Thu, 10 Dec 2009) | 9 lines When we receive no response at all to our INVITE, allow the channel to be destroyed. (closes issue ASTERISK-14576) Reported by: falves11 Patches: 20091209__issue15627__1.6.0.diff.txt uploaded by tilghman (license 14) 20091209__issue15627__1.4.diff.txt uploaded by tilghman (license 14) Tested by: falves11 Review: https://reviewboard.asterisk.org/r/446/ (closes issue ASTERISK-14653) Reported by: dant (closes issue ASTERISK-15161) Reported by: corruptor (closes issue ASTERISK-14337) Reported by: falves11 (issue ASTERISK-14500) Reported by: lftsy ........ ................ ------------------------------------------------------------------------ http://svn.digium.com/view/asterisk?view=rev&revision=234133 By: Andrey Solovyev (corruptor) 2009-12-23 02:39:21.000-0600 UDP ports still stay open for me in 1.6.0.20-rc1. Sorry I wasn't able to test the patch because I was offline during those days. By: Tilghman Lesher (tilghman) 2009-12-23 12:00:52.000-0600 Aha! It appears that 1.6.0.20-rc1 was created before the fix for this issue was committed. Could you retest with SVN 1.6.0? By: Andrey Solovyev (corruptor) 2009-12-24 03:46:14.000-0600 I've tested my scenario with SjPhone on SVN-branch-1.6.0-r236301 and ports still stay open. By: David Woolley (davidw) 2009-12-24 03:58:48.000-0600 There is a report this being fixed in 245095 at http://forums.digium.com/viewtopic.php?f=1&t=72603&sid=390e3a96c3a118b89cd2a0bca79bd2cd By: Andrey Solovyev (corruptor) 2009-12-24 09:18:09.000-0600 Oops. Sorry. Asterisk really closes the ports. It closes them in several minutes after call destruction so I didn't notice that at first time. |