[asterisk-bugs] [JIRA] (ASTERISK-25371) Crash in hangup at chan_pjsip.c:1749 when Asterisk attempts to generate hangup event

Abhay Gupta (JIRA) noreply at issues.asterisk.org
Tue Jun 4 01:35:47 CDT 2019


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

Abhay Gupta commented on ASTERISK-25371:
----------------------------------------

Got the same issue again with latest asterisk . Seems some problem is there . Just wondering in chan_pjsip.c in static int hangup why there is no check for NULL

struct hangup_data *h_data = data;
        struct ast_channel *ast = h_data->chan;
        struct ast_sip_channel_pvt *channel = ast_channel_tech_pvt(ast);
        struct ast_sip_session *session = channel->session;
        int cause = h_data->cause;

what could be the reason for channel to be NULL in which case we get segfault when we try to get channel->session from a NULL pointer ?

> Crash in hangup at chan_pjsip.c:1749 when Asterisk attempts to generate hangup event
> ------------------------------------------------------------------------------------
>
>                 Key: ASTERISK-25371
>                 URL: https://issues.asterisk.org/jira/browse/ASTERISK-25371
>             Project: Asterisk
>          Issue Type: Bug
>      Security Level: None
>          Components: Channels/chan_pjsip
>    Affects Versions: 13.5.0
>         Environment: Linux ubuntu 3.16.0-30-generic #40~14.04.1-Ubuntu SMP Thu Jan 15 17:43:14 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux
>            Reporter: Abhay Gupta
>         Attachments: 8sep.txt, first.txt, fourth.txt, full.txt, full.txt, putty1.log, second.txt, succ_fail.txt, third.txt
>
>
> Asterisk frequently crashes in hangup function of chan_pjsip.c at line chan_pjsip.c:1749
> #0  0x00007f8413ab2d42 in hangup (data=0x7f84840b17e8) at chan_pjsip.c:1749
> and it looks like that channel is NULL
> #0  0x00007f8413ab2d42 in hangup (data=0x7f84840b17e8) at chan_pjsip.c:1749
>         h_data = 0x7f84840b17e8
>         ast = 0x7f8484003cb8
>         channel = 0x0
>         pvt = 0x7f8448905bb0
>         session = 0x7f848402a2e0
>         cause = 0
> All the coredumps with bt , bt full and thread apply all bt is attached 



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



More information about the asterisk-bugs mailing list