small leaks in unity-greeter

Bug #988409 reported by Sebastien Bacher
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Light Display Manager
Fix Released
Low
Unassigned
lightdm (Ubuntu)
Fix Released
Low
Unassigned
unity-greeter (Ubuntu)
Triaged
Low
Unassigned

Bug Description

Trying to get details on another bug I started running unity-greeter under valgrind, that didn't get anywhere for the bug I was trying to get details on but valgrind recorded some leaks so I figured I would report them at least ;-)

leak1:
==4777== 6 bytes in 1 blocks are definitely lost in loss record 247 of 8,856
==4777== at 0x402BE68: malloc (in /usr/lib/valgrind/vgpreload_memcheck-x86-linux.so)
==4777== by 0x482B96A: standard_malloc (gmem.c:85)
==4777== by 0x482BE02: g_malloc (gmem.c:159)
==4777== by 0x4841B8A: g_strdup (gstrfuncs.c:356)
==4777== by 0x481FF37: g_key_file_get_locale_string (gkeyfile.c:2212)
==4777== by 0x48E1470: lightdm_get_sessions (session.c:63)
==4777== by 0x805C4CC: session_chooser_constructor (session-chooser.c:644)
==4777== by 0x47A4230: g_object_newv (gobject.c:1632)
==4777== by 0x47A47C7: g_object_new (gobject.c:1542)
==4777== by 0x8056D56: fadable_box_construct (fadable-box.c:140)
==4777== by 0x805C58F: session_chooser_new (session-chooser.c:610)
==4777== by 0x8066838: user_list_construct (user-list.c:1039)
==4777== by 0x8067ABF: user_list_new (user-list.c:1147)
==4777== by 0x8058193: main_window_constructor (main-window.c:996)
==4777== by 0x47A3CF8: g_object_newv (gobject.c:1713)
==4777== by 0x47A47C7: g_object_new (gobject.c:1542)
==4777== by 0x8057C96: main_window_construct (main-window.c:795)
==4777== by 0x80583EF: main_window_new (main-window.c:801)
==4777== by 0x80607B0: unity_greeter_construct (unity-greeter.c:588)
==4777== by 0x8060E5F: unity_greeter_new (unity-greeter.c:803)
==4777== by 0x8061565: unity_greeter_main (unity-greeter.c:2627)
==4777== by 0x804F48F: main (unity-greeter.c:2714)

leak2:
==4777== 12 bytes in 1 blocks are definitely lost in loss record 1,990 of 8,856
==4777== at 0x402BE68: malloc (in /usr/lib/valgrind/vgpreload_memcheck-x86-linux.so)
==4777== by 0x482B96A: standard_malloc (gmem.c:85)
==4777== by 0x482BE02: g_malloc (gmem.c:159)
==4777== by 0x484022D: g_slice_alloc (gslice.c:1003)
==4777== by 0x4822C59: g_list_append (glist.c:228)
==4777== by 0x805A6B5: menu_bar_set_layouts (menubar.c:463)
==4777== by 0x8057C3E: __main_window___lambda9__user_list_user_displayed_done (main-window.c:836)
==4777== by 0x479F242: g_cclosure_marshal_VOID__VOIDv (gmarshal.c:115)
==4777== by 0x479D726: _g_closure_invoke_va (gclosure.c:840)
==4777== by 0x47B6A28: g_signal_emit_valist (gsignal.c:3207)
==4777== by 0x47B78AE: g_signal_emit_by_name (gsignal.c:3389)
==4777== by 0x80661BA: user_list_real_realize (user-list.c:2660)
==4777== by 0x479F242: g_cclosure_marshal_VOID__VOIDv (gmarshal.c:115)
==4777== by 0x479BDB6: g_type_class_meta_marshalv (gclosure.c:997)
==4777== by 0x479D726: _g_closure_invoke_va (gclosure.c:840)
==4777== by 0x47B6A28: g_signal_emit_valist (gsignal.c:3207)
==4777== by 0x47B7452: g_signal_emit (gsignal.c:3352)
==4777== by 0x4344207: gtk_widget_realize (gtkwidget.c:4507)
==4777== by 0x434841F: gtk_widget_set_parent (gtkwidget.c:8064)
==4777== by 0x41097DF: gtk_box_pack (gtkbox.c:992)
==4777== by 0x41099F0: gtk_box_add (gtkbox.c:1787)
==4777== by 0x47A0602: g_cclosure_marshal_VOID__OBJECT (gmarshal.c:1272)
==4777== by 0x479C2FC: g_type_class_meta_marshal (gclosure.c:970)

leak3:
==4729== 236 (48 direct, 188 indirect) bytes in 1 blocks are definitely lost in loss record 9,954 of 10,838
==4729== at 0x402BE68: malloc (in /usr/lib/valgrind/vgpreload_memcheck-x86-linux.so)
==4729== by 0x482B96A: standard_malloc (gmem.c:85)
==4729== by 0x482BE02: g_malloc (gmem.c:159)
==4729== by 0x484022D: g_slice_alloc (gslice.c:1003)
==4729== by 0x4840795: g_slice_alloc0 (gslice.c:1029)
==4729== by 0x47BF687: g_type_create_instance (gtype.c:1872)
==4729== by 0x806380F: user_entry_new (user-list.c:501)
==4729== by 0x806656C: user_list_add_entry (user-list.c:1881)
==4729== by 0x80665FC: user_list_add_manual_entry (user-list.c:2096)
==4729== by 0x8066BDB: user_list_construct (user-list.c:1141)
==4729== by 0x8067ABF: user_list_new (user-list.c:1147)
==4729== by 0x8058193: main_window_constructor (main-window.c:996)
==4729== by 0x47A3CF8: g_object_newv (gobject.c:1713)
==4729== by 0x47A47C7: g_object_new (gobject.c:1542)
==4729== by 0x8057C96: main_window_construct (main-window.c:795)
==4729== by 0x80583EF: main_window_new (main-window.c:801)
==4729== by 0x80607B0: unity_greeter_construct (unity-greeter.c:588)
==4729== by 0x8060E5F: unity_greeter_new (unity-greeter.c:803)
==4729== by 0x8061565: unity_greeter_main (unity-greeter.c:2627)
==4729== by 0x804F48F: main (unity-greeter.c:2714)

leak4:

==4777== 1,794 (120 direct, 1,674 indirect) bytes in 3 blocks are definitely lost in loss record 8,712 of 8,856
==4777== at 0x402BE68: malloc (in /usr/lib/valgrind/vgpreload_memcheck-x86-linux.so)
==4777== by 0x482B96A: standard_malloc (gmem.c:85)
==4777== by 0x482BE02: g_malloc (gmem.c:159)
==4777== by 0x484022D: g_slice_alloc (gslice.c:1003)
==4777== by 0x4840795: g_slice_alloc0 (gslice.c:1029)
==4777== by 0x481E2C1: g_key_file_new (gkeyfile.c:638)
==4777== by 0x48E233B: load_user_values (user.c:1123)
==4777== by 0x48E5426: lightdm_user_get_has_messages (user.c:1441)
==4777== by 0x805F534: unity_greeter_user_added_cb (unity-greeter.c:1316)
==4777== by 0x8060DC8: unity_greeter_construct (unity-greeter.c:744)
==4777== by 0x8060E5F: unity_greeter_new (unity-greeter.c:803)
==4777== by 0x8061565: unity_greeter_main (unity-greeter.c:2627)
==4777== by 0x804F48F: main (unity-greeter.c:2714)

Related branches

Revision history for this message
Sebastien Bacher (seb128) wrote :

(that's using 0.2.8-0ubuntu1 on precise)

Changed in unity-greeter (Ubuntu):
status: New → Triaged
importance: Undecided → Low
Revision history for this message
Sebastien Bacher (seb128) wrote :

one other one, could be libxklavier:

==8852== 52 bytes in 4 blocks are definitely lost in loss record 8,172 of 11,735
==8852== at 0x402BE68: malloc (in /usr/lib/valgrind/vgpreload_memcheck-x86-linux.so)
==8852== by 0x482B96A: standard_malloc (gmem.c:85)
==8852== by 0x482BE02: g_malloc (gmem.c:159)
==8852== by 0x4841B8A: g_strdup (gstrfuncs.c:356)
==8852== by 0x4EE0695: xkl_config_get_keyboard (xklavier_config_xkb.c:195)
==8852== by 0x4EE0E79: xkl_xkb_activate_config_rec (xklavier_config_xkb.c:515)
==8852== by 0x4EDD6E2: xkl_config_rec_activate (xklavier_config.c:996)
==8852== by 0x48E08F5: lightdm_set_layout (layout.c:160)
==8852== by 0x8059694: menu_bar_layout_toggled_cb (menubar.c:936)
==8852== by 0x479F242: g_cclosure_marshal_VOID__VOIDv (gmarshal.c:115)
==8852== by 0x479D726: _g_closure_invoke_va (gclosure.c:840)
==8852== by 0x47B6A28: g_signal_emit_valist (gsignal.c:3207)
==8852== by 0x47B7452: g_signal_emit (gsignal.c:3352)
==8852== by 0x413B5FC: gtk_check_menu_item_toggled (gtkcheckmenuitem.c:356)
==8852== by 0x423F06C: gtk_radio_menu_item_activate (gtkradiomenuitem.c:569)
==8852== by 0x479F242: g_cclosure_marshal_VOID__VOIDv (gmarshal.c:115)
==8852== by 0x479BDB6: g_type_class_meta_marshalv (gclosure.c:997)
==8852== by 0x479D726: _g_closure_invoke_va (gclosure.c:840)
==8852== by 0x47B6A28: g_signal_emit_valist (gsignal.c:3207)
==8852== by 0x47B7452: g_signal_emit (gsignal.c:3352)
==8852== by 0x42065D9: gtk_menu_item_activate (gtkmenuitem.c:1337)
==8852== by 0x413B53F: gtk_check_menu_item_set_active (gtkcheckmenuitem.c:310)
==8852== by 0x805A63F: menu_bar_set_layouts (menubar.c:483)
==8852== by 0x8057C3E: __main_window___lambda9__user_list_user_displayed_done (main-window.c:836)
==8852== by 0x479F242: g_cclosure_marshal_VOID__VOIDv (gmarshal.c:115)
==8852== by 0x479D726: _g_closure_invoke_va (gclosure.c:840)
==8852== by 0x47B6A28: g_signal_emit_valist (gsignal.c:3207)
==8852== by 0x47B78AE: g_signal_emit_by_name (gsignal.c:3389)
==8852== by 0x806318D: _user_list_scroll_animate_cb_animate_timer_animate (user-list.c:2475)
==8852== by 0x479FF5C: g_cclosure_marshal_VOID__DOUBLEv (gmarshal.c:928)
==8852== by 0x479D726: _g_closure_invoke_va (gclosure.c:840)
==8852== by 0x47B6A28: g_signal_emit_valist (gsignal.c:3207)
==8852== by 0x47B78AE: g_signal_emit_by_name (gsignal.c:3389)
==8852== by 0x804F8A0: _animate_timer_animate_cb_gsource_func (animate-timer.c:180)
==8852== by 0x4826A3E: g_timeout_dispatch (gmain.c:3859)
==8852== by 0x4825CD9: g_main_context_dispatch (gmain.c:2515)
==8852== by 0x48260E4: g_main_context_iterate.isra.21 (gmain.c:3123)
==8852== by 0x482652A: g_main_loop_run (gmain.c:3317)
==8852== by 0x41ECE24: gtk_main (gtkmain.c:1165)
==8852== by 0x8061901: unity_greeter_main (unity-greeter.c:2688)

Revision history for this message
Michael Terry (mterry) wrote :

The biggest leak (and smallest) was in lightdm, got a branch linked for those. The others are in unity-greeter or lixklavier.

Revision history for this message
Michael Terry (mterry) wrote :

(sorry, should have been clearer. My branch lp:~mterry/lightdm/memleaks fixes leak1 and leak4)

Changed in lightdm:
status: New → Fix Committed
importance: Undecided → Low
Changed in lightdm (Ubuntu):
status: New → Fix Committed
importance: Undecided → Low
Revision history for this message
Robert Ancell (robert-ancell) wrote :

Fixed in lightdm 1.3.1

Changed in lightdm:
status: Fix Committed → Fix Released
Changed in lightdm (Ubuntu):
status: Fix Committed → Fix Released
no longer affects: unity-greeter
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.