Bug 12791 - Invalid handle assertion on connection (Debian bug 446259)
Summary: Invalid handle assertion on connection (Debian bug 446259)
Status: RESOLVED FIXED
Alias: None
Product: Telepathy
Classification: Unclassified
Component: gabble (show other bugs)
Version: unspecified
Hardware: x86 (IA32) Linux (All)
: medium normal
Assignee: Telepathy bugs list
QA Contact: Telepathy bugs list
URL: http://bugs.debian.org/cgi-bin/bugrep...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-10-12 08:46 UTC by Simon McVittie
Modified: 2008-04-28 10:32 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments
Gabble log (38.52 KB, application/octet-stream)
2008-04-23 14:46 UTC, Sven Arvidsson
Details

Description Simon McVittie 2007-10-12 08:46:55 UTC
"As soon as I try to connect with my jabber.org account in Empathy,
telepathy-gabble crashes. My gmail account on the other hand seems to
work fine.

I'm adding a backtrace below, I can also provide DEBUG output if needed."

Backtrace is in the Debian BTS, <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=446259>. Looks like a bug in roster group handling.
Comment 1 Sven Arvidsson 2008-01-11 08:21:58 UTC
This bug is still here in version 0.7.1. Is there anything else I can add to make it easier to fix this?
Comment 2 Simon McVittie 2008-04-23 03:34:29 UTC
I couldn't see what was going on here when I looked at this bug before, but I think I can see what the problem is now. I'll see whether I can reproduce it in a regression test.
Comment 3 Simon McVittie 2008-04-23 06:35:00 UTC
OK, I believe I have reproduced this crash. I've reproduced something closely related, anyway. I think there's something odd in your jabber.org roster, perhaps a duplicate entry for the same contact with different groups.

To verify that the problem I'm fixing is the same one you encountered, please try reproducing the assertion when you have run (the current version of) Gabble like this:

LM_DEBUG=net GABBLE_PERSIST=1 GABBLE_DEBUG=all /usr/lib/telepathy/telepathy-gabble 2>&1 | tee gabble.log

The resulting logfile will contain a complete network activity trace (including all the JIDs on your roster). If you don't want to post this to a publically archived location, you can send it to simon.mcvittie@collabora.co.uk privately.

I'll use the roster from your debug log as the basis for a regression test to make sure we don't get this bug recurring (anonymizing all JIDs, obviously).
Comment 4 Sven Arvidsson 2008-04-23 14:46:17 UTC
Created attachment 16140 [details]
Gabble log

I'm attaching the log from version 0.7.3, is this current enough or do I need to grab it directly from the darcs repository?

I have mostly been using this account to try out different applications and settings, so it's no surprise if something odd may have occured. Anyway, thanks for looking into this!
Comment 5 Simon McVittie 2008-04-24 02:11:47 UTC
OK, here's the problem (I've added whitespace):

<item subscription='both' name='ingaa' jid='ingaa@jabber.org'>
  <group>Family</group>
</item>
<item ask='subscribe' subscription='none' jid='ingaa@jabber.org/Gaim'/>

We normalize the full JID (with the /Gaim) to the same thing as the bare JID, meaning there appears to be a duplicate <item>. The first of the duplicate <item>s has more groups than the second, which is exactly the situation needed to trigger this bug.

I have a fix for the assertion, on a branch awaiting code review - it should land in 0.7.4.

(As it stands at the moment, even with my patch applied you'll get odd behaviour with this roster. I didn't know servers would let you do this... I'll have to go and re-read the RFC to work out how we should be interpreting it.)
Comment 6 Simon McVittie 2008-04-28 10:32:19 UTC
A better version of my patch has been reviewed and merged into darcs; it will be included in the next release. Thank you for your bug report.


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.