Bug 36077

Summary: gnutls 2.12 regression: Sending queue getting stuck because of vCard stanza not being sent
Product: Telepathy Reporter: Guillaume Desmottes <guillaume.desmottes>
Component: gabbleAssignee: Telepathy bugs list <telepathy-bugs>
Status: RESOLVED FIXED QA Contact: Telepathy bugs list <telepathy-bugs>
Severity: major    
Priority: medium CC: biru.ionut, marc.planolesay
Version: unspecifiedKeywords: patch
Hardware: Other   
OS: All   
URL: http://cgit.collabora.com/git/user/sjoerd/wocky.git/log/?h=gnutls-outgoing-stall
Whiteboard: review+
i915 platform: i915 features:
Attachments: the avatar

Description Guillaume Desmottes 2011-04-08 05:45:06 UTC
Marc is experiencing a pretty nasty issue with Gabble. It can't send any message to contacts.

After a lot of digging, I discovered that Gabble tried to send a stanza containing his vcard and this sending operation is never terminated (wocky_xmpp_connection_write_cb is never called). As a result, the Porter continues queueing any other outgoing stanzas and so he can't send any message.

The stanza being sent weight 16518 bytes which is big but not insane either. I tried setting the same avatar to a gmail test account (I disabled Empathy's avatar resizing code to make sure to send the full sized avatar) and didn't observe any issue.

I have full logs and tcpdump available if needed.
Comment 1 Guillaume Desmottes 2011-04-08 05:56:47 UTC
Created attachment 45418 [details]
the avatar
Comment 2 Ionut Biru 2011-04-22 05:17:24 UTC
still i cannot send sometimes messages with telepathy 0.12.0. Yesterday for example worked fine but now i cannot do it and i disconnected multiple times. Is this problem that affects gmail users? Is a server problem?
Comment 3 Ionut Biru 2011-04-22 10:41:04 UTC
building telepathy-gabble with openssl support instead of gnutls fixes the problem.

reading https://savannah.gnu.org/support/index.php?107660 and adding  gnutls_transport_set_lowat (session, 1); doesn't fix the problem
Comment 4 Will Thompson 2011-04-25 07:13:29 UTC
I installed gnutls 2.12 on my system and tried to reproduce this (as a precursor to seeing about working around it) but I could not, I'm sorry to say. I think my internet connection may be too fast; I'll try on 3G later maybe.

But it seems reasonably clear that this is a gnutls regression.
Comment 5 Sjoerd Simons 2011-07-26 03:12:00 UTC
This is actually a bug in the wocky gnutls backend, fixed in my branch (see the URL). I'm not sure if this is triggered by a gnutls behaviour change, but the actual bug has always been present. 

Just for reference, gnutls_transport_set_lowat is only useful if gnutls controls your sockets, not when you're using push/pull functions like wocky does. Which is why this didn't make a difference :)
Comment 6 Will Thompson 2011-07-26 04:36:22 UTC
Your branch looks beautiful, except for the part where some of the tests are broken, for which you said you would file a bug.
Comment 7 Will Thompson 2011-07-26 04:37:01 UTC
Oh actually, could you rebase this branch onto the gabble-0.12 branch of Wocky? We should ship the fix in Gabble 0.12.
Comment 8 Will Thompson 2011-07-27 08:41:04 UTC
This has been released in 0.12.4 and 0.13.3.

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.