[asterisk-bugs] [JIRA] (ASTERISK-28034) chan_sip unstable with TLS after asterisk start or reloads
Asterisk Team (JIRA)
noreply at issues.asterisk.org
Wed Aug 28 11:59:51 CDT 2019
[ https://issues.asterisk.org/jira/browse/ASTERISK-28034?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Asterisk Team updated ASTERISK-28034:
-------------------------------------
Target Release Version/s: 17.0.0
> chan_sip unstable with TLS after asterisk start or reloads
> ----------------------------------------------------------
>
> Key: ASTERISK-28034
> URL: https://issues.asterisk.org/jira/browse/ASTERISK-28034
> Project: Asterisk
> Issue Type: Bug
> Security Level: None
> Components: Channels/chan_sip/TCP-TLS
> Affects Versions: 15.5.0
> Environment: CentOS 6.9
> Reporter: David Hajek
> Assignee: David Hajek
> Labels: patch
> Target Release: 15.7.0, 16.1.0, 17.0.0
>
> Attachments: chan_sip_tls.patch
>
>
> We are having issue with starting and reloading asterisk with TLS enabled phones. We have about 20 TLS enabled phones and asterisk crashes (core) or hangs in infite loop producing ERROR to full log (see error example below). The errors are generated by the for() loop in _sip_tcp_helper_thread(). I tried to track down the issue and found several issues.
> * in chan_sip.c:function sip_tcptls_write(), there's missing check for tcptls_session->stream is NULL (in Asterisk 13 there was check for file descriptor isn't -1). I think this can be the reason for crashes.
> * in chan_sip.c:sip_tcp_helper_thread() when read of read_pipe[0] failed I go to cleanup code and shutdown the thread. This fixes the infite loops.
> Patch against 15.5.0 attached for someone more experienced with asterisk code to review. I can put it to gerrit, if required.
> Yes, this patch solves the issue for us. Asterisk doesn't crash on start or reloads.
> Example 1 - /var/log/asterisk/full
> {noformat}
> [Aug 14 10:06:27.655] ERROR[32700] chan_sip.c: read() failed: Bad file descriptor
> [Aug 14 10:06:27.655] ERROR[32700] chan_sip.c: read() failed: Bad file descriptor
> [Aug 14 10:06:27.655] ERROR[32700] chan_sip.c: read() failed: Bad file descriptor
> [Aug 14 10:06:27.655] ERROR[32700] chan_sip.c: read() failed: Bad file descriptor
> [Aug 14 10:06:27.655] ERROR[32700] chan_sip.c: read() failed: Bad file descriptor
> .... infite loop
> {noformat}
> Example 2 - /var/log/asterisk/full
> {noformat}
> [Aug 30 23:13:32.337] WARNING[17387] chan_sip.c: TCPTLS thread alert_pipe indicated packet should be sent, but frame_q is empty
> [Aug 30 23:13:32.337] WARNING[17387] chan_sip.c: TCPTLS thread alert_pipe indicated packet should be sent, but frame_q is empty
> [Aug 30 23:13:32.337] WARNING[17387] chan_sip.c: TCPTLS thread alert_pipe indicated packet should be sent, but frame_q is empty
> .... infite loop
> {noformat}
--
This message was sent by Atlassian JIRA
(v6.2#6252)
More information about the asterisk-bugs
mailing list