After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 635105 - Empathy is eating all the memory
Empathy is eating all the memory
Status: RESOLVED FIXED
Product: empathy
Classification: Core
Component: General
unspecified
Other Linux
: Normal major
: ---
Assigned To: empathy-maint
empathy-maint
Depends on:
Blocks:
 
 
Reported: 2010-11-17 20:15 UTC by Guillaume Desmottes
Modified: 2011-08-29 10:12 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
http://git.collabora.co.uk/?p=user/cassidy/empathy;a=shortlog;h=refs/heads/leaks-635105 (2.29 KB, patch)
2010-11-18 14:18 UTC, Guillaume Desmottes
committed Details | Review

Description Guillaume Desmottes 2010-11-17 20:15:46 UTC
I was running master and went out for dinner. When I was back (40 minutes later), Empathy was using a shit load of memory. I interrupted it in gdb and got this trace:


  • #0 g_closure_ref
    at gclosure.c line 527
  • #1 g_closure_invoke
    at gclosure.c line 744
  • #2 signal_emit_unlocked_R
    at gsignal.c line 3252
  • #3 g_signal_emit_valist
    at gsignal.c line 2983
  • #4 g_signal_emit
    at gsignal.c line 3040
  • #5 g_object_dispatch_properties_changed
    at gobject.c line 919
  • #6 g_object_notify_dispatcher
    at gobject.c line 327
  • #7 g_object_notify_queue_thaw
    at gobjectnotifyqueue.c line 132
  • #8 g_object_notify_by_spec_internal
    at gobject.c line 977
  • #9 g_object_notify
    at gobject.c line 1018
  • #10 contact_maybe_set_client_types
    at contact.c line 2029
  • #11 contacts_client_types_updated
    at contact.c line 2042
  • #12 _tp_cli_connection_interface_client_types_invoke_callback_for_client_types_updated
    at _gen/tp-cli-connection-body.h line 6691
  • #13 tp_proxy_signal_invocation_run
    at proxy-signals.c line 266
  • #14 g_idle_dispatch
    at gmain.c line 4347
  • #15 g_main_dispatch
    at gmain.c line 2267
  • #16 g_main_context_dispatch
    at gmain.c line 2824
  • #17 g_main_context_iterate
    at gmain.c line 2902
  • #18 g_main_loop_run
    at gmain.c line 3110
  • #19 gtk_main
    at gtkmain.c line 1321
  • #20 gtk_application_run_mainloop
    at gtkapplication.c line 83
  • #21 g_application_run
    at gapplication.c line 1216
  • #22 main
    at empathy.c line 719

Comment 1 Guillaume Desmottes 2010-11-18 14:18:37 UTC
Created attachment 174772 [details] [review]
http://git.collabora.co.uk/?p=user/cassidy/empathy;a=shortlog;h=refs/heads/leaks-635105

 libempathy-gtk/empathy-cell-renderer-text.c |    1 +
 libempathy-gtk/empathy-individual-store.c   |   21 ++++++++++++++-------
 2 files changed, 15 insertions(+), 7 deletions(-)
Comment 2 Xavier Claessens 2010-11-18 14:20:23 UTC
+1
Comment 3 Guillaume Desmottes 2010-11-18 14:22:44 UTC
This problem has been fixed in the development version. The fix will be available in the next major software release. Thank you for your bug report.
Comment 4 Guillaume Desmottes 2010-12-07 15:40:37 UTC
I'm still seeing this bug from time to time :(
Comment 5 Philip Withnall 2010-12-13 16:24:38 UTC
I wonder if the fix for bug #637136 will fix this, if it's a folks bug and was triggered by going offline?
Comment 6 Guillaume Desmottes 2010-12-14 06:43:36 UTC
Each time I observed this bug, all my accounts were connected and I didn't change my presence.
Comment 7 Travis Reitter 2011-01-28 19:45:14 UTC
It looks like this also isn't bug 640551 or bug 640554, unfortunately.
Comment 8 Travis Reitter 2011-01-28 19:52:35 UTC
So, this is obviously a serious bug that I have yet to reproduce. And nobody seems to know exactly what triggers it.

Could everyone who has ever hit this bug run Empathy with FOLKS_DEBUG=all and report its output here when it happens? I'm guessing it will be something obvious in the output (like an aggregation cycle).

In the meantime, I'll comb through the aggregator code to see if there's anything that could cause some sort of infinite loop (other than what we fixed for bug 637136).
Comment 9 David Laban 2011-01-31 11:37:21 UTC
backtrace (found using (ulimit -v 600000 ; gdb -x ~/src/telepathy-psyke/tests/tools/run_and_bt.gdb --args empathy) ) is below.


]

GLib-ERROR **: /tmp/buildd/glib2.0-2.27.91/./glib/gmem.c:202: failed to allocate 72 bytes
aborting...

Program received signal SIGTRAP, Trace/breakpoint trap.

Thread 140736840423184 (LWP 12020)

  • #0 g_logv
    at /tmp/buildd/glib2.0-2.27.91/./glib/gmessages.c line 563
  • #1 g_log
    at /tmp/buildd/glib2.0-2.27.91/./glib/gmessages.c line 577
  • #2 g_malloc0
    at /tmp/buildd/glib2.0-2.27.91/./glib/gmem.c line 201
  • #3 g_file_attribute_matcher_new
    at /tmp/buildd/glib2.0-2.27.91/./gio/gfileinfo.c line 2196
  • #4 _g_local_file_info_get_from_fd
    at /tmp/buildd/glib2.0-2.27.91/./gio/glocalfileinfo.c line 1776
  • #5 query_info_async_thread
    at /tmp/buildd/glib2.0-2.27.91/./gio/gfileinputstream.c line 417
  • #6 run_in_thread
    at /tmp/buildd/glib2.0-2.27.91/./gio/gsimpleasyncresult.c line 838
  • #7 io_job_thread
    at /tmp/buildd/glib2.0-2.27.91/./gio/gioscheduler.c line 181
  • #8 g_thread_pool_thread_proxy
    at /tmp/buildd/glib2.0-2.27.91/./glib/gthreadpool.c line 319
  • #9 g_thread_create_proxy
    at /tmp/buildd/glib2.0-2.27.91/./glib/gthread.c line 1897
  • #10 start_thread
    at pthread_create.c line 300
  • #11 clone
    at ../sysdeps/unix/sysv/linux/x86_64/clone.S line 112
  • #12 ??
A debugging session is active.

        Inferior 1 [process 17543] will be killed.

Quit anyway? (y or n) [answered Y; input not from terminal]
Comment 10 Guillaume Desmottes 2011-01-31 16:04:35 UTC
I just reproduced this bug with FOLKS_DEBUG=all and the console wasn't flooded by debug output. :\
Comment 11 Travis Reitter 2011-01-31 17:27:06 UTC
(In reply to comment #9)
 
> GLib-ERROR **: /tmp/buildd/glib2.0-2.27.91/./glib/gmem.c:202: failed to
> allocate 72 bytes
> aborting...
> 
> Program received signal SIGTRAP, Trace/breakpoint trap.
> 

Hmm - I'm not sure this is necessarily related. Or do you mean the allocation failed due to OOM?

At any rate, I'm not sure what the backtrace is telling us.
Comment 12 Travis Reitter 2011-01-31 17:27:31 UTC
(In reply to comment #10)
> I just reproduced this bug with FOLKS_DEBUG=all and the console wasn't flooded
> by debug output. :\

Could you email it to me anyhow? Maybe there's some obvious pattern I would notice.
Comment 13 Guillaume Desmottes 2011-02-01 14:08:25 UTC
We finally got it ! For the record, the fix is:


commit 9503c4aa28b9a4215e3e325a31b500f2c78b712a
Author: Guillaume Desmottes <guillaume.desmottes@collabora.co.uk>
Date:   Tue Feb 1 11:34:37 2011 +0100

    individual-widget: connect on the notify::client-types only once
    
    Reconnecting a signal while you are handling it isn't exactly a good idea as
    it will result in an infinite loop eating all your memory (#635105).


This problem has been fixed in the development version. The fix will be available in the next major software release. Thank you for your bug report.