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 168389 - Panel leaks when gnome-vfs-daemon dies
Panel leaks when gnome-vfs-daemon dies
Status: RESOLVED FIXED
Product: gnome-panel
Classification: Other
Component: panel
2.9.x
Other All
: Normal major
: ---
Assigned To: Panel Maintainers
Panel Maintainers
Depends on:
Blocks:
 
 
Reported: 2005-02-24 14:02 UTC by Alexander Larsson
Modified: 2015-03-24 13:01 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
backtrace of crash with --g-fatal-warnings (80.80 KB, text/plain)
2005-02-25 09:17 UTC, Kjartan Maraas
  Details
Patch for egg-recent (2.64 KB, patch)
2005-02-25 09:27 UTC, Vincent Untz
none Details | Review

Description Alexander Larsson 2005-02-24 14:02:54 UTC
Please describe the problem:
If for whatever reason gnome-vfs-daemon dies, it seems gnome-panel leaks a lot.

Nautilus doesn't leak like this, even though it uses the daemon (through volume
monitor etc).

Steps to reproduce:
1. killall gnome-vfs-daemon
2. repeat 1 a few times
3. run 'top', look at gnome-panel like


Actual results:
22087 alex      25   0  564m 436m 6852 R 95.5 43.2   4:16.70 gnome-panel

Expected results:
Panel not usin 500 megs

Does this happen every time?
yes

Other information:
Comment 1 Kjartan Maraas 2005-02-24 16:10:10 UTC
When I run the panel under valgrind I see hangs after killing gnome-vfs-daemon.
Just the top panel though, and I can still use any applet on that panel, just
not launchers or menus.
Comment 2 Vincent Untz 2005-02-24 21:47:33 UTC
It seems the leak appears in panel_recent_append_documents_menu(). Might be a
libegg/recent problem... Need to investigate further.
Comment 3 Kjartan Maraas 2005-02-25 08:08:26 UTC
Ok, I tested a bit more and I saw normal operation for a short while after
killing the daemon, then I had a couple of minutes where the panel and nautilus
hung, and finally it went back to normal again. This was all running under
valgrind, so that could be related, but it clearly points out that something is
misbehaving. Valgrind reported some invalid reads after a while too, and a small
leak when doing gnome-session-remove, but the backtrace didn't have enough
symbols to be of any use. I'll try again with a newer version of valgrind since
I'm having problems running the one I've got against CVS HEAD...
Comment 4 Vincent Untz 2005-02-25 08:15:21 UTC
The huge leak is gone. But it seems there's still a small leak. Leaving open for
now.

2005-02-25  Vincent Untz  <vincent@vuntz.net>

	* panel-menu-button.c: (panel_menu_button_set_menu_path): fix leak
	* panel-recent.c: (panel_recent_append_documents_menuà: fix huge leak
	caused by EggRecentViewGtk's ref on the menu...
Comment 5 Kjartan Maraas 2005-02-25 09:11:30 UTC
This might have fixed this leak, but now I'm getting Glib-WARNING from the panel:

(gnome-panel:32584): GLib-GObject-CRITICAL **: g_object_unref: assertion
`object->ref_count > 0' failed

And I'm still seeing a period of non-responsiveness from the panel after killing
the daemon. I'll see if I can run oprofile when this happens and see what's up.
Comment 6 Vincent Untz 2005-02-25 09:17:02 UTC
Kjartan: I have a fix for the warnings. It's a libegg problem.

As for the period of non-responsiveness, I'm not sure what happens but I don't
see this.
Comment 7 Kjartan Maraas 2005-02-25 09:17:20 UTC
Created attachment 37929 [details]
backtrace of crash with --g-fatal-warnings

Attaching a backtrace from the crash I see when running with
--g-fatal-warnings.
Comment 8 Vincent Untz 2005-02-25 09:27:47 UTC
Created attachment 37930 [details] [review]
Patch for egg-recent

Kjartan: this should remove the warnings.

Still hunting for the other leak. I'm not sure, but this might be the menu
items of the recent menus that are not being freed (don't know why).
Comment 9 Kjartan Maraas 2005-02-25 10:01:25 UTC
Ok, that took care of the warnings I saw. The "still reachable part is down from
some 8 megs to 2.7 megs now, which is good. Here's the list of still reachable
blocks of memory that are still listed by valgrind:

==5835== 48464 bytes in 466 blocks are still reachable in loss record 215 of
220==5835==    at 0x1B90824C: malloc (vg_replace_malloc.c:130)
==5835==    by 0x6CC1EA: _XEnq (in /usr/X11R6/lib/libX11.so.6.2)
==5835==    by 0x6CD99B: _XReply (in /usr/X11R6/lib/libX11.so.6.2)
==5835==    by 0x6C83F5: XSync (in /usr/X11R6/lib/libX11.so.6.2)
==5835==    by 0x1BDB184C: _gdk_x11_copy_to_image (gdkimage-x11.c:545)
==5835==    by 0x1BD86E91: gdk_drawable_copy_to_image (gdkdraw.c:1034)
==5835==    by 0x1BD8FF88: gdk_pixmap_copy_to_image (gdkpixmap.c:514)
==5835==    by 0x1BD86E91: gdk_drawable_copy_to_image (gdkdraw.c:1034)
==5835==    by 0x1BD8F1F0: gdk_pixbuf_get_from_drawable (gdkpixbuf-drawable.c:1302)
==5835==    by 0x807F84A: panel_background_monitor_get_region
(panel-background-monitor.c:325)
==5835==    by 0x807E2A5: get_desktop_pixbuf (panel-background.c:194)
==5835==    by 0x807E371: get_composited_pixbuf (panel-background.c:245)
==5835==    by 0x807E464: panel_background_composite (panel-background.c:306)
==5835==    by 0x807E56D: panel_background_transform (panel-background.c:478)
==5835==    by 0x8064BA6: panel_widget_set_background_region (panel-widget.c:1295)
==5835==    by 0x806553D: toplevel_configure_event (panel-widget.c:1584)
==5835==    by 0x1BBE001C: _gtk_marshal_BOOLEAN__BOXED (gtkmarshalers.c:83)
==5835==    by 0x1C1D6D34: g_closure_invoke (gclosure.c:437)
==5835==    by 0x1C1E993D: signal_emit_unlocked_R (gsignal.c:2485)
==5835==    by 0x1C1EA600: g_signal_emit_valist (gsignal.c:2254)
==5835==    by 0x1C1EAB0F: g_signal_emit (gsignal.c:2288)
==5835==    by 0x1BCAF1C5: gtk_widget_event_internal (gtkwidget.c:3626)
==5835==    by 0x1BBDEC7F: gtk_main_do_event (gtkmain.c:1403)
==5835==    by 0x1BDAB4B5: gdk_event_dispatch (gdkevents-x11.c:2220)
==5835==    by 0x1C22FD44: g_main_context_dispatch (gmain.c:1947)
==5835==    by 0x1C2315F0: g_main_context_iterate (gmain.c:2578)
==5835==    by 0x1C231847: g_main_loop_run (gmain.c:2782)
==5835==    by 0x1BBDE06E: gtk_main (gtkmain.c:963)
==5835==    by 0x8063741: main (main.c:90)
==5835==
==5835==
==5835== 97920 bytes in 3 blocks are still reachable in loss record 216 of 220
==5835==    at 0x1B90824C: malloc (vg_replace_malloc.c:130)
==5835==    by 0x545D9B: __gconv_open (in /lib/tls/libc-2.3.4.so)
==5835==    by 0x5458D4: iconv_open (in /lib/tls/libc-2.3.4.so)
==5835==    by 0x1C21C059: try_conversion (gconvert.c:66)
==5835==    by 0x1C21C0E2: g_iconv_open (gconvert.c:117)
==5835==    by 0x1C21C49C: open_converter (gconvert.c:381)
==5835==    by 0x1C21CAA3: g_convert (gconvert.c:504)
==5835==    by 0x1C21CBB1: g_convert_with_fallback (gconvert.c:716)
==5835==    by 0x1BDB8165: gdk_utf8_to_string_target (gdkselection-x11.c:784)
==5835==    by 0x1BDBBC18: set_text_property (gdkwindow-x11.c:2577)
==5835==    by 0x1BDBBD5A: set_wm_name (gdkwindow-x11.c:2621)
==5835==    by 0x1BDBE207: gdk_window_set_title (gdkwindow-x11.c:2656)
==5835==    by 0x1BDBE777: gdk_window_new (gdkwindow-x11.c:908)
==5835==    by 0x1BDA026D: gdk_display_open (gdkdisplay-x11.c:202)
==5835==    by 0x1BD844E4: gdk_display_open_default_libgtk_only (gdk.c:272)
==5835==    by 0x1BBDD644: gtk_init_check (gtkmain.c:702)
==5835==    by 0x1BBDD671: gtk_init (gtkmain.c:737)
==5835==    by 0x1B9F27F5: bonobo_ui_gtk_post_args_parse (bonobo-ui-init-gtk.c:42)
==5835==    by 0x1BA5F0E8: gnome_program_postinit (gnome-program.c:1633)
==5835==    by 0x1BA5F44F: gnome_program_init_common (gnome-program.c:1865)
==5835==    by 0x1BA5F781: gnome_program_init (gnome-program.c:1683)
==5835==    by 0x80636B8: main (main.c:54)
==5835==
==5835==
==5835== 118568 bytes in 1750 blocks are still reachable in loss record 217 of 220
==5835==    at 0x1B908C66: realloc (vg_replace_malloc.c:196)
==5835==    by 0x1C235A4D: g_realloc (gmem.c:170)
==5835==    by 0x1C1D617F: g_closure_add_marshal_guards (gclosure.c:196)
==5835==    by 0x1C1DCCC7: g_object_watch_closure (gobject.c:1951)
==5835==    by 0x1C1DCF76: g_cclosure_new_object_swap (gobject.c:2013)
==5835==    by 0x1C1DC774: g_signal_connect_object (gobject.c:1866)
==5835==    by 0x1BB270A3: gtk_accel_label_set_accel_widget (gtkaccellabel.c:430)
==5835==    by 0x1BBC4DF4: gtk_image_menu_item_new_with_mnemonic
(gtkimagemenuitem.c:403)
==5835==    by 0x809A805: egg_recent_view_gtk_add_to_menu
(egg-recent-view-gtk.c:272)
==5835==    by 0x809AA07: model_changed_cb (egg-recent-view-gtk.c:353)
==5835==    by 0x1C1EB774: g_cclosure_marshal_VOID__POINTER (gmarshal.c:601)
==5835==    by 0x1C1D6D34: g_closure_invoke (gclosure.c:437)
==5835==    by 0x1C1E993D: signal_emit_unlocked_R (gsignal.c:2485)
==5835==    by 0x1C1EA8C3: g_signal_emit_valist (gsignal.c:2244)
==5835==    by 0x1C1EAB0F: g_signal_emit (gsignal.c:2288)
==5835==    by 0x809916F: egg_recent_model_changed (egg-recent-model.c:1675)
==5835==    by 0x808593B: panel_recent_append_documents_menu (panel-recent.c:268)
==5835==    by 0x8084C1F: panel_place_menu_item_create_menu (panel-menu-items.c:472)
==5835==    by 0x8085008: panel_place_menu_item_new (panel-menu-items.c:789)
==5835==    by 0x8081497: panel_menu_bar_instance_init (panel-menu-bar.c:143)
==5835==    by 0x1C1EF403: g_type_create_instance (gtype.c:1596)
==5835==    by 0x1C1DA0CF: g_object_constructor (gobject.c:1045)
==5835==    by 0x1C1D9595: g_object_newv (gobject.c:942)
==5835==    by 0x1C1D9FCB: g_object_new_valist (gobject.c:985)
==5835==    by 0x1C1DA0A5: g_object_new (gobject.c:823)
==5835==    by 0x80816AE: panel_menu_bar_load_from_gconf (panel-menu-bar.c:288)
==5835==    by 0x806EED7: panel_applet_load_idle_handler (applet.c:889)
==5835==    by 0x1C232B2F: g_idle_dispatch (gmain.c:3821)
==5835==    by 0x1C22FD44: g_main_context_dispatch (gmain.c:1947)
==5835==    by 0x1C2315F0: g_main_context_iterate (gmain.c:2578)
==5835==
==5835==
==5835== 569376 bytes in 552 blocks are still reachable in loss record 218 of 220
==5835==    at 0x1B90824C: malloc (vg_replace_malloc.c:130)
==5835==    by 0x1C235AEF: g_try_malloc (gmem.c:194)
==5835==    by 0x1BE0552F: gdk_pixbuf_new (gdk-pixbuf.c:300)
==5835==    by 0x1BE0A0B1: gdk_pixbuf_loader_close (gdk-pixbuf-loader.c:760)
==5835==    by 0x1BE082A5: gdk_pixbuf_new_from_file_at_scale (gdk-pixbuf-io.c:1097)
==5835==    by 0x1BE083D0: gdk_pixbuf_new_from_file_at_size (gdk-pixbuf-io.c:987)
==5835==    by 0x809B6CA: egg_recent_util_get_icon (egg-recent-util.c:64)
==5835==    by 0x809A7C8: egg_recent_view_gtk_add_to_menu
(egg-recent-view-gtk.c:257)
==5835==    by 0x809AA07: model_changed_cb (egg-recent-view-gtk.c:353)
==5835==    by 0x1C1EB774: g_cclosure_marshal_VOID__POINTER (gmarshal.c:601)
==5835==    by 0x1C1D6D34: g_closure_invoke (gclosure.c:437)
==5835==    by 0x1C1E993D: signal_emit_unlocked_R (gsignal.c:2485)
==5835==    by 0x1C1EA8C3: g_signal_emit_valist (gsignal.c:2244)
==5835==    by 0x1C1EAB0F: g_signal_emit (gsignal.c:2288)
==5835==    by 0x809916F: egg_recent_model_changed (egg-recent-model.c:1675)
==5835==    by 0x808593B: panel_recent_append_documents_menu (panel-recent.c:268)
==5835==    by 0x8084C1F: panel_place_menu_item_create_menu (panel-menu-items.c:472)
==5835==    by 0x80850BC: panel_place_menu_item_recreate_menu
(panel-menu-items.c:486)
==5835==    by 0x1C1EB808: g_cclosure_marshal_VOID__OBJECT (gmarshal.c:636)
==5835==    by 0x1C1D6D34: g_closure_invoke (gclosure.c:437)
==5835==    by 0x1C1E993D: signal_emit_unlocked_R (gsignal.c:2485)
==5835==    by 0x1C1EA8C3: g_signal_emit_valist (gsignal.c:2244)
==5835==    by 0x1C1EAB0F: g_signal_emit (gsignal.c:2288)
==5835==    by 0x1BEB07D2: _gnome_vfs_volume_monitor_unmounted
(gnome-vfs-volume-monitor.c:648)
==5835==    by 0x1BEB0BF1: _gnome_vfs_volume_monitor_unmount_all
(gnome-vfs-volume-monitor.c:570)
==5835==    by 0x1BEAF99F: _gnome_vfs_volume_monitor_client_daemon_died
(gnome-vfs-volume-monitor-client.c:215)
==5835==    by 0x1BE90F31: daemon_connection_broken (gnome-vfs-client.c:199)
==5835==    by 0x1C1B5C80: link_connection_emit_broken (linc-connection.c:140)
==5835==    by 0x1C1B5CE5: link_connection_broken_idle (linc-connection.c:161)
==5835==    by 0x1C232B2F: g_idle_dispatch (gmain.c:3821)
==5835==
==5835==
==5835== 656308 bytes in 6504 blocks are still reachable in loss record 219 of 220
==5835==    at 0x1B908B7D: calloc (vg_replace_malloc.c:175)
==5835==    by 0x1C2359E7: g_malloc0 (gmem.c:154)
==5835==    by 0x1C1EF1CF: g_type_create_instance (gtype.c:1576)
==5835==    by 0x1C1DA0CF: g_object_constructor (gobject.c:1045)
==5835==    by 0x1C1D9595: g_object_newv (gobject.c:942)
==5835==    by 0x1C1D9FCB: g_object_new_valist (gobject.c:985)
==5835==    by 0x1C1DA0A5: g_object_new (gobject.c:823)
==5835==    by 0x1BBC40E3: gtk_image_new_from_pixbuf (gtkimage.c:593)
==5835==    by 0x809A7DA: egg_recent_view_gtk_add_to_menu
(egg-recent-view-gtk.c:265)
==5835==    by 0x809AA07: model_changed_cb (egg-recent-view-gtk.c:353)
==5835==    by 0x1C1EB774: g_cclosure_marshal_VOID__POINTER (gmarshal.c:601)
==5835==    by 0x1C1D6D34: g_closure_invoke (gclosure.c:437)
==5835==    by 0x1C1E993D: signal_emit_unlocked_R (gsignal.c:2485)
==5835==    by 0x1C1EA8C3: g_signal_emit_valist (gsignal.c:2244)
==5835==    by 0x1C1EAB0F: g_signal_emit (gsignal.c:2288)
==5835==    by 0x809916F: egg_recent_model_changed (egg-recent-model.c:1675)
==5835==    by 0x808593B: panel_recent_append_documents_menu (panel-recent.c:268)
==5835==    by 0x8084C1F: panel_place_menu_item_create_menu (panel-menu-items.c:472)
==5835==    by 0x8085008: panel_place_menu_item_new (panel-menu-items.c:789)
==5835==    by 0x8081497: panel_menu_bar_instance_init (panel-menu-bar.c:143)
==5835==    by 0x1C1EF403: g_type_create_instance (gtype.c:1596)
==5835==    by 0x1C1DA0CF: g_object_constructor (gobject.c:1045)
==5835==    by 0x1C1D9595: g_object_newv (gobject.c:942)
==5835==    by 0x1C1D9FCB: g_object_new_valist (gobject.c:985)
==5835==    by 0x1C1DA0A5: g_object_new (gobject.c:823)
==5835==    by 0x80816AE: panel_menu_bar_load_from_gconf (panel-menu-bar.c:288)
==5835==    by 0x806EED7: panel_applet_load_idle_handler (applet.c:889)
==5835==    by 0x1C232B2F: g_idle_dispatch (gmain.c:3821)
==5835==    by 0x1C22FD44: g_main_context_dispatch (gmain.c:1947)
==5835==    by 0x1C2315F0: g_main_context_iterate (gmain.c:2578)
==5835==
==5835==
==5835== 873947 bytes in 20559 blocks are still reachable in loss record 220 of 220
==5835==    at 0x1B90824C: malloc (vg_replace_malloc.c:130)
==5835==    by 0x1C235985: g_malloc (gmem.c:137)
==5835==    by 0x1C223B5E: g_hash_table_new_full (ghash.c:146)
==5835==    by 0x1C223BDC: g_hash_table_new (ghash.c:116)
==5835==    by 0x1C21F77F: g_quark_from_static_string (gdataset.c:595)
==5835==    by 0x1C1F41D2: g_type_init_with_debug_flags (gtype.c:3416)
==5835==    by 0x1C1F4334: g_type_init (gtype.c:3487)
==5835==    by 0x1BA5F75D: gnome_program_init (gnome-program.c:1680)
==5835==    by 0x80636B8: main (main.c:54)
==5835==
==5835== LEAK SUMMARY:
==5835==    definitely lost: 1251 bytes in 64 blocks.
==5835==    indirectly lost: 4692 bytes in 153 blocks.
==5835==    possibly lost:   2758 bytes in 85 blocks.
==5835==    still reachable: 2739294 bytes in 38201 blocks.
Comment 10 Kjartan Maraas 2005-02-25 10:02:40 UTC
Btw, maybe we should check the changes to egg-recent against some of the
blockers listed for that module? We should get these changes tested in other
modules and commited in libegg ASAP IMO.
Comment 11 Vincent Untz 2005-02-25 10:58:37 UTC
Kjartan: I sent a mail to James to ask him if he could review the patch or let
me review them and commit them a few minutes ago.

The first block of still reachable memory is from panel-background.c. Could you
open another bug for this one so we don't forget it?

The other blocks seem to be the menu items of the recent submenu... There's
probably a ref somewhere that keeps them from being destroyed.
Comment 12 Vincent Untz 2005-02-25 10:59:14 UTC
s/he could review the patch/he could review the patches/ because there are a lot
of patches...
Comment 13 Vincent Untz 2005-02-25 17:13:31 UTC
Forget my request for a new bug fot the first block of memory: I found it.
Comment 14 Vincent Untz 2005-02-25 23:25:58 UTC
Found another important leak.
Now it should be better. It seems it's still leaking a bit, but that's nothing
compared to what was fixed.
Comment 15 Vincent Untz 2005-02-26 11:11:07 UTC
I can't find what's leaking now. valgrind don't help me much... Kjartan, you'll
be my hero of the day if you find some time to look at this with valgrind.
Comment 16 Kjartan Maraas 2005-02-28 10:55:56 UTC
I'll take a stab at this later today.
Comment 17 Kjartan Maraas 2005-02-28 15:34:48 UTC
Vincent, I've uploaded a log from running gnome-panel (from CVS today) under
valgrind at:

http://www.gnome.org/~kmaraas/gnome-panel-valgrind-session.txt.gz

Hope this helps.
Comment 18 Vincent Untz 2005-02-28 16:11:34 UTC
Kjartan: I'm sorry, I should have told you to add the patch I made in bug
#168578. Would it be possible to run valgrind again?
Comment 19 Kjartan Maraas 2005-02-28 22:59:28 UTC
It seems I've been running with the egg-recent-view-gtk.c part, but not the
egg-recent-model.c stuff. I'll do another run with that too.
Comment 20 Vincent Untz 2005-07-03 09:08:42 UTC
I opened a bug for the libegg patch.
Kjartan: any news on this?
Comment 21 Reinout van Schouwen 2005-08-21 20:42:19 UTC
Obviously not going to happen for 2.10.x any more. Is this still a problem?
Comment 22 Vincent Untz 2005-09-16 12:01:41 UTC
Marking as NEEDINFO until Kjartan finds some time to look at it again.
Comment 23 Kjartan Maraas 2005-09-18 09:23:24 UTC
The patch for libegg doesn't apply cleanly any more:

[kmaraas@localhost gnome-panel]$ patch < ~/egg-recent-cleanups.patch
patching file egg-recent-model.c
Hunk #1 succeeded at 625 (offset 55 lines).
Hunk #2 succeeded at 747 (offset 4 lines).
Hunk #3 succeeded at 1032 (offset 68 lines).
Hunk #4 succeeded at 981 with fuzz 1 (offset 4 lines).
patching file egg-recent-view-gtk.c
Hunk #1 succeeded at 49 (offset 2 lines).
Hunk #2 succeeded at 352 with fuzz 1 (offset 40 lines).
Hunk #3 succeeded at 405 (offset 14 lines).
Hunk #4 FAILED at 509.
Hunk #5 succeeded at 680 (offset 57 lines).
Hunk #6 succeeded at 656 (offset 14 lines).
Hunk #7 succeeded at 723 (offset 56 lines).
Hunk #8 FAILED at 783.
2 out of 8 hunks FAILED -- saving rejects to file egg-recent-view-gtk.c.rej
Comment 24 Vincent Untz 2005-09-18 12:47:20 UTC
Kjartan: I believe the patch is not needed anymore :-)
Comment 25 Kjartan Maraas 2005-09-18 21:17:46 UTC
Ok, I ran without the patch and I still see a lot of still reachable stuff
reported, but nothing that's "definitely leaked". Closing this then.