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

abelbeck (JIRA) noreply at issues.asterisk.org
Wed Jul 17 10:13:47 CDT 2019


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

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

Update:

Our project just upgraded to OpenSSL 1.1.1, as such our previous iksemel 1.5 no longer compiles with native openssl support, so our project reverted to iksemel 1.4 (with Debian patches) without any native SSL support (we don't include GNUTLS).

Given these new OpenSSL and iksemel versions, I gave this issue another look...
Sadly, no change, same segfault in the newer libssl.so.1.1
{noformat}
asterisk[9775]: segfault at 2adf30021000 ip 00002adf1f066aa9 sp 00002adf1e23d920 error 4 in libssl.so.1.1[2adf1f046000+71000]
{noformat}

BTW, please correct me if I am wrong, but Asterisk does not use any native "iksemel" SSL support, but rather Asterisk wraps iksemel with OpenSSL when needed.  As for use in Asterisk, iksemel does not need to be built with any SSL support.

Sorry I can't provide a usable backtrace.  Feel free to close this issue, or keep it open for users with the same issue that can provide a backtrace.


> 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: Unassigned
>            Severity: Minor
>              Labels: patch
>         Attachments: asterisk-13-res_mwi_devstate-load-order-fix.patch, asterisk-13-xmpp-fix.patch, config.log, menuselect.makeopts
>
>
> 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