Bug 33789 - finalising Jingle session too early causes error for unknown session
Summary: finalising Jingle session too early causes error for unknown session
Status: RESOLVED FIXED
Alias: None
Product: Telepathy
Classification: Unclassified
Component: gabble (show other bugs)
Version: git master
Hardware: Other All
: medium normal
Assignee: Telepathy bugs list
QA Contact: Telepathy bugs list
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-01-31 17:15 UTC by Danielle Madeley
Modified: 2012-11-23 18:31 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments

Description Danielle Madeley 2011-01-31 17:15:43 UTC
gabble/media-channel-DEBUG: 01/31/2011 17:33:10.308605: jingle_cb: NAKing with
error: unsupported content transport
wocky-DEBUG: 01/31/2011 17:33:10.308708: _write_node_tree: Serializing tree:
* iq xmlns='jabber:client' type='error'
to='+1XXX@voice.google.com/srvres-MTAuMTc2LjkzLjQyOjk4MTQ='
id='jingle:10.176.93.42-19690681:1:BD0190E6'
    * session xmlns='http://www.google.com/session' type='initiate'
id='SIP726361265@10.176.222.8'
initiator='+1XXX@voice.google.com/srvres-MTAuMTc2LjkzLjQyOjk4MTQ='
        * description xmlns='http://www.google.com/session/phone'
            * payload-type id='0' name='PCMU' clockrate='8000'
            * payload-type id='101' name='telephone-event'
        * transport xmlns='http://www.google.com/transport/raw-udp'
behind-symmetric-nat='false' can-receive-from-symmetric-nat='false'
        * transport xmlns='http://www.google.com/transport/p2p'
        * nick xmlns='http://jabber.org/protocol/nick'
            "Badger Badger"
    * error code='400' type='modify'
        * bad-request xmlns='urn:ietf:params:xml:ns:xmpp-stanzas'
        * text
            "unsupported content transport"
gabble/media-channel-DEBUG: 01/31/2011 17:33:10.308866:
gabble_jingle_session_terminate: we are terminating this session
gabble/media-channel-DEBUG: 01/31/2011 17:33:10.308923: set_state: Setting
state of JingleSession: 0x1c32600 (priv = 0x1c32630) from 0 to 5
gabble/media-channel-DEBUG: 01/31/2011 17:33:10.308979: session_terminated_cb:
removing terminated session with key 437
+1XXX@voice.google.com/srvres-MTAuMTc2LjkzLjQyOjk4MTQ=
SIP726361265@10.176.222.8
gabble/media-channel-DEBUG: 01/31/2011 17:33:10.309027:
gabble_jingle_session_dispose: called
wocky-DEBUG: 01/31/2011 17:33:10.560286: _end_element_ns: Received stanza
* iq xmlns='jabber:client'
from='+1XXX@voice.google.com/srvres-MTAuMTc2LjkzLjQyOjk4MTQ='
to='badger.j.badger@gmail.com/87025897'
id='jingle:10.176.93.42-19690681:1:BD0190E7' type='set'
    * session xmlns='http://www.google.com/session' type='terminate'
id='SIP726361265@10.176.222.8'
initiator='+1XXX@voice.google.com/srvres-MTAuMTc2LjkzLjQyOjk4MTQ='
        * internal-server-error xmlns='http://www.google.com/session/phone'
            "Received error to Jingle stanza"
gabble/media-channel-DEBUG: 01/31/2011 17:33:10.560447: jingle_cb: NAKing with
error: session SIP726361265@10.176.222.8 is unknown
wocky-DEBUG: 01/31/2011 17:33:10.560545: _write_node_tree: Serializing tree:
* iq xmlns='jabber:client' type='error'
to='+1XXX@voice.google.com/srvres-MTAuMTc2LjkzLjQyOjk4MTQ='
id='jingle:10.176.93.42-19690681:1:BD0190E7'
    * session xmlns='http://www.google.com/session' type='terminate'
id='SIP726361265@10.176.222.8'
initiator='+1XXX@voice.google.com/srvres-MTAuMTc2LjkzLjQyOjk4MTQ='
        * internal-server-error xmlns='http://www.google.com/session/phone'
            "Received error to Jingle stanza"
    * error code='404' type='cancel'
        * item-not-found xmlns='urn:ietf:params:xml:ns:xmpp-stanzas'
        * unknown-session xmlns='urn:xmpp:jingle:errors:1'
        * text
            "session SIP726361265@10.176.222.8 is unknown"
Comment 1 Will Thompson 2012-11-23 18:31:39 UTC
        * unknown-session xmlns='urn:xmpp:jingle:errors:1'

This is actually defined by <http://xmpp.org/extensions/xep-0166.html#errors> to mean:

> The 'sid' attribute specifies a session that is unknown to the recipient
> (e.g., no longer live according to the recipient's state machine because
> the recipient previously terminated the session).

<http://xmpp.org/extensions/xep-0166.html#session-terminate> goes so far as to say:

> Note: As soon as an entity sends a session-terminate action, it MUST
> consider the session to be in the ENDED state (even before receiving
> acknowledgement from the other party). If the terminating entity receives
> additional Jingle-related IQ-sets from the other party after sending the
> session-terminate action, it MUST reply with an <unknown-session/> error.

so this error is actually required by the spec!

But I wrote a quick test for it and found that I broke this last March. Gabble's been sending <gone> instead since then. I pushed a fix and the test to master. http://cgit.freedesktop.org/telepathy/telepathy-gabble/commit/?id=ecee60dfc


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.