Segfault in app_dial.c

We are running Asterisk 16.3.0 in Ubuntu 16.04.5 LTS (Xenial Xerus) and got Segmentation fault error below.
Does anyone have any idea?

!@!@!@! brief.txt !@!@!@!

$2 = {si_signo = 11, si_errno = 0, si_code = 1, _sifields = {_pad = {33564, 0 <repeats 27 times>}, _kill = {si_pid = 33564, si_uid = 0}, _timer = {si_tid = 33564, si_overrun = 0, si_sigval = {sival_int = 0, sival_ptr = 0x0}}, _rt = {si_pid = 33564, si_uid = 0, si_sigval = {sival_int = 0, sival_ptr = 0x0}}, _sigchld = {si_pid = 33564, si_uid = 0, si_status = 0, si_utime = 0, si_stime = 0}, _sigfault = {si_addr = 0x831c, _addr_lsb = 0, _addr_bnd = {_lower = 0x0, _upper = 0x0}}, _sigpoll = {si_band = 33564, si_fd = 0}}}
Signal        Stop	Print	Pass to program	Description
SIGSEGV       Yes	Yes	Yes		Segmentation fault

Thread 244 (Thread 0x7f7963da3700 (LWP 6154)):
#0  0x00007f7a1d02e74d in poll () at ../sysdeps/unix/syscall-template.S:84
#1  0x000000000049ea9c in poll (__timeout=337638, __nfds=7, __fds=0x7f7963d9c640) at /usr/include/x86_64-linux-gnu/bits/poll2.h:46
#2  ast_waitfor_nandfds (c=0x7f7963d9cc70, n=2, fds=0x0, nfds=0, exception=0x0, outfd=0x0, ms=0x7f7963d9d7cc) at channel.c:3049
#3  0x000000000049ef84 in ast_waitfor_n (c=c@entry=0x7f7963d9cc70, n=<optimized out>, ms=ms@entry=0x7f7963d9d7cc) at channel.c:3125
#4  0x00007f79c5d74395 in wait_for_answer (in=in@entry=0x7f799002f430, out_chans=out_chans@entry=0x7f7963d9d7f0, to=to@entry=0x7f7963d9d7cc, peerflags=peerflags@entry=0x7f7963d9e350, opt_args=opt_args@entry=0x7f7963d9db60, pa=pa@entry=0x7f7963d9dc00, num_in=0x7f7963d9d810, result=0x7f7963d9d7d4, dtmf_progress=0x0, ignore_cc=1, forced_clid=0x7f7963d9d830, stored_clid=0x7f7963d9d880) at app_dial.c:1247
#5  0x00007f79c5d786bc in dial_exec_full (chan=0x7f799002f430, data=<optimized out>, peerflags=peerflags@entry=0x7f7963d9e350, continue_exec=continue_exec@entry=0x0) at app_dial.c:2757
#6  0x00007f79c5d7b346 in dial_exec (chan=<optimized out>, data=<optimized out>) at app_dial.c:3243
#7  0x000000000053210d in pbx_exec (c=c@entry=0x7f799002f430, app=app@entry=0x1604620, data=0x7f7963d9f33a "SIP/0797876377@circuit_103,360,tTU(answered^9edc1d86-d241-43a6-a188-4bcaa7a499c9^301)") at pbx_app.c:492
#8  0x00007f79b34cbcf5 in handle_exec (chan=0x7f799002f430, agi=0x7f7963d9ea00, argc=3, argv=0x7f7963d9e4e0) at res_agi.c:3138
#9  0x00007f79b34ceca8 in agi_handle_command (chan=<optimized out>, agi=agi@entry=0x7f7963d9ea00, buf=buf@entry=0x7f7963d9f330 "EXEC", dead=0) at res_agi.c:4046
#10 0x00007f79b34cfca6 in run_agi (argv=<optimized out>, argc=<optimized out>, dead=0, status=0x7f7963d9e9f4, pid=-1, agi=0x7f7963d9ea00, request=0x7f7963d9e940 "agi://127.0.0.1/out", chan=0x7f799002f430) at res_agi.c:4238
#11 agi_exec_full (chan=0x7f799002f430, data=<optimized out>, enhanced=<optimized out>, dead=<optimized out>) at res_agi.c:4524
#12 0x000000000053210d in pbx_exec (c=c@entry=0x7f799002f430, app=app@entry=0x2c37ef0, data=data@entry=0x7f7963da0c30 "agi://127.0.0.1/out") at pbx_app.c:492
#13 0x000000000052589b in pbx_extension_helper (c=c@entry=0x7f799002f430, context=0x7f799002fdf0 "common_out", exten=exten@entry=0x7f799002fe40 "0797876377", priority=priority@entry=16, label=label@entry=0x0, callerid=callerid@entry=0x7f799018fb80 "mesh0100100660002201", action=E_SPAWN, found=0x7f7963da2cdc, combined_find_spawn=1, con=0x0) at pbx.c:2927


---------OMMIT------------
---------OMMIT------------

#5  0x00007f79c5d786bc in dial_exec_full (chan=0x7f799002f430, data=<optimized out>, peerflags=peerflags@entry=0x7f7963d9e350, continue_exec=continue_exec@entry=0x0) at app_dial.c:2757
        res = <optimized out>
        rest = 0x0
        cur = <optimized out>
        out_chans = {first = 0x7f7998011080, last = 0x7f7998011080}
        outgoing = <optimized out>
        tmp = <optimized out>
        peer = <optimized out>
        to = 337638
        num = {chan = 0x7f799002f430, busy = 0, congestion = 0, nochan = 0}
        cause = 0
        config = {features_caller = {flags = 0}, features_callee = {flags = 0}, start_time = {tv_sec = 0, tv_usec = 0}, nexteventts = {tv_sec = 0, tv_usec = 0}, feature_start_time = {tv_sec = 0, tv_usec = 0}, feature_timer = 0, timelimit = 0, play_warning = 0, warning_freq = 0, warning_sound = 0x0, end_sound = 0x0, start_sound = 0x0, flags = 0, end_bridge_callback = 0x0, end_bridge_callback_data = 0x0, end_bridge_callback_data_fixup = 0x0}
        calldurationlimit = {tv_sec = 0, tv_usec = 0}
        dtmfcalled = 0x0
        dtmfcalling = 0x0
        dtmf_progress = 0x0
        pa = {sentringing = 1, privdb_val = 0, privcid = '000' <repeats 255 times>, privintro = '000' <repeats 1023 times>, status = "NOANSWER000GS", '000' <repeats 244 times>}
        sentringing = 0
        moh = 0
        outbound_group = 0x0
        result = 0
        parse = <optimized out>
        opermode = 0
        delprivintro = 0
        args = {argc = 3, argv = 0x7f7963d9db38, peers = 0x7f7963d9d6c0 "SIP", timeout = 0x7f7963d9d6db "360", options = 0x7f7963d9d6df "tTU(answered^9edc1d86-d241-43a6-a188-4bcaa7a499c9^301", url = 0x0}
        opts = {flags = 270008320}
        opt_args = {0x7f7963d9dc18 "", 0x7f7900000000 <error: Cannot access memory at address 0x7f7900000000>, 0x0, 0x7f7963d9dc30 "", 0x0, 0x7f7963d9dc40 "", 0x0, 0x7f7963d9d6e3 "answered^9edc1d86-d241-43a6-a188-4bcaa7a499c9^301", 0x0, 0x7f7900000000 <error: Cannot access memory at address 0x7f7900000000>, 0x7f7963d9dc40 "", 0x7f7900000000 <error: Cannot access memory at address 0x7f7900000000>, 0x7f790000000a <error: Cannot access memory at address 0x7f790000000a>, 0x1 <error: Cannot access memory at address 0x1>, 0x7f7963d9e077 "", 0xc <error: Cannot access memory at address 0xc>, 0x7f79b34d1517 "n", 0x100000000 <error: Cannot access memory at address 0x100000000>, 0x7f7963d9dc90 "", 0x0}
        num_dialed = <optimized out>
        ignore_cc = 1
        device_name = "SIP/0797876377@circuit_103000331323324,233P326v231y177000000070024264230y177000000220342331cy177000000n000000000000000000000310342331cy177000000340343r220y177000"
        forced_clid_name = "P357333002000000000000205cW000000000000000311_f", '000' <repeats 13 times>, "270316251001000000000000v245b000002000000000002000000000000000000000225000000000000000000000UPf000000000000000v245b000000000000"
        stored_clid_name = "000000000000000000000000 000000230y177000000020000000000000000000000260yP000000000000000P326v231y177000000060f332cy177000000060364002220y177000000312}373034z177000000h177303002000000000000@$257001000000000"
        force_forwards_only = <optimized out>
        forced_clid = {name = {str = 0x0, char_set = 1, presentation = 0, valid = 0 '000'}, number = {str = 0x0, plan = 0, presentation = 1, valid = 0 '000'}, subaddress = {str = 0x0, type = 0, odd_even_indicator = 0 '000', valid = 0 '000'}, tag = 0x0}
        stored_clid = {name = {str = 0x0, char_set = 1, presentation = 0, valid = 0 '000'}, number = {str = 0x7f7963d9d640 "0797876377", plan = 0, presentation = 0, valid = 1 '001'}, subaddress = {str = 0x0, type = 0, odd_even_indicator = 0 '000', valid = 0 '000'}, tag = 0x0}
        caller = {id = {name = {str = 0x0, char_set = 1, presentation = 0, valid = 0 '000'}, number = {str = 0x7f7963d9d640 "0797876377", plan = 0, presentation = 0, valid = 1 '001'}, subaddress = {str = 0x0, type = 0, odd_even_indicator = 0 '000', valid = 0 '000'}, tag = 0x0}, ani = {name = {str = 0x0, char_set = 1, presentation = 0, valid = 0 '000'}, number = {str = 0x0, plan = 0, presentation = 0, valid = 0 '000'}, subaddress = {str = 0x0, type = 0, odd_even_indicator = 0 '000', valid = 0 '000'}, tag = 0x0}, priv = {name = {str = 0x0, char_set = 1, presentation = 0, valid = 0 '000'}, number = {str = 0x0, plan = 0, presentation = 0, valid = 0 '000'}, subaddress = {str = 0x0, type = 0, odd_even_indicator = 0 '000', valid = 0 '000'}, tag = 0x0}, ani2 = 0}
        max_forwards = <optimized out>
        __PRETTY_FUNCTION__ = "dial_exec_full"

---------OMMIT------------

That thread doesn’t appear to be the problem. Another would be.

Correction. This wasn’t a case of a secondary fault but was simply the backtrace for the wrong thread was provided. I think the crashing thread is normall number 1 in the backtrace.

The crash occurred as a result of a Websocket being destroyed. I’d suggest upgrading to the latest version and if the problem still occurs then filing an issue[1] with full details.

[1] https://issues.asterisk.org/jira

Got it. I will try to upgrade.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.