[asterisk-bugs] [Asterisk 0017425]: Segfault after launching JACK_HOOK from AMI

Asterisk Bug Tracker noreply at bugs.digium.com
Tue Aug 10 16:07:56 CDT 2010


A NOTE has been added to this issue. 
====================================================================== 
https://issues.asterisk.org/view.php?id=17425 
====================================================================== 
Reported By:                Motiejus
Assigned To:                russell
====================================================================== 
Project:                    Asterisk
Issue ID:                   17425
Category:                   Applications/app_jack
Reproducibility:            always
Severity:                   crash
Priority:                   normal
Status:                     acknowledged
Target Version:             1.6.2.12
Asterisk Version:           SVN 
JIRA:                       SWP-1616 
Regression:                 No 
Reviewboard Link:            
SVN Branch (only for SVN checkouts, not tarball releases): N/A 
SVN Revision (number only!):  
Request Review:              
====================================================================== 
Date Submitted:             2010-05-31 06:52 CDT
Last Modified:              2010-08-10 16:07 CDT
====================================================================== 
Summary:                    Segfault after launching JACK_HOOK from AMI
Description: 
Setting JACK_HOOK channel variable from AMI leads to asterisk segfault.
However, setting JACK_HOOK from command line works OK:
When the call is started:
*CLI> dialplan set chanvar $stuff{Channel}
JACK_HOOK(manipulate,n,i(rec_$uniq:input),o(rec_$uniq:output),c(rec_$uniq))
on

works, but the same in AMI:

Action: Setvar
Channel: $stuff{Channel}
Variable:
JACK_HOOK(manipulate,n,i(rec_$uniq:input),o(rec_$uniq:output),c(rec_$uniq))
Value: on

throws segmentation fault for asterisk. Trace of connecting the call:

<snip>
[New Thread 0x2b9a16c5e910 (LWP 32621)]
    -- Executing [123456 at NPDB2:73] Monitor("SIP/1001-00000000",
"wav,myfilename") in new stack
    -- Executing [123456 at NPDB2:74] Set("SIP/1001-00000000", "DialTo=PBX2")
in new stack
    -- Executing [123456 at NPDB2:75] NoOp("SIP/1001-00000000", "PBX2") in
new stack
    -- Executing [123456 at NPDB2:76] NoOp("SIP/1001-00000000",
"SIP/1001-00000000") in new stack
    -- Executing [123456 at NPDB2:77] Dial("SIP/1001-00000000",
"SIP/PBX2/000123456,60,M(connect-jack,741586)") in new stack
  == Using SIP RTP CoS mark 5
    -- Called PBX2/000123456
  == Begin MixMonitor Recording SIP/1001-00000000
    -- SIP/PBX2-00000001 is ringing
[New Thread 0x2b9a1745f910 (LWP 32742)]

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x2b9a16aea910 (LWP 32607)]
0x00002b9a07d4718a in jack_activate (client=0xca23d0) at client.c:1985
1985			buf[i] = (char) (i & 0xff);
(gdb)
</snip>

It is not a problem if Jack (I suppose), because same from Dialplan and
asterisk CLI works fine.
====================================================================== 

---------------------------------------------------------------------- 
 (0125779) russell (administrator) - 2010-08-10 16:07
 https://issues.asterisk.org/view.php?id=17425#c125779 
---------------------------------------------------------------------- 
I just tried to reproduce this (using my own script that uses AMI SetVar),
and was unable to make it crash.  Could you try running Asterisk under
valgrind and see if you can get some better debug output?  See
doc/valgrind.txt for some more information on that.  Also, make sure you
try the latest version of Asterisk. 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2010-08-10 16:07 russell        Note Added: 0125779                          
======================================================================




More information about the asterisk-bugs mailing list