Summary: | Gabble assumes that the server only replies to its roster query once (!) | ||
---|---|---|---|
Product: | Telepathy | Reporter: | Guillaume Desmottes <guillaume.desmottes> |
Component: | gabble | Assignee: | Will Thompson <will> |
Status: | RESOLVED FIXED | QA Contact: | Telepathy bugs list <telepathy-bugs> |
Severity: | normal | ||
Priority: | medium | CC: | avtarsinghbainsla |
Version: | unspecified | Keywords: | patch |
Hardware: | Other | ||
OS: | All | ||
Whiteboard: | review+ | ||
i915 platform: | i915 features: | ||
Attachments: | roster: ignore multiple replies to roster query. |
Description
Guillaume Desmottes
2011-10-25 00:49:15 UTC
From the log, Gabble sends the initial roster query: wocky-DEBUG: 24.10.2011 20:28:05.884869: _write_node_tree: Serializing tree: * iq xmlns='jabber:client' type='get' id='360457884838' * query xmlns='jabber:iq:roster' It gets a reply 2 seconds later: wocky-DEBUG: 24.10.2011 20:28:07.247874: _end_element_ns: Received stanza * iq xmlns='jabber:client' to='grandmaster@vk.com/37346436' type='result' id='360457884838' * query xmlns='jabber:iq:roster' …and then gets the same reply *again*: wocky-DEBUG: 24.10.2011 20:28:09.73115: _end_element_ns: Received stanza * iq xmlns='jabber:client' to='grandmaster@vk.com/37346436' type='result' id='360457884838' * query xmlns='jabber:iq:roster' The issue is that Gabble doesn't use send_iq_async() or something to send the initial request: it just fires off the IQ, and then has a handler which looks for IQs of type 'set' or 'result' which contain <query xmlns='jabber:iq:roster'/>. It never checks that it doesn't get the result twice… I have tried to report the issue to the vk.com server maintainers using the form at http://vk.com/help.php?page=jabber but it doesn't seem to work. Created attachment 52863 [details] [review] roster: ignore multiple replies to roster query. The XMPP server running on vk.com is buggy, and replies to our roster query twice. Gabble just blindly assumed that any <iq type='result'> with a roster in it was the singular reply to our singular query. This is a pretty reasonable assumption but this buggy server violates it, and Gabble calls tp_base_contact_list_set_list_received() more than once, which triggers a critical in that function. A more invasive fix would use wocky_porter_send_iq_async() rather than scraping all the roster IQs out of everything using the LM API, but I wanted to quickly fix a bug on a Friday afternoon. Looks good. Merged to 0.12 and master; will be in 0.12.8 and 0.13.8. |
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.