Bug 28101 - Crash when calling RefreshContactInfo
Summary: Crash when calling RefreshContactInfo
Status: RESOLVED FIXED
Alias: None
Product: Telepathy
Classification: Unclassified
Component: gabble (show other bugs)
Version: unspecified
Hardware: Other All
: medium normal
Assignee: Telepathy bugs list
QA Contact: Telepathy bugs list
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-05-14 01:46 UTC by Xavier Claessens
Modified: 2010-05-14 04:20 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments

Description Xavier Claessens 2010-05-14 01:46:45 UTC
I started implementing ContactInfo support in empathy, and it calls RequestContactInfo each time the tooltip must be shown in the contact list. That means that gabble gets spammed with requests when moving the mouve over the contact list....

Empathy should be nicer, but that's not a reason for gabble to crash. Here is the last lines of debug and the backtrace.

(...)
(telepathy-gabble:12863): gabble-DEBUG: item_info_cb: got item identity, jid=echo.jabber.belnet.be, name=Telepathy Gabble 0.9.11, category=client, type=pc
(telepathy-gabble:12863): gabble-DEBUG: disco_done_cb: Disco is done; complete pending requests
(telepathy-gabble:12863): gabble-DEBUG: response_cb: got reply for request 0x7614a0
(telepathy-gabble:12863): gabble-DEBUG: pipeline_reply_cb: called for entry 0x7fffec005680
(telepathy-gabble:12863): gabble-DEBUG: _parse_vcard: unknown vCard node in XML: PHOTO
(telepathy-gabble:12863): gabble-DEBUG: observe_vcard: got vCard alias "Testman 1" for handle 2 from <NICKNAME>
(telepathy-gabble:12863): gabble-DEBUG: gabble_conn_aliasing_nickname_updated: ignoring boring alias change for handle 2, signal from 2 but source 6 has alias "Testman 1"
(telepathy-gabble:12863): gabble-DEBUG: _parse_vcard: unknown vCard node in XML: PHOTO
(telepathy-gabble:12863): gabble-DEBUG: delete_request: Discarding request 0xac0830
(telepathy-gabble:12863): gabble-DEBUG: cache_entry_attempt_to_free: Not freeing vCard cache entry 0x7fffec005680: it has a cached vCard 0x7fffec004aa0
(telepathy-gabble:12863): gabble-DEBUG: delete_item: deleting item 0x7614a0
(telepathy-gabble:12863): gabble-DEBUG: gabble_request_pipeline_go: called; 0 pending items, 0 items in flight
**
gabble:ERROR:vcard-manager.c:1553:gabble_vcard_manager_request: assertion failed: (entry->vcard_node == NULL)

Program received signal SIGABRT, Aborted.
0x00007ffff58bca75 in *__GI_raise (sig=<value optimized out>) at ../nptl/sysdeps/unix/sysv/linux/raise.c:64
64	../nptl/sysdeps/unix/sysv/linux/raise.c: Aucun fichier ou dossier de ce type.
	in ../nptl/sysdeps/unix/sysv/linux/raise.c
(gdb) bt
#0  0x00007ffff58bca75 in *__GI_raise (sig=<value optimized out>) at ../nptl/sysdeps/unix/sysv/linux/raise.c:64
#1  0x00007ffff58c05c0 in *__GI_abort () at abort.c:92
#2  0x00007ffff5c6fbb4 in IA__g_assertion_message (domain=<value optimized out>, file=<value optimized out>, line=<value optimized out>, 
    func=0x4ea090 "gabble_vcard_manager_request", message=0xabe990 "assertion failed: (entry->vcard_node == NULL)")
    at /build/buildd/glib2.0-2.24.0/glib/gtestutils.c:1318
#3  0x00007ffff5c70130 in IA__g_assertion_message_expr (domain=0x4d6486 "gabble", file=0x4e9512 "vcard-manager.c", line=1553, 
    func=0x4ea090 "gabble_vcard_manager_request", expr=<value optimized out>) at /build/buildd/glib2.0-2.24.0/glib/gtestutils.c:1329
#4  0x000000000046b20a in gabble_vcard_manager_request (self=0xa77c10, handle=2, timeout=0, callback=<value optimized out>, 
    user_data=<value optimized out>, object=0x0) at vcard-manager.c:1553
#5  0x00000000004a7bbf in gabble_connection_refresh_contact_info (iface=<value optimized out>, contacts=0xa4eca0, context=0x7691d0)
    at conn-contact-info.c:591
#6  0x00007ffff7bc8580 in ?? () from /usr/lib/libdbus-glib-1.so.2
#7  0x00007ffff799869e in ?? () from /lib/libdbus-1.so.3
#8  0x00007ffff798c3ec in dbus_connection_dispatch () from /lib/libdbus-1.so.3
#9  0x00007ffff7bc4e45 in ?? () from /usr/lib/libdbus-glib-1.so.2
#10 0x00007ffff5c498c2 in g_main_dispatch (context=0x743920) at /build/buildd/glib2.0-2.24.0/glib/gmain.c:1960
#11 IA__g_main_context_dispatch (context=0x743920) at /build/buildd/glib2.0-2.24.0/glib/gmain.c:2513
#12 0x00007ffff5c4d748 in g_main_context_iterate (context=0x743920, block=<value optimized out>, dispatch=<value optimized out>, self=<value optimized out>)
    at /build/buildd/glib2.0-2.24.0/glib/gmain.c:2591
#13 0x00007ffff5c4dc55 in IA__g_main_loop_run (loop=0x74f560) at /build/buildd/glib2.0-2.24.0/glib/gmain.c:2799
#14 0x00007ffff6f0e0ef in tp_run_connection_manager (prog_name=<value optimized out>, version=<value optimized out>, construct_cm=<value optimized out>, 
    argc=<value optimized out>, argv=<value optimized out>) at run.c:285
#15 0x000000000042b52e in gabble_main (argc=1, argv=0x7fffffffe258) at gabble.c:150
#16 0x00007ffff58a7c4d in __libc_start_main (main=<value optimized out>, argc=<value optimized out>, ubp_av=<value optimized out>, 
    init=<value optimized out>, fini=<value optimized out>, rtld_fini=<value optimized out>, stack_end=0x7fffffffe248) at libc-start.c:226
#17 0x000000000042b389 in _start ()
Comment 1 Xavier Claessens 2010-05-14 01:47:47 UTC
Oh, actually it's not calling RequestContactInfo, but RefreshContactInfo. Should be the same though.
Comment 2 Xavier Claessens 2010-05-14 01:49:50 UTC
Note: I'm running gabble 0.9.11, the crash is 100% reproductible.
Comment 3 Senko Rasic 2010-05-14 02:20:04 UTC
(In reply to comment #0)
> gabble:ERROR:vcard-manager.c:1553:gabble_vcard_manager_request: assertion
> failed: (entry->vcard_node == NULL)
> 
> #4  0x000000000046b20a in gabble_vcard_manager_request (self=0xa77c10,
> handle=2, timeout=0, callback=<value optimized out>, 
>     user_data=<value optimized out>, object=0x0) at vcard-manager.c:1553
> #5  0x00000000004a7bbf in gabble_connection_refresh_contact_info (iface=<value
> optimized out>, contacts=0xa4eca0, context=0x7691d0)
>     at conn-contact-info.c:591

Looks to me like gabble_connection_refresh_contact_info() doesn't clear the cache entry for the handle before refreshing it. The method gabble_vcard_manager_request() expect the cache entry to be empty (hence the assert).

Proposed fix (untested):
http://git.collabora.co.uk/?p=user/ptlo/telepathy-gabble/.git;a=shortlog;h=refs/heads/conn-info-fix
Comment 4 Xavier Claessens 2010-05-14 02:27:23 UTC
Proposed patch fix the issue and looks good, please merge :)
Comment 5 Senko Rasic 2010-05-14 02:33:01 UTC
(In reply to comment #4)
> Proposed patch fix the issue and looks good, please merge :)

Cool, I'll merge it as soon as I make a testcase for it.
Comment 6 Senko Rasic 2010-05-14 04:20:05 UTC
Fix and updated testcase merged to master.


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.