[asterisk-bugs] [JIRA] (ASTERISK-28034) chan_sip unstable with TLS after asterisk start or reloads
Friendly Automation (JIRA)
noreply at issues.asterisk.org
Mon Sep 24 10:47:54 CDT 2018
[ https://issues.asterisk.org/jira/browse/ASTERISK-28034?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=244943#comment-244943 ]
Friendly Automation commented on ASTERISK-28034:
------------------------------------------------
Change 10040 merged by George Joseph:
chan_sip.c: chan_sip unstable with TLS after asterisk start or reloads
[https://gerrit.asterisk.org/10040|https://gerrit.asterisk.org/10040]
> 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
> 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