[asterisk-bugs] [JIRA] (ASTERISK-28384) res_xmpp: Crash when distribute_events=yes and res_mwi_devstate loads

abelbeck (JIRA) noreply at issues.asterisk.org
Mon Apr 15 07:30:47 CDT 2019


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

abelbeck commented on ASTERISK-28384:
-------------------------------------

Hi Joshua, are you stopping and starting asterisk ever few seconds as I noted in the Description ?

Over the years differences in XMPP servers has caused a crash in Asterisk (now fixed in prosody), but given that res_xmpp has not changed in awhile, I'm thinking a startup interaction with the new res_mwi_devstate should be the focus.

{quote}
Can you reproduce this on a non-embedded system and get a backtrace?
{quote}
Sorry, no.


> res_xmpp: Crash when distribute_events=yes and res_mwi_devstate loads
> ---------------------------------------------------------------------
>
>                 Key: ASTERISK-28384
>                 URL: https://issues.asterisk.org/jira/browse/ASTERISK-28384
>             Project: Asterisk
>          Issue Type: Bug
>      Security Level: None
>          Components: Resources/res_mwi_devstate, Resources/res_xmpp
>    Affects Versions: 13.26.0, 16.3.0
>         Environment: AstLinux 1.3.x development
> Linux 3.16.64 x86_64
> XMPP server via prosody 0.10.3
>            Reporter: abelbeck
>            Assignee: abelbeck
>            Severity: Minor
>
> When Asterisk starts, typically every 2-20 times it will either segfault:
> {noformat}
> asterisk[2408]: segfault at 2b6ce0021000 ip 00002b6cc88b8f91 sp 00002b6ccababb70 error 4 in libssl.so.1.0.0[2b6cc8892000+57000]
> {noformat}
> or generate a syslog:
> {noformat}
> WARNING[3061]: res_xmpp.c:3870 in xmpp_client_thread: [asterisk] Socket read error
> {noformat}
> *What I know:*
> Only effects Asterisk 13.26.0 / 16.3.0 with res_mwi_devstate.so allowed to load *and* res_xmpp.so configured with "distribute_events=yes".  If either "noload=>res_mwi_devstate.so" or "distribute_events=no" the crash never occurs.
> *What I suspect:*
> Looking at this code:
> {noformat}
> res_xmpp.c: xmpp_init_event_distribution()
> res_mwi_devstate.c: load_module()
> {noformat}
> There may be some startup race condition or interaction that causes the problem.
> I tested using this shell command on our system:
> {noformat}
> while true; do service asterisk stop ; sleep 2 ; rm /var/log/asterisk/full ; service asterisk init ; sleep 4 ; grep 'asterisk.*seg' /var/log/messages; done
> {noformat}
> A crash will occur within a minute or two with the above test script.
> *What I can do:*
> If you have a patch to test, I'll be happy to give it a try, given how hard it may be to reproduce this given the XMPP pubsub environment. 
> *What I can't do:*
> Sorry, with our stripped binary embedded system, I can't offer any 'gdb' backtrace help.



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



More information about the asterisk-bugs mailing list