[asterisk-bugs] [Asterisk 0018430]: [patch] Segfault when ExternalIVR() app. immediately sends S command due to race condition

Asterisk Bug Tracker noreply at bugs.digium.com
Mon Jan 3 14:09:31 UTC 2011


The following issue has been RESOLVED. 
====================================================================== 
https://issues.asterisk.org/view.php?id=18430 
====================================================================== 
Reported By:                stevebrandli
Assigned To:                thedavidfactor
====================================================================== 
Project:                    Asterisk
Issue ID:                   18430
Category:                   Applications/app_externalivr
Reproducibility:            always
Severity:                   crash
Priority:                   normal
Status:                     resolved
Asterisk Version:           1.8.0 
JIRA:                       SWP-2686 
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:             2010-12-06 21:01 CST
Last Modified:              2011-01-03 08:09 CST
====================================================================== 
Summary:                    [patch] Segfault when ExternalIVR() app. immediately
sends S command due to race condition
Description: 
Segfault occurs if the ExternalIVR() application sends an S command faster
than the sound generator can setup and "play silence."  The segfault occurs
because the code believes it must send a T event but there are no sound
files current playing.

Entire extensions.conf:
[internal]
70,1,ExternalIVR(/var/lib/asterisk/agi-bin/fndatyivr.py)
70,n,Hangup()

Entire python script referenced above:
#!/usr/bin/python
import sys
import time
#time.sleep(1)
sys.stdout.write("S,/etc/asterisk/sounds/fndaty/WaitBrandli\n")
sys.stdout.flush()
time.sleep(10)

Just dial extension 70.  Notice the if the time.sleep(1) line in the
python script is uncommented, there is no problem.  I assume it is possible
that other setups will have trouble reproducing because application
execution takes longer.

Please consider relating issue https://issues.asterisk.org/view.php?id=17335.
======================================================================
Relationships       ID      Summary
----------------------------------------------------------------------
related to          0017335 ExternalIVR 'S' command sometimes resul...
====================================================================== 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2011-01-03 08:09 svnbot         Status                   feedback => resolved
2011-01-03 08:09 svnbot         Resolution               open => fixed       
======================================================================




More information about the asterisk-bugs mailing list