[asterisk-bugs] [Asterisk 0019256]: [patch] Crash when using hagi and no servers are available

Asterisk Bug Tracker noreply at bugs.digium.com
Fri May 27 19:17:37 CDT 2011


A NOTE has been added to this issue. 
====================================================================== 
https://issues.asterisk.org/view.php?id=19256 
====================================================================== 
Reported By:                byronclark
Assigned To:                rmudgett
====================================================================== 
Project:                    Asterisk
Issue ID:                   19256
Category:                   Resources/res_agi
Reproducibility:            always
Severity:                   crash
Priority:                   normal
Status:                     closed
Asterisk Version:           1.8.3.3 
JIRA:                       SWP-3438 
Regression:                 No 
Reviewboard Link:            
SVN Branch (only for SVN checkouts, not tarball releases): N/A 
SVN Revision (number only!):  
Request Review:              
Resolution:                 fixed
Fixed in Version:           
====================================================================== 
Date Submitted:             2011-05-09 17:42 CDT
Last Modified:              2011-05-27 19:17 CDT
====================================================================== 
Summary:                    [patch] Crash when using hagi and no servers are
available
Description: 
Our system uses hagi urls in the dialplan like this:
exten => _[*0-9].,n(AGI),Agi(hagi://agi/outgoing.agi)

When none of the servers returned by the SRV querey for _agi._tcp.agi
respond, asterisk crashes.  The problem is that the loop over all the
entries has finishes, then the srv_context has already been cleaned up. The
only time the context needs to cleaned up is when a successful connection
to an agi server has been made.

The attached patch (against svn trunk) ensures that ast_srv_cleanup is not
called on an already cleaned up context.  The patch is needed on both trunk
and the 1.8 branch.
====================================================================== 

---------------------------------------------------------------------- 
 (0135522) svnbot (reporter) - 2011-05-27 19:17
 https://issues.asterisk.org/view.php?id=19256#c135522 
---------------------------------------------------------------------- 
Repository: asterisk
Revision: 321393

_U  trunk/
U   trunk/main/srv.c

------------------------------------------------------------------------
r321393 | rmudgett | 2011-05-27 18:46:07 -0500 (Fri, 27 May 2011) | 19
lines

Merged revisions 321392 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

........
  r321392 | rmudgett | 2011-05-27 18:45:41 -0500 (Fri, 27 May 2011) | 12
lines

  Crash when using hagi and no servers are available.

  When none of the servers returned by the SRV querey respond, asterisk
  crashes.  The problem is that if the loop over all the SRV entries
  finishes then the srv_context has already been cleaned up.

  * Make ast_srv_cleanup() check to see if the context is already cleaned
  up.

  (closes issue https://issues.asterisk.org/view.php?id=19256)
  Reported by: byronclark
........

------------------------------------------------------------------------

http://svn.digium.com/view/asterisk?view=rev&revision=321393 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2011-05-27 19:17 svnbot         Checkin                                      
2011-05-27 19:17 svnbot         Note Added: 0135522                          
======================================================================




More information about the asterisk-bugs mailing list