Bug 68946 - mission control can take 100% cpu if its associated dbus drop
Summary: mission control can take 100% cpu if its associated dbus drop
Status: RESOLVED MOVED
Alias: None
Product: Telepathy
Classification: Unclassified
Component: mission-control (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: 2013-09-04 16:46 UTC by Frederic Crozat
Modified: 2019-12-03 20:13 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments

Description Frederic Crozat 2013-09-04 16:46:47 UTC
Due to a bug in gnome-shell (https://bugzilla.gnome.org/show_bug.cgi?id=707486 ), mission-control can be started under a gdm session. Once logged as a user, the bus which started mission-control no longer exists but mission-control doesn't terminate and take 100% cpu.
Comment 1 Frederic Crozat 2013-09-04 16:47:11 UTC
This is with mission-control 5.15.0
Comment 2 Simon McVittie 2013-09-09 16:09:19 UTC
If you attach gdb to the busy-looping Mission Control, what's the backtrace?
Comment 3 Frederic Crozat 2013-09-09 16:34:32 UTC
(gdb) thread apply all bt

Thread 3 (Thread 0x7f783b884700 (LWP 1440)):
#0  __lll_lock_wait ()
    at ../nptl/sysdeps/unix/sysv/linux/x86_64/lowlevellock.S:135
#1  0x00007f783ec3a50d in _L_lock_1086 () from /lib64/libpthread.so.0
#2  0x00007f783ec3a487 in __GI___pthread_mutex_lock (mutex=0x1f01e20)
    at ../nptl/pthread_mutex_lock.c:134
#3  0x00007f783eed93d1 in g_mutex_lock (
    mutex=mutex@entry=0x7f783f5c9618 <g__notify_lock_lock>)
    at gthread-posix.c:213
#4  0x00007f783f38c280 in g_object_notify_queue_freeze (object=0x7f78340178a0, 
    conditional=conditional@entry=0) at gobject.c:227
#5  0x00007f783f38d007 in g_object_init (object=0x7f78340178a0, 
    class=0x7f7834015f30) at gobject.c:963
#6  0x00007f783f3a9eb8 in g_type_create_instance (type=<optimized out>)
    at gtype.c:1862
#7  0x00007f783f38d615 in g_object_new_internal (
    class=class@entry=0x7f7834015f30, params=params@entry=0x0, 
    n_params=n_params@entry=0) at gobject.c:1746
#8  0x00007f783f38f41d in g_object_newv (
    object_type=object_type@entry=140154245307968, 
    n_parameters=n_parameters@entry=0, parameters=parameters@entry=0x0)
    at gobject.c:1890
#9  0x00007f783f38fbcc in g_object_new (object_type=140154245307968, 
    first_property_name=first_property_name@entry=0x0) at gobject.c:1556
#10 0x00007f783ff59339 in g_dbus_message_new () at gdbusmessage.c:627
#11 0x00007f783ff5aa2d in g_dbus_message_new_method_call (
    name=name@entry=0x7f783ff9ead4 "org.freedesktop.DBus", 
    path=path@entry=0x7f783ff9eae9 "/org/freedesktop/DBus", 
    interface_=interface_@entry=0x7f783ff9ead4 "org.freedesktop.DBus", 
    method=method@entry=0x7f783ffa6cfb "RemoveMatch") at gdbusmessage.c:656
#12 0x00007f783ff528a9 in remove_match_rule (
    match_rule=0x7f783401a8c0 "type='signal',sender='org.freedesktop.DBus',interface='org.freedesktop.DBus',member='NameOwnerChanged',path='/org/freedesktop/DBus',arg0='org.gnome.OnlineAccounts'", 
    connection=0x7f783400d050 [GDBusConnection]) at gdbusconnection.c:3371
#13 unsubscribe_id_internal (
    connection=connection@entry=0x7f783400d050 [GDBusConnection], 
    subscription_id=subscription_id@entry=2, 
    out_removed_subscribers=out_removed_subscribers@entry=0x7f783401b660)
    at gdbusconnection.c:3629
#14 0x00007f783ff56736 in g_dbus_connection_signal_unsubscribe (
    connection=0x7f783400d050 [GDBusConnection], subscription_id=2)
    at gdbusconnection.c:3666
#15 0x00007f783ff60781 in g_dbus_proxy_finalize (
    object=0x7f7834006dd0 [GDBusProxy]) at gdbusproxy.c:219
#16 0x00007f783f38ceba in g_object_unref (_object=0x7f7834006dd0)
    at gobject.c:3197
#17 0x00007f783feea590 in g_initable_new_valist (object_type=<optimized out>, 
    first_property_name=first_property_name@entry=0x7f783ffabb53 "g-flags", 
    var_args=var_args@entry=0x7f783b883a18, cancellable=0x0, 
    error=error@entry=0x1f02860) at ginitable.c:233
#18 0x00007f783feea62c in g_initable_new (
    object_type=object_type@entry=140154245243120, 
    cancellable=<optimized out>, error=error@entry=0x1f02860, 
    first_property_name=first_property_name@entry=0x7f783ffabb53 "g-flags")
    at ginitable.c:149
#19 0x00007f783ff61933 in g_dbus_proxy_new_sync (
    connection=0x7f783400d050 [GDBusConnection], flags=
    G_DBUS_PROXY_FLAGS_DO_NOT_LOAD_PROPERTIES, info=info@entry=0x0, 
    name=0x7f7834007910 "org.gnome.OnlineAccounts", 
    object_path=0x7f78340078e0 "/org/gnome/OnlineAccounts", 
    interface_name=interface_name@entry=0x7f783ffaf4e8 "org.freedesktop.DBus.ObjectManager", cancellable=cancellable@entry=0x0, error=error@entry=0x1f02860)
    at gdbusproxy.c:2170
#20 0x00007f783ff6ecec in initable_init (initable=<optimized out>, 
    cancellable=0x0, error=0x1f02860) at gdbusobjectmanagerclient.c:1336
#21 0x00007f783feea53e in g_initable_new_valist (object_type=<optimized out>, 
    first_property_name=first_property_name@entry=0x7f783b8af596 "flags", 
    var_args=var_args@entry=0x7f783b883c18, cancellable=cancellable@entry=0x0, 
    error=error@entry=0x1f02860) at ginitable.c:231
#22 0x00007f783feea62c in g_initable_new (object_type=<optimized out>, 
    cancellable=cancellable@entry=0x0, error=error@entry=0x1f02860, 
    first_property_name=first_property_name@entry=0x7f783b8af596 "flags")
    at ginitable.c:149
#23 0x00007f783b8aebfd in goa_object_manager_client_new_for_bus_sync (
    bus_type=bus_type@entry=G_BUS_TYPE_SESSION, flags=flags@entry=
    G_DBUS_OBJECT_MANAGER_CLIENT_FLAGS_NONE, 
    name=name@entry=0x7f783b8aeec0 "org.gnome.OnlineAccounts", 
    object_path=object_path@entry=0x7f783b8aeea6 "/org/gnome/OnlineAccounts", 
    cancellable=cancellable@entry=0x0, error=error@entry=0x1f02860)
    at goa-generated.c:18831
#24 0x00007f783b892921 in initable_init (initable=<optimized out>, 
    cancellable=0x0, error=0x7f783b883d98) at goaclient.c:348
#25 0x00007f783fec288a in async_init_thread (task=0x1f1b810 [GTask], 
    source_object=0x1f02840, task_data=<optimized out>, cancellable=0x0)
    at gasyncinitable.c:260
#26 0x00007f783ff0e305 in g_task_thread_pool_thread (thread_data=0x1f1b810, 
    pool_data=<optimized out>) at gtask.c:1245
#27 0x00007f783eebeb36 in g_thread_pool_thread_proxy (data=<optimized out>)
    at gthreadpool.c:309
#28 0x00007f783eebe175 in g_thread_proxy (data=0x1f19850) at gthread.c:798
#29 0x00007f783ec380db in start_thread (arg=0x7f783b884700)
    at pthread_create.c:309
#30 0x00007f783e9696bd in clone ()
    at ../sysdeps/unix/sysv/linux/x86_64/clone.S:111

Thread 2 (Thread 0x7f783b083700 (LWP 1441)):
#0  __lll_lock_wait ()
    at ../nptl/sysdeps/unix/sysv/linux/x86_64/lowlevellock.S:135
#1  0x00007f783ec3a50d in _L_lock_1086 () from /lib64/libpthread.so.0
#2  0x00007f783ec3a487 in __GI___pthread_mutex_lock (mutex=0x1f01e20)
    at ../nptl/pthread_mutex_lock.c:134
#3  0x00007f783eed93d1 in g_mutex_lock (
    mutex=mutex@entry=0x7f783f5c9618 <g__notify_lock_lock>)
    at gthread-posix.c:213
#4  0x00007f783f38c280 in g_object_notify_queue_freeze (object=0x7f7834017e80, 
    conditional=conditional@entry=0) at gobject.c:227
#5  0x00007f783f38d007 in g_object_init (object=0x7f7834017e80, 
    class=0x7f7834015f30) at gobject.c:963
#6  0x00007f783f3a9eb8 in g_type_create_instance (type=<optimized out>)
    at gtype.c:1862
#7  0x00007f783f38d615 in g_object_new_internal (
    class=class@entry=0x7f7834015f30, params=params@entry=0x0, 
    n_params=n_params@entry=0) at gobject.c:1746
#8  0x00007f783f38f41d in g_object_newv (
    object_type=object_type@entry=140154245307968, 
    n_parameters=n_parameters@entry=0, parameters=parameters@entry=0x0)
    at gobject.c:1890
#9  0x00007f783f38fbcc in g_object_new (object_type=140154245307968, 
    first_property_name=first_property_name@entry=0x0) at gobject.c:1556
#10 0x00007f783ff59339 in g_dbus_message_new () at gdbusmessage.c:627
#11 0x00007f783ff5a1df in g_dbus_message_new_from_blob (
    blob=0x7f782c001c00 "l\004\001\001\062", blob_len=210, 
    capabilities=<optimized out>, error=error@entry=0x7f783b082c78)
    at gdbusmessage.c:2041
#12 0x00007f783ff6489d in _g_dbus_worker_do_read_cb (
    input_stream=<optimized out>, res=<optimized out>, 
    user_data=user_data@entry=0x7f7834017680) at gdbusprivate.c:754
#13 0x00007f783ff00c5e in g_simple_async_result_complete (
    simple=0x7f782c003570 [GSimpleAsyncResult]) at gsimpleasyncresult.c:777
#14 0x00007f783ff00ccc in complete_in_idle_cb (data=0x7f782c003570)
    at gsimpleasyncresult.c:789
#15 0x00007f783ee991f6 in g_main_dispatch (context=0x7f7834015b40)
    at gmain.c:3065
#16 g_main_context_dispatch (context=context@entry=0x7f7834015b40)
    at gmain.c:3641
#17 0x00007f783ee99548 in g_main_context_iterate (context=0x7f7834015b40, 
    block=block@entry=1, dispatch=dispatch@entry=1, self=<optimized out>)
    at gmain.c:3712
#18 0x00007f783ee9994a in g_main_loop_run (loop=0x7f7834015ad0) at gmain.c:3906
#19 0x00007f783ff629a6 in gdbus_shared_thread_func (user_data=0x7f7834015b10)
    at gdbusprivate.c:278
#20 0x00007f783eebe175 in g_thread_proxy (data=0x1f19ed0) at gthread.c:798
#21 0x00007f783ec380db in start_thread (arg=0x7f783b083700)
    at pthread_create.c:309
#22 0x00007f783e9696bd in clone ()
    at ../sysdeps/unix/sysv/linux/x86_64/clone.S:111

Thread 1 (Thread 0x7f7840a2a840 (LWP 1439)):
#0  g_slist_find (list=0x1f0e640 = {...}, data=data@entry=0x1f0c470)
    at gslist.c:729
#1  0x00007f783f38ca6a in g_object_notify_queue_add (
    nqueue=nqueue@entry=0x1efc660, pspec=0x1f0c470 [GParamString], 
    object=<optimized out>) at gobject.c:305
#2  0x00007f783f38d369 in object_set_property (nqueue=0x1efc660, 
    value=0x7fffd441bcf0, pspec=0x1f0c470 [GParamString], 
    object=0x1f06aa0 [DBusGProxy]) at gobject.c:1371
#3  g_object_constructor (type=<optimized out>, 
    n_construct_properties=<optimized out>, construct_params=0x1f17ea0)
    at gobject.c:2042
#4  0x00007f783fa36b8f in dbus_g_proxy_constructor (type=32512752, 
    n_construct_properties=4, construct_properties=0x1f17e70)
    at dbus-gproxy.c:1430
#5  0x00007f783f38d5a4 in g_object_new_with_custom_constructor (n_params=4, 
    params=0x7fffd441be00, class=0x1f17d00) at gobject.c:1665
#6  g_object_new_internal (class=class@entry=0x1f17d00, 
    params=params@entry=0x7fffd441be00, n_params=4) at gobject.c:1744
#7  0x00007f783f38f7d4 in g_object_new_valist (
    object_type=object_type@entry=32512752, 
    first_property_name=first_property_name@entry=0x7f783fa4222c "name", 
    var_args=var_args@entry=0x7fffd441bf58) at gobject.c:2002
#8  0x00007f783f38fbb4 in g_object_new (object_type=32512752, 
    first_property_name=first_property_name@entry=0x7f783fa4222c "name")
    at gobject.c:1559
#9  0x00007f783fa3607e in dbus_g_proxy_new (connection=0x1f086f8, 
    name=0x1f0d0c0 "org.freedesktop.DBus", 
    path_name=0x1f0e460 "/org/freedesktop/DBus", 
    interface_name=interface_name@entry=0x7f78403a1b3d "org.freedesktop.DBus")
    at dbus-gproxy.c:1993
#10 0x00007f783fa36c2e in dbus_g_proxy_new_for_name (
    connection=<optimized out>, name=<optimized out>, path=<optimized out>, 
    iface=iface@entry=0x7f78403a1b3d "org.freedesktop.DBus")
    at dbus-gproxy.c:2041
#11 0x00007f7840346744 in tp_proxy_get_interface_by_id (
    self=self@entry=0x1f0c250 [TpDBusDaemon], iface=iface@entry=151, 
    error=error@entry=0x7fffd441c118) at proxy.c:502
#12 0x00007f7840346805 in tp_proxy_borrow_interface_by_id (
    self=self@entry=0x1f0c250 [TpDBusDaemon], iface=iface@entry=151, 
    error=error@entry=0x7fffd441c118) at proxy.c:457
#13 0x00007f7840316af5 in tp_cli_dbus_daemon_call_list_names (
    proxy=0x1f0c250 [TpDBusDaemon], timeout_ms=timeout_ms@entry=-1, 
    callback=callback@entry=0x430660 <mcd_client_registry_list_names_cb>, 
    user_data=user_data@entry=0x0, destroy=destroy@entry=0x0, 
    weak_object=weak_object@entry=0x1f058a0 [McdClientRegistry])
    at ../telepathy-glib/_gen/tp-cli-dbus-daemon-body.h:1431
#14 0x0000000000430591 in mcd_client_registry_constructed (
    object=0x1f058a0 [McdClientRegistry]) at client-registry.c:395
#15 0x00007f783f38d64a in g_object_new_internal (class=class@entry=0x1f17750, 
    params=params@entry=0x7fffd441c340, n_params=1) at gobject.c:1785
#16 0x00007f783f38f7d4 in g_object_new_valist (
    object_type=object_type@entry=32601536, 
    first_property_name=first_property_name@entry=0x43e40d "dbus-daemon", 
    var_args=var_args@entry=0x7fffd441c498) at gobject.c:2002
#17 0x00007f783f38fbb4 in g_object_new (object_type=32601536, 
    first_property_name=first_property_name@entry=0x43e40d "dbus-daemon")
    at gobject.c:1559
#18 0x00000000004308e0 in _mcd_client_registry_new (
    dbus_daemon=<optimized out>) at client-registry.c:508
#19 0x000000000041ad7e in mcd_dispatcher_constructed (
    object=0x1f10100 [McdDispatcher]) at mcd-dispatcher.c:801
#20 0x00007f783f38d64a in g_object_new_internal (class=class@entry=0x1f16ad0, 
    params=params@entry=0x7fffd441c770, n_params=2) at gobject.c:1785
#21 0x00007f783f38f7d4 in g_object_new_valist (
    object_type=object_type@entry=32567984, 
    first_property_name=first_property_name@entry=0x43e40d "dbus-daemon", 
    var_args=var_args@entry=0x7fffd441c8c8) at gobject.c:2002
#22 0x00007f783f38fbb4 in g_object_new (object_type=32567984, 
    first_property_name=first_property_name@entry=0x43e40d "dbus-daemon")
    at gobject.c:1559
#23 0x000000000041b218 in mcd_dispatcher_new (
    dbus_daemon=0x1f0c250 [TpDBusDaemon], 
    master=master@entry=0x1f0c310 [McdService]) at mcd-dispatcher.c:919
#24 0x0000000000412418 in mcd_master_constructor (type=32566016, n_params=2, 
    params=<optimized out>) at mcd-master.c:389
#25 0x00007f783f38d5a4 in g_object_new_with_custom_constructor (n_params=1, 
    params=0x7fffd441cbd0, class=0x1f0fd00) at gobject.c:1665
#26 g_object_new_internal (class=class@entry=0x1f0fd00, 
    params=params@entry=0x7fffd441cbd0, n_params=1) at gobject.c:1744
#27 0x00007f783f38f7d4 in g_object_new_valist (
    object_type=object_type@entry=32566016, 
    first_property_name=first_property_name@entry=0x43e40d "dbus-daemon", 
    var_args=var_args@entry=0x7fffd441cd28) at gobject.c:2002
#28 0x00007f783f38fbb4 in g_object_new (object_type=32566016, 
    first_property_name=first_property_name@entry=0x43e40d "dbus-daemon")
    at gobject.c:1559
#29 0x0000000000411cbc in mcd_service_new () at mcd-service.c:180
#30 0x000000000040fd90 in main (argc=<optimized out>, argv=<optimized out>)
    at mc-server.c:176
Comment 4 Simon McVittie 2013-10-09 16:24:11 UTC
Can you tell which thread is using all the CPU time?
Comment 5 Frederic Crozat 2013-10-09 16:25:20 UTC
I'll try to reproduce but I can't garantee, it looks like mc is getting killed now :(
Comment 6 Frederic Crozat 2013-10-09 16:27:49 UTC
Correction, something crashes, which is probably hiding the 100% cpu bug:

Oct 07 15:54:41 par-r81vxc7.par.novell.com kernel: mission-control[1425]: segfault at 7f228c08a845 ip 00007f228a84ce0e sp 00007fff9e014ed8 error
Oct 07 15:54:41 par-r81vxc7.par.novell.com goa[1430]: goa-daemon version 3.10.0 starting [main.c:117, main()]
Oct 07 15:54:41 par-r81vxc7.par.novell.com kernel: mission-control[1437]: segfault at 7f227c0c6845 ip 00007f227a888e0e sp 00007fffa70e63e8 error
Oct 07 15:54:41 par-r81vxc7.par.novell.com goa[1430]: Error preparing AM: Process /usr/lib/mission-control-5 received signal 11 [goatpaccountlingoatpaccountlinker.c:510, account_manager_prepared_cb()]
Comment 7 Simon McVittie 2013-10-09 16:32:11 UTC
The debug log from that Mission Control, with appropriate environment variables to get Telepathy, GDBus and GOA debug, would also be interesting.

Perhaps put this in gdm's ${XDG_DATA_DIRS}/dbus-1/services/org.freedesktop.Telepathy.AccountManager.service:

[D-BUS Service]
Name=org.freedesktop.Telepathy.AccountManager
Exec=/usr/local/libexec/debug-mc.sh

where /usr/local/libexec/debug-mc.sh is something like this:

#!/bin/bash
export G_DBUS_DEBUG=all
export G_MESSAGES_DEBUG=all
export MC_DEBUG=all
export MC_TP_DEBUG=all
exec > /var/lib/gdm/gdm-mc-$$.log 2>&1
exec /usr/libexec/mission-control-5

(and if there are magic environment variables to debug GOA, or to debug Empathy's GOA plugin, those might be interesting too.)
Comment 8 Simon McVittie 2013-10-09 16:32:58 UTC
(In reply to comment #6)
> Correction, something crashes, which is probably hiding the 100% cpu bug

Backtraces, please. Debug logs also useful.
Comment 9 Simon McVittie 2013-10-09 16:47:59 UTC
Another thing that might be interesting would be to delete /usr/lib/mission-control-plugins.0/mcp-account-manager-goa.so (or whatever location your OS uses) and see whether the crash, or the busy-loop, is still reproducible.

If it isn't, then that probably points the blame towards either Empathy (which provides that plugin), or a library used by that plugin (such as GOA).
Comment 10 Frederic Crozat 2013-10-15 12:47:20 UTC
(In reply to comment #9)
> Another thing that might be interesting would be to delete
> /usr/lib/mission-control-plugins.0/mcp-account-manager-goa.so (or whatever
> location your OS uses) and see whether the crash, or the busy-loop, is still
> reproducible.
> 
> If it isn't, then that probably points the blame towards either Empathy
> (which provides that plugin), or a library used by that plugin (such as GOA).

Looks like you found the culprit : moving away the goa plugin fixed the crash and 100% cpu usage: MC is being terminated nicely when user logins.

I'll try to extract a trace nevertheless
Comment 11 GitLab Migration User 2019-12-03 20:13:03 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/telepathy/telepathy-mission-control/issues/73.


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.