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 778279 - validate: fix leaks
validate: fix leaks
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-02-07 11:52 UTC by Guillaume Desmottes
Modified: 2018-01-28 18:30 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
validate: pad-monitor: fix caps leaks (1.12 KB, patch)
2017-02-07 11:53 UTC, Guillaume Desmottes
committed Details | Review
validate: fix leaks in pad monitor test (7.40 KB, patch)
2017-02-07 11:53 UTC, Guillaume Desmottes
committed Details | Review
validate: fix leak in overrides test (801 bytes, patch)
2017-02-07 11:53 UTC, Guillaume Desmottes
committed Details | Review
valdate: fix element leak in overide-registry (977 bytes, patch)
2017-02-07 11:57 UTC, Guillaume Desmottes
committed Details | Review

Description Guillaume Desmottes 2017-02-07 11:52:53 UTC
With those fixes all the meson tests are passing with the leaks tracer!
Comment 1 Guillaume Desmottes 2017-02-07 11:53:12 UTC
Created attachment 345101 [details] [review]
validate: pad-monitor: fix caps leaks

These caps were not released when disposing the pad monitor.
Comment 2 Guillaume Desmottes 2017-02-07 11:53:17 UTC
Created attachment 345102 [details] [review]
validate: fix leaks in pad monitor test

- monitors were never released
- reports were leaked
- GstValidateMediaDescriptor was leaked
- caps were leaked: gst_check_setup_events_with_stream_id() and
  gst_event_new_caps() don't consume the caps
- srcpad were never released
Comment 3 Guillaume Desmottes 2017-02-07 11:53:22 UTC
Created attachment 345103 [details] [review]
validate: fix leak in overrides test

The runner was never released.
Comment 4 Guillaume Desmottes 2017-02-07 11:57:46 UTC
Created attachment 345104 [details] [review]
valdate: fix element leak in overide-registry

The elements were never released once created.
Comment 5 Thibault Saunier 2017-02-07 15:00:46 UTC
Review of attachment 345101 [details] [review]:

OK
Comment 6 Thibault Saunier 2017-02-08 20:09:18 UTC
Attachment 345101 [details] pushed as 4c5ba39 - validate: pad-monitor: fix caps leaks
Attachment 345102 [details] pushed as 2b33489 - validate: fix leaks in pad monitor test
Attachment 345103 [details] pushed as ca7f091 - validate: fix leak in overrides test
Attachment 345104 [details] pushed as 1cebf3a - valdate: fix element leak in overide-registry
Comment 7 Thibault Saunier 2017-02-08 20:45:21 UTC
I am still getting:

  1 =================                                                                                                                                                                                              
Test name: check.gst-devtools.validate.padmonitor.eos_without_segment
Command: '/home/thiblahute/devel/gstreamer/gst-build/build/subprojects/gst-devtools/validate/tests/check/validate/padmonitor'
=================

Running suite(s): padmonitor
 0%: Checks: 1, Failures: 1, Errors: 0 
 ../subprojects/gst-devtools/validate/tests/check/validate/padmonitor.c:49:F:padmonitor:eos_without_segment:0: bin (0x5654990980b0) refcount is 2 instead of 1


Unexpected critical/warning: Leaks detected
 ../subprojects/gstreamer/libs/gst/check/libcheck/check_msg.c:79: No messaging setup
~
Comment 8 Guillaume Desmottes 2017-02-09 08:08:08 UTC
Humm weird, it's all fine here:

$ GST_DEBUG="GST_TRACER:7" GST_TRACERS="leaks" /home/cassidy/dev/meson/mesontest.py -C build --suite  gst-devtools 
ninja: Entering directory `/home/cassidy/dev/gst/master/gst-build/build'
ninja: no work to do.
1/5 gst-devtools / validate/padmonitor      OK       7.81 s
2/5 gst-devtools / validate/monitoring      OK       2.03 s
3/5 gst-devtools / validate/reporting       OK       4.96 s
4/5 gst-devtools / validate/overrides       OK       2.17 s
5/5 gst-devtools / validate/launcher_tests  OK       1.12 s

OK:         5
FAIL:       0
SKIP:       0
TIMEOUT:    0
Comment 9 Thibault Saunier 2017-02-09 11:00:55 UTC
(In reply to Guillaume Desmottes from comment #8)
> Humm weird, it's all fine here:
> 
> $ GST_DEBUG="GST_TRACER:7" GST_TRACERS="leaks"
> /home/cassidy/dev/meson/mesontest.py -C build --suite  gst-devtools 
> ninja: Entering directory `/home/cassidy/dev/gst/master/gst-build/build'
> ninja: no work to do.
> 1/5 gst-devtools / validate/padmonitor      OK       7.81 s
> 2/5 gst-devtools / validate/monitoring      OK       2.03 s
> 3/5 gst-devtools / validate/reporting       OK       4.96 s
> 4/5 gst-devtools / validate/overrides       OK       2.17 s
> 5/5 gst-devtools / validate/launcher_tests  OK       1.12 s
> 
> OK:         5
> FAIL:       0
> SKIP:       0
> TIMEOUT:    0

It is racy it seems.
Comment 10 Tim-Philipp Müller 2018-01-28 18:30:08 UTC
Just ran checks forever in a loop for 8 minutes with leaks tracer, without problems. Double-checked tracer was active.

In any case, patches have been merged, so let's close this.

If you can still reproduce this, let's make a new bug for that leak, with details.