[asterisk-bugs] [JIRA] (ASTERISK-27381) Crash inside opus codec

Torrey Searle (JIRA) noreply at issues.asterisk.org
Fri Nov 10 02:17:28 CST 2017


    [ https://issues.asterisk.org/jira/browse/ASTERISK-27381?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=239943#comment-239943 ] 

Torrey Searle commented on ASTERISK-27381:
------------------------------------------

The crash is a result of failure to initialise the codec.  The codec fails to initialize  because of no value set for application.

Application is not getting set (not even to a default) because codec_opus_config_attr_cfg somewhere between line 62 and 69 sets cfg to null

{noformat}
Breakpoint 1, codec_opus_config_attr_cfg (fmt=0x7fffdc014588) at codec_opus_config.c:62
62	codec_opus_config.c: No such file or directory.
(gdb) print *fmt
$1 = {name = 0x620429 "opus", codec = 0x11e51b8, attribute_data = 0x7fffdc0145b0, interface = 0x7fffc9c3b4c0 <opus_interface>}
(gdb) info locals
cfg = 0x7fffd0053300
__PRETTY_FUNCTION__ = "codec_opus_config_attr_cfg"
(gdb) next
66	in codec_opus_config.c
(gdb) next
[New Thread 0x7fffa37f5700 (LWP 21948)]
[New Thread 0x7fffa38ed700 (LWP 21946)]
[New Thread 0x7fffa3871700 (LWP 21947)]
[New Thread 0x7fffa3779700 (LWP 21949)]
[Thread 0x7fffc7448700 (LWP 21930) exited]
[Thread 0x7fffc7540700 (LWP 21939) exited]
[New Thread 0x7fffa36fd700 (LWP 21952)]
[Thread 0x7fffc75bc700 (LWP 21940) exited]
[New Thread 0x7fffa3681700 (LWP 21953)]
[Thread 0x7fffa39e5700 (LWP 21943) exited]
[New Thread 0x7fffa39e5700 (LWP 21954)]
[Thread 0x7fffa37f5700 (LWP 21948) exited]
[Thread 0x7fffa3779700 (LWP 21949) exited]
69	in codec_opus_config.c
(gdb) info locals
cfg = 0x0
__PRETTY_FUNCTION__ = "codec_opus_config_attr_cfg"
(gdb) next
[Thread 0x7fffc74c4700 (LWP 21938) exited]
70	in codec_opus_config.c
(gdb) info locals
cfg = 0x0
__PRETTY_FUNCTION__ = "codec_opus_config_attr_cfg"
(gdb) next
[New Thread 0x7fffa3779700 (LWP 21956)]
[New Thread 0x7fffc74c4700 (LWP 21955)]
[Thread 0x7fffa3969700 (LWP 21944) exited]
opus_dec_set (pvt=0x7fffd0011210, fmt_src=0x7fffdc014588, fmt_dst=0x11e3f48) at codec_opus.c:264
264	codec_opus.c: No such file or directory.
(gdb) print *pvt
$2 = {t = 0x7fffcdaf1b60 <opustolin>, f = {frametype = AST_FRAME_VOICE, subclass = {integer = 0, format = 0x11e3f48, 
      frame_ending = 0}, datalen = 0, samples = 0, mallocd = 0, mallocd_hdr_len = 0, offset = 64, 
    src = 0x7fffcdaf1b60 <opustolin> "opustolin", data = {ptr = 0x7fffd0011358, uint32 = 3489731416, 
      pad = "X\023\001\320\377\177\000"}, delivery = {tv_sec = 0, tv_usec = 0}, frame_list = {next = 0x0}, flags = 1, 
    ts = 3150328, len = 20, seqno = 20501}, samples = 0, datalen = 0, pvt = 0x7fffd00112f0, outbuf = {c = 0x7fffd0011358 "", 
    uc = 0x7fffd0011358 "", i16 = 0x7fffd0011358, ui8 = 0x7fffd0011358 ""}, plc = 0x0, next = 0x0, nextin = {tv_sec = 1509618132, 
    tv_usec = 716600}, nextout = {tv_sec = 1509618132, tv_usec = 696600}, explicit_dst = 0x11e3f48}
(gdb) print cfg
$3 = (struct codec_opus_config *) 0x0
(gdb) info locals
dec = 0x7fffd00112f0
sample_rate = 48000
ptime = 0
error = 0
cfg = 0x0
__PRETTY_FUNCTION__ = "opus_dec_set"
{noformat}

> Crash inside opus codec
> -----------------------
>
>                 Key: ASTERISK-27381
>                 URL: https://issues.asterisk.org/jira/browse/ASTERISK-27381
>             Project: Asterisk
>          Issue Type: Bug
>      Security Level: None
>          Components: Codecs/codec_opus
>    Affects Versions: 13.15.1
>            Reporter: Torrey Searle
>            Assignee: Unassigned
>         Attachments: codecs.conf, core.asterisk.ast13sip01-1509443936-11-brief.txt, core.asterisk.ast13sip01-1509443936-11-full.txt, core.asterisk.ast13sip01-1509443936-11-locks.txt, core.asterisk.ast13sip01-1509443936-11-thread1.txt
>
>
> Crash has been detected on our WEBRTC platform inside the opus codec version 1.1.0 attached is the backtrace
> {noformat}
> #0  0x00007f0102b5c642 in ?? () from /usr/lib/asterisk/modules/codec_opus-13.0_1.1.0-x86_64.so
> #1  0x00007f0102b50f26 in ?? () from /usr/lib/asterisk/modules/codec_opus-13.0_1.1.0-x86_64.so
> #2  0x00000000005dd38e in framein (f=<optimized out>, pvt=<optimized out>) at translate.c:423
> #3  ast_translate (path=0x7f00ec02cdd0, f=0x7f0030004560, consume=0) at translate.c:573
> #4  0x00000000004b9c3c in ast_write (chan=0x7f008837fec0, fr=0x7f0030004560) at channel.c:5290
> #5  0x00000000004822ea in bridge_channel_handle_write (bridge_channel=<optimized out>) at bridge_channel.c:2346
> #6  bridge_channel_wait (bridge_channel=<optimized out>) at bridge_channel.c:2593
> #7  bridge_channel_internal_join (bridge_channel=0x7f00ec0080b0) at bridge_channel.c:2728
> #8  0x000000000046c3d6 in ast_bridge_join (bridge=bridge at entry=0x7f00ec00d120, chan=chan at entry=0x7f008837fec0, swap=swap at entry=0x0, features=features at entry=0x7f00aab08a10, 
>     tech_args=tech_args at entry=0x0, flags=flags at entry=(AST_BRIDGE_JOIN_PASS_REFERENCE | AST_BRIDGE_JOIN_INHIBIT_JOIN_COLP)) at bridge.c:1713
> #9  0x000000000050536f in ast_bridge_call_with_flags (chan=chan at entry=0x7f008837fec0, peer=peer at entry=0x7f00ec015bf0, config=config at entry=0x7f00aab08e00, flags=flags at entry=0)
>     at features.c:672
> #10 0x0000000000505477 in ast_bridge_call (chan=chan at entry=0x7f008837fec0, peer=peer at entry=0x7f00ec015bf0, config=config at entry=0x7f00aab08e00) at features.c:711
> #11 0x00007f0056643019 in dial_exec_full (chan=0x7f008837fec0, data=<optimized out>, peerflags=peerflags at entry=0x7f00aab09740, continue_exec=continue_exec at entry=0x0)
>     at app_dial.c:3224
> #12 0x00007f0056644126 in dial_exec (chan=<optimized out>, data=<optimized out>) at app_dial.c:3280
> #13 0x0000000000579d5e in pbx_exec (c=c at entry=0x7f008837fec0, app=app at entry=0x2224550, data=data at entry=0x7f00aab09c50 "PJSIP/883510080318 at cnhk1ser,180,b(predial^s^1)")
>     at pbx_app.c:491
> #14 0x000000000056ee41 in pbx_extension_helper (c=0x7f008837fec0, context=0x7f0088380878 "webrtc", exten=0x7f00883808c8 "s", priority=1, label=<optimized out>, 
>     callerid=<optimized out>, action=E_SPAWN, found=0x7f00aab0bcec, combined_find_spawn=1, con=0x0) at pbx.c:2884
> #15 0x0000000000570fd9 in ast_spawn_extension (combined_find_spawn=<optimized out>, found=<optimized out>, callerid=<optimized out>, priority=<optimized out>, 
>     exten=<optimized out>, context=<optimized out>, c=<optimized out>) at pbx.c:4109
> #16 __ast_pbx_run (c=0x7f008837fec0, args=0x7f00ec02cec0, args at entry=0x0) at pbx.c:4286
> #17 0x000000000057251b in pbx_thread (data=data at entry=0x7f008837fec0) at pbx.c:4608
> #18 0x00000000005e2eda in dummy_start (data=<optimized out>) at utils.c:1238
> #19 0x00007f0115bb1064 in start_thread (arg=0x7f00aab0c700) at pthread_create.c:309
> {noformat}



--
This message was sent by Atlassian JIRA
(v6.2#6252)



More information about the asterisk-bugs mailing list