[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
Sat Dec 11 12:53:51 CST 2010


A NOTE has been added to this issue. 
====================================================================== 
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:                     feedback
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:              
====================================================================== 
Date Submitted:             2010-12-06 21:01 CST
Last Modified:              2010-12-11 12:53 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...
====================================================================== 

---------------------------------------------------------------------- 
 (0129549) stevebrandli (reporter) - 2010-12-11 12:53
 https://issues.asterisk.org/view.php?id=18430#c129549 
---------------------------------------------------------------------- 
I tested the patch and it fixes my scenario.  My channel is answered when
ExternalIVR is called, so I didn't test the unanswered channel scenario. 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2010-12-11 12:53 stevebrandli   Note Added: 0129549                          
======================================================================




More information about the asterisk-bugs mailing list