Summary: | ASTERISK-11025: [patch] chan_sip can cause 100% CPU usage on illegal listening IP | ||
Reporter: | Steve Davies (one47) | Labels: | |
Date Opened: | 2007-12-13 06:56:08.000-0600 | Date Closed: | 2008-01-04 13:31:41.000-0600 |
Priority: | Critical | Regression? | No |
Status: | Closed/Complete | Components: | Channels/chan_sip/General |
Versions: | Frequency of Occurrence | ||
Related Issues: | |||
Environment: | Attachments: | ( 0) ast_io_remove.patch | |
Description: | When using "-p" realtime priority, this will kill the server! It is unlikely to happen, but is totally reproducable here on both 1.2 and 1.4 systems. Set in sip.conf a valid IP configuration, eg: [general] port = 5060 bindaddr = 10.0.0.16 and restart asterisk. This registers the FD with asterisk core-io OK. Now change it to an "illegal" IP address that you know will fail, eg: [general] port = 5060 bindaddr = 10.0.0.17 SIP notices that it cannot use this anymore, but fail to deregister the fact with asterisk's core-io list, so the io being carried out on chan_sip's behalf fails, and logs an error message every few milliseconds. When running in high priority mode, this wipes out the box. When not in high priority mode, a major stream of errors is output, which is quite inconvenient! ****** ADDITIONAL INFORMATION ****** 1.4 has been tested by a friend, I personally am still using 1.2.25. | ||
Comments: | By: Steve Davies (one47) 2007-12-13 06:57:56.000-0600 Adding a patch, which I believe correctly unregisters the IO if the bindaddr changes, and becomes illegal. I have only tested this on 1.2.25, but it seems to work there. The uploaded patch is for 1.4.15. By: Steve Davies (one47) 2007-12-13 06:58:45.000-0600 Forgot to mention in the original report - The hang is caused when "sip reload" is executed. By: Digium Subversion (svnbot) 2008-01-04 13:23:44.000-0600 Repository: asterisk Revision: 96525 U branches/1.4/channels/chan_sip.c ------------------------------------------------------------------------ r96525 | tilghman | 2008-01-04 13:23:43 -0600 (Fri, 04 Jan 2008) | 4 lines If you change the bindaddr in sip.conf to a non-bound address and reload, sip goes kablooie. Reported and patched by: one47 (Closes issue ASTERISK-11025) ------------------------------------------------------------------------ http://svn.digium.com/view/asterisk?view=rev&revision=96525 By: Digium Subversion (svnbot) 2008-01-04 13:31:41.000-0600 Repository: asterisk Revision: 96547 _U trunk/ U trunk/channels/chan_sip.c ------------------------------------------------------------------------ r96547 | tilghman | 2008-01-04 13:31:40 -0600 (Fri, 04 Jan 2008) | 12 lines Merged revisions 96525 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r96525 | tilghman | 2008-01-04 13:27:25 -0600 (Fri, 04 Jan 2008) | 4 lines If you change the bindaddr in sip.conf to a non-bound address and reload, sip goes kablooie. Reported and patched by: one47 (Closes issue ASTERISK-11025) ........ ------------------------------------------------------------------------ http://svn.digium.com/view/asterisk?view=rev&revision=96547 |