[asterisk-bugs] [JIRA] (ASTERISK-29882) Occasional segfaults in production

Kevin Harwell (JIRA) noreply at issues.asterisk.org
Thu Jan 27 12:00:07 CST 2022


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

Kevin Harwell commented on ASTERISK-29882:
------------------------------------------

Also as a note (I'm not sure if this would be the actual fix to this problem or the entire fix) it appears a NULL check on the {{snoop->spyee_chan}} is warranted before trying to access it in {{publish_chanspy_message}}. Given the backtrace on this issue it does appear that there are path(s) in which {{snoop->spyee_chan}} could be NULL in that function.

For instance, here in this backtrace that function is called from {{stasis_app_control_snoop}} before the {{snoop->spyee_chan}} is set.

That said the call to {{ao2_alloc_options}} should have NULL'ed that field out, and given current information it appears though that {{snoop->spyee_chan}}  might be pointing to "junk".

> Occasional segfaults in production
> ----------------------------------
>
>                 Key: ASTERISK-29882
>                 URL: https://issues.asterisk.org/jira/browse/ASTERISK-29882
>             Project: Asterisk
>          Issue Type: Bug
>      Security Level: None
>          Components: General
>    Affects Versions: 18.8.0
>         Environment: Debian Stretch in Docker
>            Reporter: Duncan
>            Assignee: Unassigned
>            Severity: Critical
>         Attachments: coreFile-thread1.txt, Screenshot from 2021-12-20 09-09-29.png
>
>
> Hi team,
> We are seeing Asterisk instances occasionally segfault in production. This happens in our voicemail handling stasis app, which includes playing media to the caller, and then recording the caller, managed through ARI. We don't know what the steps are to reproduce the issue as we have never reproduced it ourselves, but suspect it is probably some kind of race condition.
> I have attached coreFile-thread1.txt from the core dump. We have all the other core dump *.txt files but would prefer not to post these publicly in case they could contain any sensitive data. I would be happy to provide these directly to a maintainer via email. We’re happy to assist debugging this issue if at all possible, and have some C experience but no experience working on Asterisk. Please get in touch if we can do anything to help troubleshoot further.
> Many thanks



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



More information about the asterisk-bugs mailing list