Several leaks in g_settings_new() [g_object_new()] from ccsGSettingsNewNoPath() [ccs_gsettings_interface_wrapper.c:184]

Bug #1097649 reported by Daniel van Vugt on 2013-01-09
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Compiz
Medium
Sam Spilsbury
0.9.8
Medium
Unassigned
compiz (Ubuntu)
Medium
Sam Spilsbury

Bug Description

Several leaks in g_settings_new() [g_object_new()] from ccsGSettingsNewNoPath() [ccs_gsettings_interface_wrapper.c:184]

==9349== 64 bytes in 1 blocks are possibly lost in loss record 753 of 1,327
==9349== at 0x4C29E46: calloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==9349== by 0x6E32738: g_malloc0 (in /lib/x86_64-linux-gnu/libglib-2.0.so.0.3400.1)
==9349== by 0x7E210E4: g_closure_new_simple (in /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.3400.1)
==9349== by 0x7E227BD: g_signal_type_cclosure_new (in /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.3400.1)
==9349== by 0x7E37027: g_signal_new (in /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.3400.1)
==9349== by 0x7E26A88: ??? (in /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.3400.1)
==9349== by 0x7E40925: g_type_class_ref (in /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.3400.1)
==9349== by 0x7E405BE: g_type_class_ref (in /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.3400.1)
==9349== by 0x7E28ECC: g_object_new_valist (in /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.3400.1)
==9349== by 0x7E29373: g_object_new (in /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.3400.1)
==9349== by 0xB1E24F8: ccsGSettingsWrapperNewForSchema (ccs_gsettings_interface_wrapper.c:184)
==9349== by 0xAFCF5FF: initBackend (gsettings.c:468)
==9349==
==9349== 64 bytes in 1 blocks are possibly lost in loss record 754 of 1,327
==9349== at 0x4C29E46: calloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==9349== by 0x6E32738: g_malloc0 (in /lib/x86_64-linux-gnu/libglib-2.0.so.0.3400.1)
==9349== by 0x7E210E4: g_closure_new_simple (in /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.3400.1)
==9349== by 0x7E227BD: g_signal_type_cclosure_new (in /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.3400.1)
==9349== by 0x7E37027: g_signal_new (in /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.3400.1)
==9349== by 0xB492226: ??? (in /usr/lib/x86_64-linux-gnu/libgio-2.0.so.0.3400.1)
==9349== by 0x7E40925: g_type_class_ref (in /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.3400.1)
==9349== by 0x7E28ECC: g_object_new_valist (in /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.3400.1)
==9349== by 0x7E29373: g_object_new (in /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.3400.1)
==9349== by 0xB1E24F8: ccsGSettingsWrapperNewForSchema (ccs_gsettings_interface_wrapper.c:184)
==9349== by 0xAFCF5FF: initBackend (gsettings.c:468)
==9349== by 0xA316D4A: ccsSetBackendDefault (main.c:1268)
==9349==
==9349== 64 bytes in 1 blocks are possibly lost in loss record 755 of 1,327
==9349== at 0x4C29E46: calloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==9349== by 0x6E32738: g_malloc0 (in /lib/x86_64-linux-gnu/libglib-2.0.so.0.3400.1)
==9349== by 0x7E210E4: g_closure_new_simple (in /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.3400.1)
==9349== by 0x7E227BD: g_signal_type_cclosure_new (in /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.3400.1)
==9349== by 0x7E37027: g_signal_new (in /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.3400.1)
==9349== by 0xB492284: ??? (in /usr/lib/x86_64-linux-gnu/libgio-2.0.so.0.3400.1)
==9349== by 0x7E40925: g_type_class_ref (in /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.3400.1)
==9349== by 0x7E28ECC: g_object_new_valist (in /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.3400.1)
==9349== by 0x7E29373: g_object_new (in /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.3400.1)
==9349== by 0xB1E24F8: ccsGSettingsWrapperNewForSchema (ccs_gsettings_interface_wrapper.c:184)
==9349== by 0xAFCF5FF: initBackend (gsettings.c:468)
==9349== by 0xA316D4A: ccsSetBackendDefault (main.c:1268)
==9349==
==9349== 64 bytes in 1 blocks are possibly lost in loss record 756 of 1,327
==9349== at 0x4C29E46: calloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==9349== by 0x6E32738: g_malloc0 (in /lib/x86_64-linux-gnu/libglib-2.0.so.0.3400.1)
==9349== by 0x7E210E4: g_closure_new_simple (in /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.3400.1)
==9349== by 0x7E227BD: g_signal_type_cclosure_new (in /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.3400.1)
==9349== by 0x7E37027: g_signal_new (in /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.3400.1)
==9349== by 0xB4922CE: ??? (in /usr/lib/x86_64-linux-gnu/libgio-2.0.so.0.3400.1)
==9349== by 0x7E40925: g_type_class_ref (in /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.3400.1)
==9349== by 0x7E28ECC: g_object_new_valist (in /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.3400.1)
==9349== by 0x7E29373: g_object_new (in /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.3400.1)
==9349== by 0xB1E24F8: ccsGSettingsWrapperNewForSchema (ccs_gsettings_interface_wrapper.c:184)
==9349== by 0xAFCF5FF: initBackend (gsettings.c:468)
==9349== by 0xA316D4A: ccsSetBackendDefault (main.c:1268)
==9349==
==9349== 64 bytes in 1 blocks are possibly lost in loss record 757 of 1,327
==9349== at 0x4C29E46: calloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==9349== by 0x6E32738: g_malloc0 (in /lib/x86_64-linux-gnu/libglib-2.0.so.0.3400.1)
==9349== by 0x7E210E4: g_closure_new_simple (in /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.3400.1)
==9349== by 0x7E227BD: g_signal_type_cclosure_new (in /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.3400.1)
==9349== by 0x7E37027: g_signal_new (in /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.3400.1)
==9349== by 0xB49231C: ??? (in /usr/lib/x86_64-linux-gnu/libgio-2.0.so.0.3400.1)
==9349== by 0x7E40925: g_type_class_ref (in /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.3400.1)
==9349== by 0x7E28ECC: g_object_new_valist (in /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.3400.1)
==9349== by 0x7E29373: g_object_new (in /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.3400.1)
==9349== by 0xB1E24F8: ccsGSettingsWrapperNewForSchema (ccs_gsettings_interface_wrapper.c:184)
==9349== by 0xAFCF5FF: initBackend (gsettings.c:468)
==9349== by 0xA316D4A: ccsSetBackendDefault (main.c:1268)
==9349==

Related branches

Changed in compiz (Ubuntu):
status: New → Triaged
importance: Undecided → Medium
Changed in compiz:
assignee: nobody → Sam Spilsbury (smspillaz)
Sam Spilsbury (smspillaz) wrote :

I don't think this is a leak in compiz.

The "??" function in the valgrind trace is g_settings_class_init, which is called once when the class is first instantiated. It creates a bunch of signals (eg, g_signal_new in http://git.gnome.org/browse/glib/tree/gio/gsettings.c#n641), and as far as I can tell, never gets rid of them. In fact, searching the glib documentation, it seems like there's no way to get rid of a signal once it is created, as it is global program state.

I'd recommend changing this to "Invalid" and updating the supressions file.

(Hint: The GLib/GIO supressions file was already imported into experimental-memcheck/compiz.supp - I'd suggest using the suppressions from there).

Changed in compiz:
assignee: Sam Spilsbury (smspillaz) → nobody
Daniel van Vugt (vanvugt) wrote :

Ok, leave this open to update suppressions at least.

Changed in compiz:
assignee: nobody → Sam Spilsbury (smspillaz)
Changed in compiz (Ubuntu):
assignee: nobody → Sam Spilsbury (smspillaz)
Changed in compiz:
status: Triaged → In Progress
Changed in compiz (Ubuntu):
status: Triaged → In Progress
Changed in compiz:
status: In Progress → Fix Committed
Daniel van Vugt (vanvugt) wrote :

Fix committed into lp:compiz at revision 3567, scheduled for release in Compiz 0.9.9.0

Changed in compiz (Ubuntu):
status: In Progress → Fix Committed
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package compiz - 1:0.9.9~daily13.01.21-0ubuntu1

---------------
compiz (1:0.9.9~daily13.01.21-0ubuntu1) raring; urgency=low

  [ Brandon Schaefer ]
  * Window Management - Implement maximize and semi-maximise transitions
    (LP: #689792)

  [ Sam Spilsbury ]
  * Several memory leaks in ccsIntegratedSettingListAppend() from
    ccsIntegratedSettingsStorageDefaultFindMatchingSettingsByPredicate()
    from
    ccsIntegratedSettingsStorageDefaultFindMatchingSettingsByPluginAndSe
    ttingName() (LP: #1100539)
  * Several leaks in g_settings_new() [g_object_new()] from
    ccsGSettingsNewNoPath() [ccs_gsettings_interface_wrapper.c:184] (LP:
    #1097649)
  * Compiz reports incorrect _NET_DESKTOP_GEOMETRY until first viewport
    switch (LP: #1096455)

  [ Automatic PS uploader ]
  * Automatic snapshot from revision 3569
 -- Automatic PS uploader <email address hidden> Mon, 21 Jan 2013 04:01:41 +0000

Changed in compiz (Ubuntu):
status: Fix Committed → Fix Released
Daniel van Vugt (vanvugt) wrote :

This bug was not fixed (suppressed) properly. Reopened as bug 1102822.

Changed in compiz:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers