[Home]

Summary:ASTERISK-14643: [patch] app_festival hangs on reading from spawned subprocess
Reporter:Heiko Wundram (modelnine)Labels:
Date Opened:2009-08-12 15:50:45Date Closed:2010-08-30 17:30:11
Priority:CriticalRegression?No
Status:Closed/CompleteComponents:Applications/app_festival
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:( 0) asterisk-1.6.1.1-festival-debug.patch
Description:Due to an invalid file descriptor (one that's already closed) being referenced for writing in the subprocess that's spawned to feed the festival output to the channel, app_festival blocks on trying to send voice data to the connected channel. This kills the Asterisk session completely.

The attached patch fixes the issue and adds some debugging statements to app_festival for checking that it now works.
Comments:By: Leif Madsen (lmadsen) 2010-03-24 11:45:49

Thanks for the patch! I'd suggest highly that you place this on the reviewboard as well.

By: David Leonard (dleonard0) 2010-07-05 19:43:31

For the sake of others searching for this fix, the symptoms are the following logs

> pbx.c: Launching 'Festival'
> config.c: Parsing /etc/asterisk/festival.conf
> app_festival.c: Text passed to festival server : blah blah blah
> app_festival.c: Passing text to festival...
> app_festival.c: Passing data to channel...
> app_festival.c: Festival WV command
(thread then hangs)

By: Gabriel Martinez (gmartinez) 2010-07-14 18:15:37

Hi, i'm newbie in linux and asterisk, i have this problem, please can someone tell me how to apply the patch to app_festival.c thanks

By: Gabriel Martinez (gmartinez) 2010-07-14 18:56:38

Hi, solved!!!, thanks for the patch

By: Digium Subversion (svnbot) 2010-08-30 17:27:07

Repository: asterisk
Revision: 284280

U   branches/1.6.2/apps/app_festival.c

------------------------------------------------------------------------
r284280 | tilghman | 2010-08-30 17:27:07 -0500 (Mon, 30 Aug 2010) | 11 lines

Fix 3 coding errors:
 1) After we close FD, we should not be trying to write to it.
 2) Call _exit(0), not exit(0), to avoid running shutdown routines in a child.
 3) Use endian, not processor, detection to ensure bytes are written in the correct order.

(closes issue ASTERISK-14643)
Reported by: modelnine
Patches:
      asterisk-1.6.1.1-festival-debug.patch uploaded by modelnine (license 865)
Tested by: gmartinez

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

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

By: Digium Subversion (svnbot) 2010-08-30 17:28:48

Repository: asterisk
Revision: 284281

_U  branches/1.8/
U   branches/1.8/apps/app_festival.c

------------------------------------------------------------------------
r284281 | tilghman | 2010-08-30 17:28:48 -0500 (Mon, 30 Aug 2010) | 18 lines

Merged revisions 284280 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.6.2

........
 r284280 | tilghman | 2010-08-30 17:27:06 -0500 (Mon, 30 Aug 2010) | 11 lines
 
 Fix 3 coding errors:
   1) After we close FD, we should not be trying to write to it.
   2) Call _exit(0), not exit(0), to avoid running shutdown routines in a child.
   3) Use endian, not processor, detection to ensure bytes are written in the correct order.
 
 (closes issue ASTERISK-14643)
  Reported by: modelnine
  Patches:
        asterisk-1.6.1.1-festival-debug.patch uploaded by modelnine (license 865)
  Tested by: gmartinez
........

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

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

By: Digium Subversion (svnbot) 2010-08-30 17:30:10

Repository: asterisk
Revision: 284282

_U  trunk/
U   trunk/apps/app_festival.c

------------------------------------------------------------------------
r284282 | tilghman | 2010-08-30 17:30:10 -0500 (Mon, 30 Aug 2010) | 25 lines

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

................
 r284281 | tilghman | 2010-08-30 17:28:47 -0500 (Mon, 30 Aug 2010) | 18 lines
 
 Merged revisions 284280 via svnmerge from
 https://origsvn.digium.com/svn/asterisk/branches/1.6.2
 
 ........
   r284280 | tilghman | 2010-08-30 17:27:06 -0500 (Mon, 30 Aug 2010) | 11 lines
   
   Fix 3 coding errors:
     1) After we close FD, we should not be trying to write to it.
     2) Call _exit(0), not exit(0), to avoid running shutdown routines in a child.
     3) Use endian, not processor, detection to ensure bytes are written in the correct order.
   
   (closes issue ASTERISK-14643)
    Reported by: modelnine
    Patches:
          asterisk-1.6.1.1-festival-debug.patch uploaded by modelnine (license 865)
    Tested by: gmartinez
 ........
................

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

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