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 777977 - validate: tests should call gst_validate_deinit()
validate: tests should call gst_validate_deinit()
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-devtools
unspecified
Other Linux
: Normal normal
: 1.11.2
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2017-01-31 10:37 UTC by Guillaume Desmottes
Modified: 2017-01-31 13:45 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Guillaume Desmottes 2017-01-31 10:37:24 UTC
Tests like validate/monitoring are leaking the registry because gst_validate_deinit() is not called.

0:00:00.095931145 23714      0x1f822d0 TRACE             GST_TRACER :0:: object-alive, type-name=(string)GstRegistry, address=(gpointer)0x1e3b6a0, description=(string)<registry1>, ref-count=(uint)1, trace=(string)gst_debug_get_stack_trace (gstinfo.c:2782)
handle_object_created (gstleaks.c:322)
object_created_cb (gstleaks.c:352)
gst_object_constructed (gstobject.c:141)
g_object_new_internal (/usr/lib64/libgobject-2.0.so.0.5000.2:0x7f02b9d0cc13)
g_object_newv (/usr/lib64/libgobject-2.0.so.0.5000.2:0x7f02b9d0e0a9)
gst_validate_registry_get (validate.c:75)
gst_validate_init_plugins (validate.c:192)
gst_validate_init (validate.c:279)
gst_validate_runner_constructor (gst-validate-runner.c:349)
g_object_new_internal (/usr/lib64/libgobject-2.0.so.0.5000.2:0x7f02b9d0c4c5)
g_object_newv (/usr/lib64/libgobject-2.0.so.0.5000.2:0x7f02b9d0e0a9)
g_object_new (/usr/lib64/libgobject-2.0.so.0.5000.2:0x7f02b9d0e860)
gst_validate_runner_new (gst-validate-runner.c:475)
monitors_cleanup (monitoring.c:77)
tcase_run_tfun_fork (check_run.c:465)
srunner_iterate_tcase_tfuns (check_run.c:237)
srunner_run_tcase (check_run.c:377)
srunner_iterate_suites (check_run.c:205)
srunner_run_tagged (check_run.c:744)
srunner_run (check_run.c:758)
srunner_run_all (check_run.c:696)
gst_check_run_suite (gstcheck.c:1057)
main (monitoring.c:108)

The easy fix is to register it using atexit() as gst_check_init() is doing for gst_deinit().
Comment 1 Guillaume Desmottes 2017-01-31 10:38:23 UTC
Fix: https://phabricator.freedesktop.org/D1630
Comment 2 Thibault Saunier 2017-01-31 13:32:25 UTC
Author: Guillaume Desmottes <guillaume.desmottes@collabora.co.uk>
Date:   Tue Jan 31 11:35:30 2017 +0100

validate: tests: call gst_validate_deinit()

gst_validate_deinit() needs to be called when the test is done to remove
false positives when using the leaks tracer.

https://bugzilla.gnome.org/show_bug.cgi?id=777977

Differential Revision: https://phabricator.freedesktop.org/D1630