GNOME Bugzilla – Bug 307260
Leak in the registry code
Last modified: 2006-01-13 16:50:03 UTC
Valgrind reports this while running nautilus: ==8405== 2872 (1012 direct, 1860 indirect) bytes in 11 blocks are definitely lost in loss record 5418 of 5529 ==8405== at 0x1B909B71: calloc (vg_replace_malloc.c:175) ==8405== by 0x1C4E8FB7: g_malloc0 (gmem.c:154) ==8405== by 0x1CD01732: load_plugin (gstlibxmlregistry.c:813) ==8405== by 0x1CD020DD: gst_xml_registry_load (gstlibxmlregistry.c:928) ==8405== by 0x1CCF8303: gst_registry_load (gstregistry.c:125) ==8405== by 0x1CCF8DED: _registry_load_func (gstregistrypool.c:110) ==8405== by 0x1C4E0323: g_list_foreach (glist.c:670) ==8405== by 0x1CCF8E17: gst_registry_pool_load_all (gstregistrypool.c:125) ==8405== by 0x1CCBCC10: init_post (gst.c:636) ==8405== by 0x1CCBCF49: gst_init_check_with_popt_table (gst.c:343) ==8405== by 0x1CCBCF7D: gst_init_with_popt_table (gst.c:288) ==8405== by 0x1CCBCFBC: gst_init (gst.c:267) ==8405== by 0x1CC414AD: bacon_video_widget_init_backend (bacon-video-widget-gst.c:3179) ==8405== by 0x1CC39E7B: nautilus_module_initialize (totem-properties-main.c:128) ==8405== by 0x1B972AF4: nautilus_module_load (nautilus-module.c:98) ==8405== by 0x1C4A4E3C: g_type_module_use (gtypemodule.c:190) ==8405== by 0x1B972E77: nautilus_module_init (nautilus-module.c:172) ==8405== by 0x8064584: nautilus_application_startup (nautilus-application.c:362) ==8405== by 0x8070E66: main (nautilus-main.c:423)
Created attachment 48796 [details] testcase Seems that gstreamer leaks memory when registry is out of date and is being rebuilt. 1) gcc `pkg-config --cflags --libs gstreamer-0.8` -o testcase testcase.c 2) valgrind ./testcase 2> noleaks.log 3) make install # update *.so files 4) valgrind ./testcase 2> memleaks.log
Confirmed
*** Bug 170293 has been marked as a duplicate of this bug. ***
Updating with a fresh backtrace: ==19841== 2880 (1012 direct, 1868 indirect) bytes in 11 blocks are definitely lost in loss record 3788 of 3914 ==19841== at 0x1B904B64: calloc (vg_replace_malloc.c:279) ==19841== by 0x1C81BC13: g_malloc0 (gmem.c:154) ==19841== by 0x1B9DC952: load_plugin (gstlibxmlregistry.c:813) ==19841== by 0x1B9DD2FD: gst_xml_registry_load (gstlibxmlregistry.c:928) ==19841== by 0x1B9D34AB: gst_registry_load (gstregistry.c:125) ==19841== by 0x1B9D3F95: _registry_load_func (gstregistrypool.c:110) ==19841== by 0x1C812BDB: g_list_foreach (glist.c:670) ==19841== by 0x1B9D3FBF: gst_registry_pool_load_all (gstregistrypool.c:125) ==19841== by 0x1B997C28: init_post (gst.c:643) ==19841== by 0x1B997F61: gst_init_check_with_popt_table (gst.c:343) ==19841== by 0x1B997FB5: gst_init_with_popt_table (gst.c:288) ==19841== by 0x1B997FF4: gst_init (gst.c:267) ==19841== by 0x8063C81: acme_volume_gstreamer_class_intern_init (acme-volume-gstreamer.c:359) ==19841== by 0x1C7DB6F3: g_type_class_ref (gtype.c:1908) ==19841== by 0x1C7C4124: g_object_newv (gobject.c:824) ==19841== by 0x1C7C4518: g_object_new_valist (gobject.c:951) ==19841== by 0x1C7C468D: g_object_new (gobject.c:789) ==19841== by 0x806333F: acme_volume_new (acme-volume.c:104) ==19841== by 0x80547AA: gnome_settings_multimedia_keys_load (gnome-settings-multimedia-keys.c:951) ==19841== by 0x8052709: gnome_settings_daemon_new (gnome-settings-daemon.c:401) ==19841== by 0x8051438: main (factory.c:42)
Another one: ==19863== 601 (36 direct, 565 indirect) bytes in 3 blocks are definitely lost in loss record 3471 of 3818 ==19863== at 0x1B903882: malloc (vg_replace_malloc.c:149) ==19863== by 0x1C81BBB1: g_malloc (gmem.c:137) ==19863== by 0x1C8077BE: g_error_new_valist (gerror.c:41) ==19863== by 0x1C8079FA: g_set_error (gerror.c:205) ==19863== by 0x1B9BB508: gst_plugin_check_module (gstplugin.c:327) ==19863== by 0x1B9BBC59: gst_plugin_load_file (gstplugin.c:412) ==19863== by 0x1B9DD5AF: gst_xml_registry_load_plugin (gstlibxmlregistry.c:969) ==19863== by 0x1B9D3CA6: gst_registry_load_plugin (gstregistry.c:450) ==19863== by 0x1B9BCA61: gst_plugin_feature_ensure_loaded (gstpluginfeature.c:108) ==19863== by 0x1B9A9833: gst_element_factory_create (gstelementfactory.c:297) ==19863== by 0x80636F4: acme_volume_gstreamer_open (acme-volume-gstreamer.c:262) ==19863== by 0x8063BF3: acme_volume_gstreamer_init (acme-volume-gstreamer.c:339) ==19863== by 0x1C7DBE43: g_type_create_instance (gtype.c:1596) ==19863== by 0x1C7C33AB: g_object_constructor (gobject.c:1011) ==19863== by 0x1C7C3A07: g_object_newv (gobject.c:908) ==19863== by 0x1C7C4518: g_object_new_valist (gobject.c:951) ==19863== by 0x1C7C468D: g_object_new (gobject.c:789) ==19863== by 0x806333F: acme_volume_new (acme-volume.c:104) ==19863== by 0x80547AA: gnome_settings_multimedia_keys_load (gnome-settings-multimedia-keys.c:951) ==19863== by 0x8052709: gnome_settings_daemon_new (gnome-settings-daemon.c:401) ==19863== by 0x8051438: main (factory.c:42)
Fresh traces with gnome 2.12 and the 0.8 branch of gstreamer: ==4882== 804 bytes in 164 blocks are definitely lost in loss record 4780 of 4931 ==4882== at 0x1B901862: malloc (vg_replace_malloc.c:149) ==4882== by 0x1C816C65: g_malloc (gmem.c:137) ==4882== by 0x1C827499: g_strdup (gstrfuncs.c:91) ==4882== by 0x1B9DAA05: read_string (gstlibxmlregistry.c:590) ==4882== by 0x1B9DAC59: load_plugin (gstlibxmlregistry.c:836) ==4882== by 0x1B9DB495: gst_xml_registry_load (gstlibxmlregistry.c:928) ==4882== by 0x1B9D15AB: gst_registry_load (gstregistry.c:125) ==4882== by 0x1B9D20A5: _registry_load_func (gstregistrypool.c:110) ==4882== by 0x1C80DC5F: g_list_foreach (glist.c:670) ==4882== by 0x1B9D20CF: gst_registry_pool_load_all (gstregistrypool.c:125) ==4882== by 0x1B995C64: init_post (gst.c:643) ==4882== by 0x1B995FA1: gst_init_check_with_popt_table (gst.c:343) ==4882== by 0x1B995FF5: gst_init_with_popt_table (gst.c:288) ==4882== by 0x1B996034: gst_init (gst.c:267) ==4882== by 0x8066839: acme_volume_gstreamer_class_intern_init (acme-volume-gstreamer.c:359) ==4882== by 0x1C7D69DF: g_type_class_ref (gtype.c:1908) ==4882== by 0x1C7BF198: g_object_newv (gobject.c:824) ==4882== by 0x1C7BF58C: g_object_new_valist (gobject.c:951) ==4882== by 0x1C7BF701: g_object_new (gobject.c:789) ==4882== by 0x8065EF7: acme_volume_new (acme-volume.c:104) ==4882== by 0x8057392: gnome_settings_multimedia_keys_load (gnome-settings-multimedia-keys.c:951) ==4882== by 0x80552E9: gnome_settings_daemon_new (gnome-settings-daemon.c:401) ==4882== by 0x8054018: main (factory.c:42)
Changing version to 0.8
I'm afraid 0.8 bugs aren't much use without patches. Closing this bug as obsolete; please open new bugs if you find such issues with GStreamer 0.10. Thanks for all of your work though, it is appreciated.