[asterisk-bugs] [JIRA] (ASTERISK-27887) func_channel: Accessing CHANNEL(pjsip, call-id) may crash if the channel hangs up.

Richard Mudgett (JIRA) noreply at issues.asterisk.org
Fri Jun 1 12:55:55 CDT 2018


     [ https://issues.asterisk.org/jira/browse/ASTERISK-27887?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Richard Mudgett updated ASTERISK-27887:
---------------------------------------

    Summary: func_channel: Accessing CHANNEL(pjsip,call-id) may crash if the channel hangs up.  (was: PJSIP will occasional crash asterisk)

> func_channel: Accessing CHANNEL(pjsip,call-id) may crash if the channel hangs up.
> ---------------------------------------------------------------------------------
>
>                 Key: ASTERISK-27887
>                 URL: https://issues.asterisk.org/jira/browse/ASTERISK-27887
>             Project: Asterisk
>          Issue Type: Bug
>      Security Level: None
>          Components: Functions/func_channel, Resources/res_hep_rtcp
>    Affects Versions: 13.18.5
>         Environment: Ubuntu 16.04.4 LTS
> Linux 4.4.0-119-generic
>            Reporter: art
>            Assignee: Unassigned
>              Labels: pjsip
>         Attachments: callid-bt-full.txt
>
>
> I save outgoing sipcallid of PJSIP channel with following dialplan:
> {noformat}
> exten => _+X.,n,Dial(PJSIP/1000@$1.2.3.4,,b(set-callidpvt^s^1))
> [set-callidpvt]
> exten => s,1,NoOp(Set callidpvt)
> same => n,Set(MASTER_CHANNEL(CDR(sipcallidpvt))=${CHANNEL(pjsip,call-id)})
> same => n,Return()
> {noformat}
> This crashes asterisk about once in a week in system with 45000 calls per day. Backtrace shows:
> {noformat}
> #0  0x00007f0351e69428 in __GI_raise (sig=sig at entry=6) at ../sysdeps/unix/sysv/linux/raise.c:54
> #1  0x00007f0351e6b02a in __GI_abort () at abort.c:89
> #2  0x00007f0351e61bd7 in __assert_fail_base (fmt=<optimized out>, 
>     assertion=assertion at entry=0x7f02eca7fa70 "!\"Calling pjlib from unknown/external thread. You must \" \"register external threads with pj_thread_register() \" \"before calling any pjlib functions.\"", file=file at entry=0x7f02eca7f8d3 "../src/pj/os_core_unix.c", line=line at entry=692, 
>     function=function at entry=0x7f02eca7fd08 "pj_thread_this") at assert.c:92
> #3  0x00007f0351e61c82 in __GI___assert_fail (
>     assertion=0x7f02eca7fa70 "!\"Calling pjlib from unknown/external thread. You must \" \"register external threads with pj_thread_register() \" \"before calling any pjlib functions.\"", file=0x7f02eca7f8d3 "../src/pj/os_core_unix.c", line=692, function=0x7f02eca7fd08 "pj_thread_this") at assert.c:101
> {noformat}
> My guess is that outgoing pjsip channel is closed/destroyed by some reason before channel sipcallid is read.



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



More information about the asterisk-bugs mailing list