Summary: | ASTERISK-19030: Invalid host= declaration causes crash | ||||
Reporter: | Trevor Peirce (trev) | Labels: | |||
Date Opened: | 2011-12-13 17:11:48.000-0600 | Date Closed: | 2011-12-15 12:04:28.000-0600 | ||
Priority: | Critical | Regression? | |||
Status: | Closed/Complete | Components: | Channels/chan_sip/General | ||
Versions: | 1.8.7.2 | Frequency of Occurrence | Constant | ||
Related Issues: |
| ||||
Environment: | Attachments: | ||||
Description: | Setting a port number on the host declaration, such as host=1.2.3.4:123 causing asterisk to crash. Confirmed to crash every time the peer is loaded with 1.8.7.1 using realtime and 1.8.7.2 with sip.conf. | ||||
Comments: | By: Richard Mudgett (rmudgett) 2011-12-13 18:32:24.255-0600 Thank you for your bug report. In order to move your issue forward, we require a backtrace[1] from the core file produced after the crash. Also, be sure you have DONT_OPTIMIZE enabled in menuselect within the Compiler Flags section, then: make install After enabling, reproduce the crash, and then execute the backtrace[1] instructions. When complete, attach that file to this issue report. [1] https://wiki.asterisk.org/wiki/display/AST/Getting+a+Backtrace By: Walter Doekes (wdoekes) 2011-12-14 01:58:09.896-0600 Trevor: I can't reproduce with latest 1.8 (svn) {noformat} *CLI> sip reload *CLI> Reloading SIP == Parsing '/etc/asterisk/sip.conf': == Found == Using SIP CoS mark 4 Port disallowed in 1.2.3.4:123 > doing dnsmgr_lookup for '1.2.3.4:123' Port disallowed in 1.2.3.4:123 Unable to lookup '1.2.3.4:123' {noformat} sip.conf: {noformat} [general] transport=udp [test] type=friend host=1.2.3.4:123 {noformat} By: Trevor Peirce (trev) 2011-12-14 11:07:53.287-0600 I don't have a development server available to recompile this at the moment. I'm using Digium's compiled RPMs on CentOS 5.7. {code} [crashme] type=peer host=10.12.10.2:5062 {code} {code}worf*CLI> core show version Asterisk 1.8.7.2 built by root @ 89-139-19-10.digium.internal on a x86_64 running Linux on 2011-12-09 16:57:07 UTC worf*CLI> sip reload Reloading SIP == Parsing '/etc/asterisk/sip.conf': == Found == Using SIP CoS mark 4 [Dec 14 09:00:09] WARNING[16828]: netsock2.c:178 ast_sockaddr_split_hostport: Port disallowed in 10.12.10.2:5062 worf*CLI> Disconnected from Asterisk server {code} When I try to start up with asterisk -vvvc {code}SIP channel loading... == Parsing '/etc/asterisk/sip.conf': == Found == SIP Listening on 0.0.0.0:5060 == Using SIP CoS mark 4 [Dec 14 09:05:35] WARNING[26346]: netsock2.c:178 ast_sockaddr_split_hostport: Port disallowed in 10.12.10.2:5062 [Dec 14 09:05:35] WARNING[26346]: netsock2.c:178 ast_sockaddr_split_hostport: Port disallowed in 10.12.10.2:5062 [Dec 14 09:05:35] WARNING[26346]: acl.c:579 resolve_first: Unable to lookup '10.12.10.2:5062' [Dec 14 09:05:35] WARNING[26346]: acl.c:422 ast_append_ha: Invalid IP address: (null) Segmentation fault {code} By: Leif Madsen (lmadsen) 2011-12-14 14:04:29.822-0600 You must have some extra settings than what I'm trying, because with 1.8.7.2 I am unable to reproduce this with the information you've provided: {code} *CLI> sip reload *CLI> Reloading SIP == Parsing '/etc/asterisk/sip.conf': == Found Port disallowed in 10.12.10.2:5062 == Using SIP CoS mark 4 Port disallowed in 10.12.10.2:5062 Unable to lookup '10.12.10.2:5062' {code} By: Trevor Peirce (trev) 2011-12-14 14:59:54.424-0600 Okay. I've narrowed it down by deleting one line of my sip.conf until I found which line to delete to *not* crash. Here's a sip.conf with ONLY what's required TO cause the crash: {code} [general] dynamic_exclude_static = yes [crashme] type=peer host=10.12.10.2:5062 {code} By: Walter Doekes (wdoekes) 2011-12-14 16:00:10.595-0600 {noformat} walter@walter-desktop:0:~/src/asterisk-1.8.x$ svn log -r 343851 ------------------------------------------------------------------------ r343851 | rmudgett | 2011-11-08 18:58:21 +0100 (Tue, 08 Nov 2011) | 14 lines Fixed reference to incorrect variable if unknown host configured crash. * Fixed a LOG_ERROR message referencing the config variable list v that had previously been processed and became NULL. * Added error return value set that was missing in an ast_append_ha() error return path. (closes issue ASTERISK-18743) Reported by: Michele Patches: issueA18743-fix_dynamic_exclude_static_bad_host_log.patch (license #5674) patch uploaded by Walter Doekes Tested by: Michele ------------------------------------------------------------------------ {noformat} |