[asterisk-bugs] [JIRA] (ASTERISK-20590) Frequent outgoing gtalk failure resulting in 100% CPU usage

Aaron Sells (JIRA) noreply at issues.asterisk.org
Mon Oct 22 13:07:18 CDT 2012


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

Aaron Sells commented on ASTERISK-20590:
----------------------------------------

Some more relevant output during an outgoing gtalk failure:

{code}
[2012-10-22 12:27:06] VERBOSE[32353] res_jabber.c: 
JABBER: XXXXXXXXXXX INCOMING: <iq from="+1YYYYYYYYYY at voice.google.com/srvres-MTAuMjI3LjEwLjY1Ojk4MjM=" to="XXXXXXXXXXX at gmail.com/TalkEE5BA039" type="error" id="aaabk"><session type="candidates" id="0ae63d5f69da90ec" initiator="XXXXXXXXXXX at gmail.com/TalkEE5BA039" xmlns="http://www.google.com/session"><candidate name="rtp" address="192.168.10.100" port="17332" username="15bed0150ef7ac08" password="46753a0f4943ef78" preference="1.00" protocol="udp" type="local" network="0" generation="0"/><transport xmlns="http://www.google.com/transport/p2p"/></session><error code="503" type="cancel"><service-unavailable xmlns="urn:ietf:params:xml:ns:xmpp-stanzas"/><text xmlns="urn:ietf:params:xml:ns:xmpp-stanzas">status=APPLICATION_ERROR</text></error></iq>
{code}

It appears that others are seeing this 503 error as well:
https://www.obitalk.com/forum/index.php?topic=4400.0
http://productforums.google.com/forum/#!search/reason$20503/voice/9DToDQ1516E/N_moG_jAkuMJ

For now, I've modified chan_gtalk.c to hangup when it sees all error types.  At least this way my system stays usable even when the outgoing gtalk call fails.

{code}
Index: channels/chan_gtalk.c
===================================================================
--- channels/chan_gtalk.c	(revision 375271)
+++ channels/chan_gtalk.c	(working copy)
@@ -2097,6 +2097,8 @@
 
 	if (ast_strlen_zero(iks_find_attrib(pak->query, "type"))) {
 		ast_log(LOG_NOTICE, "No attribute \"type\" found.  Ignoring message.\n");
+	} else if (!strcmp(S_OR(iks_find_attrib(pak->x, "type"), ""), "error")) {
+                gtalk_hangup_farend(client, pak);
 	} else if (!strcmp(iks_find_attrib(pak->query, "type"), "initiate")) {
 		/* New call */
 		gtalk_newcall(client, pak);
{code}
                
> Frequent outgoing gtalk failure resulting in 100% CPU usage
> -----------------------------------------------------------
>
>                 Key: ASTERISK-20590
>                 URL: https://issues.asterisk.org/jira/browse/ASTERISK-20590
>             Project: Asterisk
>          Issue Type: Bug
>      Security Level: None
>          Components: Channels/chan_gtalk
>    Affects Versions: SVN
>         Environment: Ubuntu 12.04, 3.2.0-32-generic #51-Ubuntu SMP Wed Sep 26 21:33:09 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux
>            Reporter: Aaron Sells
>
> Outgoing gtalk calls are frequently failing and end up causing asterisk to use 100% of the CPU. The failed gtalk channel persists in a ringing state until manually hungup (CLI> channel request hangup ...).  CPU usage returns to normal after the channel is hungup.
> {code}
> [2012-10-20 18:25:59] NOTICE[20307] chan_gtalk.c: Remote peer reported an error, trying to establish the call anyway
> [2012-10-20 18:25:59] NOTICE[20307] chan_gtalk.c: Ignoring duplicate call setup on SID 464b8ba140fe824b
> [2012-10-20 18:25:59] VERBOSE[20307] res_jabber.c:
> JABBER: XXXXXXXXXX OUTGOING: <iq type='result' from='XXXXXXXXXX at gmail.com/Talk035182CE' to='+1YYYYYYYYYY at voice.google.com/srvres-MTAuMjI3LjI3LjE5OTo5ODUw' id='aaaad'><error type='cancel'><out-of-order/></error></iq>
> [2012-10-20 18:25:59] VERBOSE[21382][C-00000000] app_dial.c: -- Local/1YYYYYYYYYY at gvoice-XXXXXXXXXX-00000001;1 is ringing
> [2012-10-20 18:25:59] VERBOSE[21351][C-00000000] app_dial.c: -- Local/YYYYYYYYYY at from-internal-00000000;1 is ringing
> [2012-10-20 18:25:59] VERBOSE[20307] res_jabber.c:
> JABBER: XXXXXXXXXX INCOMING: <iq from="+1YYYYYYYYYY at voice.google.com/srvres-MTAuMjI3LjI3LjE5OTo5ODUw" to="XXXXXXXXXX at gmail.com/Talk035182CE" type="error" id="aaaae"><session type="candidates" id="464b8ba140fe824b" initiator="XXXXXXXXXX at gmail.com/Talk035182CE" xmlns="http://www.google.com/session"><candidate name="rtp" address="192.168.10.100" port="11222" username="51864e7a12554dac" password="31e35afd3c445503" preference="1.00" protocol="udp" type="local" network="0" generation="0"/><transport xmlns="http://www.google.com/transport/p2p"/></session><error code="503" type="cancel"><service-unavailable xmlns="urn:ietf:params:xml:ns:xmpp-stanzas"/><text xmlns="urn:ietf:params:xml:ns:xmpp-stanzas">status=APPLICATION_ERROR</text></error></iq>
> [2012-10-20 18:25:59] NOTICE[20307] chan_gtalk.c: Remote peer reported an error, trying to establish the call anyway
> [2012-10-20 18:25:59] VERBOSE[20307] res_jabber.c:
> JABBER: XXXXXXXXXX OUTGOING: <iq type='result' from='XXXXXXXXXX at gmail.com/Talk035182CE' to='+1YYYYYYYYYY at voice.google.com/srvres-MTAuMjI3LjI3LjE5OTo5ODUw' id='aaaae'/>
> [2012-10-20 18:26:01] WARNING[21382][C-00000000] channel.c: Exceptionally long voice queue length queuing to Local/1YYYYYYYYYY at gvoice-XXXXXXXXXX-00000001;2
> [2012-10-20 18:26:02] WARNING[21382][C-00000000] channel.c: Exceptionally long voice queue length queuing to Local/1YYYYYYYYYY at gvoice-XXXXXXXXXX-00000001;2
> [2012-10-20 18:26:03] WARNING[21382][C-00000000] channel.c: Exceptionally long voice queue length queuing to Local/1YYYYYYYYYY at gvoice-XXXXXXXXXX-00000001;2
> [2012-10-20 18:26:05] WARNING[21382][C-00000000] channel.c: Exceptionally long voice queue length queuing to Local/1YYYYYYYYYY at gvoice-XXXXXXXXXX-00000001;2
> [2012-10-20 18:26:06] WARNING[21382][C-00000000] channel.c: Exceptionally long voice queue length queuing to Local/1YYYYYYYYYY at gvoice-XXXXXXXXXX-00000001;2
> {code}
> {code}
> exten => _X.,1,Dial(Gtalk/XXXXXXXXXX/+${EXTEN}@voice.google.com)
> exten => _X.,n,Noop(GVoice Call to ${EXTEN} failed)
> exten => h,1,Macro(hangupcall,)
> {code}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira



More information about the asterisk-bugs mailing list