[Bug 40283] New: Crash when a client needs recovery
bugzilla-daemon at freedesktop.org
bugzilla-daemon at freedesktop.org
Mon Aug 22 12:20:49 CEST 2011
https://bugs.freedesktop.org/show_bug.cgi?id=40283
Summary: Crash when a client needs recovery
Product: Telepathy
Version: unspecified
Platform: Other
OS/Version: All
Status: NEW
Severity: normal
Priority: medium
Component: mission-control
AssignedTo: telepathy-bugs at lists.freedesktop.org
ReportedBy: xclaesse at gmail.com
QAContact: telepathy-bugs at lists.freedesktop.org
backtrace:
(process:13287): mcd-DEBUG: mcd_dispatcher_client_needs_recovery_cb: called
Program received signal SIGSEGV, Segmentation fault.
g_str_hash (v=0x0) at /build/buildd/glib2.0-2.29.16/./glib/gstring.c:142
142 /build/buildd/glib2.0-2.29.16/./glib/gstring.c: Aucun fichier ou dossier
de ce type.
in /build/buildd/glib2.0-2.29.16/./glib/gstring.c
(gdb) bt
#0 g_str_hash (v=0x0) at /build/buildd/glib2.0-2.29.16/./glib/gstring.c:142
#1 0x00007fa9b5cf0403 in g_hash_table_lookup_node (hash_return=<synthetic
pointer>, key=0x0, hash_table=0x1a21240) at
/build/buildd/glib2.0-2.29.16/./glib/ghash.c:360
#2 g_hash_table_lookup (hash_table=0x1a21240, key=0x0) at
/build/buildd/glib2.0-2.29.16/./glib/ghash.c:1022
#3 0x0000000000429392 in mcd_dispatcher_client_needs_recovery_cb
(client=0x1abf530, self=0x1a2e810) at mcd-dispatcher.c:683
#4 0x00007fa9b61e3ed4 in g_closure_invoke (closure=0x1aed680,
return_value=0x0, n_param_values=1, param_values=0x1a4dc60,
invocation_hint=<optimized out>)
at /build/buildd/glib2.0-2.29.16/./gobject/gclosure.c:773
#5 0x00007fa9b61f717b in signal_emit_unlocked_R (node=<optimized out>,
detail=0, instance=0x1abf530, emission_return=0x0,
instance_and_params=0x1a4dc60)
at /build/buildd/glib2.0-2.29.16/./gobject/gsignal.c:3271
#6 0x00007fa9b6200797 in g_signal_emit_valist (instance=<optimized out>,
signal_id=<optimized out>, detail=<optimized out>, var_args=0x7fffb1f02588) at
/build/buildd/glib2.0-2.29.16/./gobject/gsignal.c:3002
#7 0x00007fa9b6200962 in g_signal_emit (instance=<optimized out>,
signal_id=<optimized out>, detail=<optimized out>) at
/build/buildd/glib2.0-2.29.16/./gobject/gsignal.c:3059
#8 0x00007fa9b6bb1ba8 in _tp_cli_dbus_properties_invoke_callback_get_all
(self=0x1abf530, error=0x0, args=0x1b05000, generic_callback=0x43f960
<_mcd_client_proxy_observer_get_all_cb>,
user_data=<optimized out>, weak_object=<optimized out>) at
_gen/tp-cli-generic-body.h:1190
#9 0x00007fa9b6bb8a80 in tp_proxy_pending_call_idle_invoke (p=0x1a9f860) at
proxy-methods.c:153
#10 0x00007fa9b5d01efd in g_main_dispatch (context=0x1a067d0) at
/build/buildd/glib2.0-2.29.16/./glib/gmain.c:2439
#11 g_main_context_dispatch (context=0x1a067d0) at
/build/buildd/glib2.0-2.29.16/./glib/gmain.c:3008
#12 0x00007fa9b5d026f8 in g_main_context_iterate (context=0x1a067d0,
block=<optimized out>, dispatch=1, self=<optimized out>) at
/build/buildd/glib2.0-2.29.16/./glib/gmain.c:3086
#13 0x00007fa9b5d02c32 in g_main_loop_run (loop=0x1a01b90) at
/build/buildd/glib2.0-2.29.16/./glib/gmain.c:3294
#14 0x000000000040e9e5 in main (argc=<optimized out>, argv=<optimized out>) at
mc-server.c:78
Steps leading to that crash:
1) a text channel arrives, MC creates a DO and give it to all approvers.
2) gnome-shell is an approver and also an handler, so it claims the DO.
3) MC creates an Appoval with type APPROVAL_TYPE_CLAIM and client_bus_name to
NULL.It goes to _mcd_dispatch_operation_check_client_locks() where is calls
mcd_dispatch_operation_set_channel_handled_by() with NULL well-known-name for
the handler. which makes McdHandlerMap map the channel to NULL client name.
4) any observer with recovery=true restart (in my case it is empathy-chatroom
something because of a crash probably). This makes MC go to
mcd_dispatcher_client_needs_recovery_cb() which goes through all channels to
get their handler and gets a NULL hname and then the call to
_mcd_client_registry_lookup() will lead to crash.
There are 2 issues here:
1) The big one: when an approver claims a channel, MC should insert a valid
well-known-name for it in the table.
2) in recovery, if a well-known-name of an handler is NULL, it should not
crash, because that could happen anyway according to the comment in
_mcd_handler_map_set_path_handled():
/* In case we want to re-invoke the same client later, remember its
* well-known name, if we know it. (In edge cases where we're recovering
* from an MC crash, we can only guess, so we get NULL.) */
--
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.
More information about the telepathy-bugs
mailing list