telepathy-butterfly crashed with InvalidHandle in check_handle()

Bug #512596 reported by Anmar Oueja
130
This bug affects 22 people
Affects Status Importance Assigned to Milestone
telepathy-butterfly
Fix Released
Medium
telepathy-butterfly (Ubuntu)
Fix Released
Medium
Unassigned
Lucid
Fix Released
Medium
Sebastien Bacher

Bug Description

Binary package hint: telepathy-butterfly

Tried to add a buddy

ProblemType: Crash
Architecture: i386
Date: Mon Jan 25 19:21:01 2010
DistroRelease: Ubuntu 10.04
ExecutablePath: /usr/lib/telepathy/telepathy-butterfly
InstallationMedia: Ubuntu-Netbook 10.04 "Lucid Lynx" - Alpha i386 (20100113)
InterpreterPath: /usr/bin/python2.6
Package: telepathy-butterfly 0.5.3-1
PackageArchitecture: all
ProcCmdline: /usr/bin/python /usr/lib/telepathy/telepathy-butterfly
ProcEnviron:
 SHELL=/bin/bash
 LANG=en_CA.utf8
ProcVersionSignature: Ubuntu 2.6.32-11.15-generic
PythonArgs: ['/usr/lib/telepathy/telepathy-butterfly']
SourcePackage: telepathy-butterfly
Title: telepathy-butterfly crashed with InvalidHandle in check_handle()
Uname: Linux 2.6.32-11-generic i686
UserGroups: adm admin cdrom dialout lpadmin plugdev sambashare

Revision history for this message
Anmar Oueja (anmar) wrote :
tags: removed: need-duplicate-check
Revision history for this message
Anmar Oueja (anmar) wrote :

I want to note that this bug happened when i tried to add a buddy who added me on his end.

Revision history for this message
In , Sebastien Bacher (seb128) wrote :

The bug has been opened on https://bugs.launchpad.net/ubuntu/+source/telepathy-butterfly/+bug/512596 and has some duplicates there

The descriptions seems to indicate it happens when adding a buddy

Stacktrace on 0.5.7

"Traceback (most recent call last):
  File "/usr/lib/pymodules/python2.6/papyon/client.py", line 446, in event
    self._dispatch(method_name, *event_args)
  File "/usr/lib/pymodules/python2.6/papyon/event/__init__.py", line 44, in _dispatch
    if event_handler._dispatch_event(name, *args):
  File "/usr/lib/pymodules/python2.6/papyon/event/__init__.py", line 65, in _dispatch_event
    handler(*params)
  File "/usr/lib/python2.6/dist-packages/butterfly/channel/group.py", line 122, in on_addressbook_group_added
    self.AddMembers(self.__pending_add, None)
  File "/usr/lib/python2.6/dist-packages/butterfly/channel/group.py", line 71, in AddMembers
    contact_handle_id)
  File "/usr/lib/python2.6/dist-packages/butterfly/connection.py", line 139, in handle
    self.check_handle(handle_type, handle_id)
  File "/usr/lib/python2.6/dist-packages/telepathy/server/conn.py", line 154, in check_handle
    (handle, handle_type))
InvalidHandle: org.freedesktop.Telepathy.Error.InvalidHandle: handle number 18 not valid for type 1"

Other stacktraces:
http://launchpadlibrarian.net/38384257/Traceback.txt
http://launchpadlibrarian.net/40823588/Traceback.txt

visibility: private → public
Revision history for this message
Sebastien Bacher (seb128) wrote :

Thanks for your bug report. This bug has been reported to the developers of the software. You can track it and make comments here: https://bugs.freedesktop.org/show_bug.cgi?id=27553

Changed in telepathy-butterfly (Ubuntu):
importance: Undecided → Medium
status: New → Triaged
Revision history for this message
In , Cristian Aravena Romero (caravena) wrote :

*** Bug 27829 has been marked as a duplicate of this bug. ***

Revision history for this message
In , Jonny-lamb (jonny-lamb) wrote :

Odd. Can I get some butterfly logs please?

Revision history for this message
In , Cristian Aravena Romero (caravena) wrote :

Created an attachment (id=35280)
butterfly.log

bug with space. " <email address hidden>"

Revision history for this message
In , Cristian Aravena Romero (caravena) wrote :

Created an attachment (id=35283)
debbug2-butterfly.log

Bug add user with spache in the end. "<email address hidden> "

Revision history for this message
In , Jonny-lamb (jonny-lamb) wrote :

Okay what's happening here is Empathy is calling RequestHandles for the contact you are trying to add, and then the contact list channel waits for the mutex to become unlocked before progressing.

In the mean time, Empathy calls ReleaseHandles on the handle which was just requested. This means that the contact handle object gets disposed and gets lost from the Connection._handles dict. When the mutex unlocked callback gets called, it can't find the object, hence the traceback.

However, if you try to add a contact which actually exists (i.e. not <email address hidden>), then it kind of works, which is odd. It requests the handle of the contact, does something, then the callback gets called and the ReleaseHandles has already been called so it can't find the handle. However, papyon calls a callback with this new contact and a brand new handle appears out of the blue.

I've not got time to look into this more right now, but I thought I'd write down what I know for now. We could use this as an excuse to push butterfly into the future of having connection-persistent handles?

Revision history for this message
In , Jonny-lamb (jonny-lamb) wrote :

Okay, so my diagnosis in comment #5 wasn't entirely correct. I was getting confused between the publish and subscribe lists.

I've written a patch which should solve this. There's a big comment in the patch which should explain my reasoning. Testing adding new valid and invalid contacts appears to show this patch works as expected.

Revision history for this message
In , Jonny-lamb (jonny-lamb) wrote :

Better ideas of how to keep handle in scope until after finished_cb() are welcome. You can demonstrate that this scope hack works because if you try to add a bogus contact "<email address hidden>", watch it fail, then try RequestHandles on "<email address hidden>" gives you a new contact, which is cool.

Revision history for this message
In , Jonny-lamb (jonny-lamb) wrote :

*** Bug 27879 has been marked as a duplicate of this bug. ***

Revision history for this message
In , Jonny-lamb (jonny-lamb) wrote :

*** Bug 27907 has been marked as a duplicate of this bug. ***

Revision history for this message
Cristian Aravena Romero (caravena) wrote :
Changed in telepathy-butterfly (Ubuntu):
status: Triaged → Fix Committed
Revision history for this message
In , Olivier Le Thanh Duong (olethanh) wrote :

Merged, this fix is available in butterfly 0.5.10

Revision history for this message
In , Jonny-lamb (jonny-lamb) wrote :

*** Bug 28122 has been marked as a duplicate of this bug. ***

Changed in telepathy-butterfly (Ubuntu Lucid):
assignee: nobody → Sebastien Bacher (seb128)
importance: Undecided → Medium
status: New → Fix Committed
Revision history for this message
Sebastien Bacher (seb128) wrote :

sru team, the debdiff for the lucid update is on bug #570346

Revision history for this message
Martin Pitt (pitti) wrote : Please test proposed package

Accepted telepathy-butterfly into lucid-proposed, the package will build now and be available in a few hours. Please test and give feedback here. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Thank you in advance!

tags: added: verification-needed
Revision history for this message
Sebastien Bacher (seb128) wrote :

the new version is in maverick as well now

Changed in telepathy-butterfly (Ubuntu):
status: Fix Committed → Fix Released
Revision history for this message
Sebastien Bacher (seb128) wrote :

could you test the upgrade and confirm it's working for you?

Revision history for this message
Sebastien Bacher (seb128) wrote :

could somebody confirm their msn is still working in empathy with this version to verify the stable update?

Revision history for this message
Omer Akram (om26er) wrote :

No regression for me with butterfly 0.5.11 in Lucid

Martin Pitt (pitti)
tags: added: verification-done
removed: verification-needed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package telepathy-butterfly - 0.5.11-0ubuntu1

---------------
telepathy-butterfly (0.5.11-0ubuntu1) lucid-proposed; urgency=low

  * New upstream bug fix versions:
    Fixes:
    - fd.o#28354: make sure the correct type gets returned when getting
      PendingMessages.
    - Don't always remove pending messages when ListPendingMessages is called.
    - Don't assume "message-type" is set on calls to SendMessage.
    - Replace \r\n with \n in incoming messages. (lp: #546338)
    Enhancements:
    - Implement friendly names for groups chats
    Fixes:
    - Fix error when getting caps for certain contacts and offline contacts
    - Remove deprecation warning at start (lp: #570346)
    - Set Initator{ID,Handle} for all channels types
    - Don't connect via HTTP if we lost connection (lp: #430768)
    - Fix crash in check_handle when adding a contact (lp: #512596)
 -- Sebastien Bacher <email address hidden> Tue, 08 Jun 2010 18:41:38 +0200

Changed in telepathy-butterfly (Ubuntu Lucid):
status: Fix Committed → Fix Released
Changed in telepathy-butterfly:
importance: Unknown → Medium
status: Unknown → Fix Released
Changed in telepathy-butterfly:
importance: Medium → Unknown
Changed in telepathy-butterfly:
importance: Unknown → Medium
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.