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 725603 - valgrind supression: videotestsrc show leaks creating programs
valgrind supression: videotestsrc show leaks creating programs
Status: RESOLVED OBSOLETE
Product: GStreamer
Classification: Platform
Component: gst-plugins-base
1.x
Other Linux
: Normal normal
: NONE
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2014-03-03 17:24 UTC by Nicola
Modified: 2015-05-26 17:41 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Nicola 2014-03-03 17:24:30 UTC
gst-launch-1.0 videotestsrc num-buffers=100 ! fakesink

show several leaks:


==30824== 8 bytes in 1 blocks are definitely lost in loss record 68 of 1,853
==30824==    at 0x4C28730: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==30824==    by 0x60309B9: strdup (in /usr/lib/libc-2.19.so)
==30824==    by 0x8C89A74: orc_program_add_destination_full (orcprogram.c:399)
==30824==    by 0x8C848B6: orc_bytecode_parse_function (orcbytecode.c:431)
==30824==    by 0x8C896CB: orc_program_new_from_static_bytecode (orcprogram.c:145)
==30824==    by 0x85D100B: video_test_src_orc_splat_u32 (tmp-orc.c:194)
==30824==    by 0x85CF0B6: gst_video_test_src_smpte (videotestsrc.c:350)
==30824==    by 0x85CCF23: gst_video_test_src_fill (gstvideotestsrc.c:922)
==30824==    by 0x8A45832: gst_base_src_default_create (gstbasesrc.c:1473)
==30824==    by 0x8A483E4: gst_base_src_get_range (gstbasesrc.c:2447)
==30824==    by 0x8A49E0A: gst_base_src_loop (gstbasesrc.c:2721)
==30824==    by 0x4EC3258: gst_task_func (gsttask.c:319)
==30824==    by 0x58FB975: ??? (in /usr/lib/libglib-2.0.so.0.3800.2)
==30824==    by 0x58FAFB4: ??? (in /usr/lib/libglib-2.0.so.0.3800.2)
==30824==    by 0x5D9A0A1: start_thread (in /usr/lib/libpthread-2.19.so)
==30824== 
==30824== 8 bytes in 1 blocks are definitely lost in loss record 69 of 1,853
==30824==    at 0x4C28730: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==30824==    by 0x60309B9: strdup (in /usr/lib/libc-2.19.so)
==30824==    by 0x8C899D7: orc_program_add_source_full (orcprogram.c:354)
==30824==    by 0x8C8487E: orc_bytecode_parse_function (orcbytecode.c:437)
==30824==    by 0x8C896CB: orc_program_new_from_static_bytecode (orcprogram.c:145)
==30824==    by 0x880497B: video_orc_pack_I420 (tmp-orc.c:1112)
==30824==    by 0x87E70ED: pack_planar_420 (video-format.c:102)
==30824==    by 0x85CEAD9: convert_hline_generic (videotestsrc.c:1202)
==30824==    by 0x85CE6B9: videotestsrc_convert_tmpline (videotestsrc.c:275)
==30824==    by 0x85CF0D0: gst_video_test_src_smpte (videotestsrc.c:352)
==30824==    by 0x85CCF23: gst_video_test_src_fill (gstvideotestsrc.c:922)
==30824==    by 0x8A45832: gst_base_src_default_create (gstbasesrc.c:1473)
==30824==    by 0x8A483E4: gst_base_src_get_range (gstbasesrc.c:2447)
==30824==    by 0x8A49E0A: gst_base_src_loop (gstbasesrc.c:2721)
==30824==    by 0x4EC3258: gst_task_func (gsttask.c:319)
==30824==    by 0x58FB975: ??? (in /usr/lib/libglib-2.0.so.0.3800.2)
==30824==    by 0x58FAFB4: ??? (in /usr/lib/libglib-2.0.so.0.3800.2)
==30824==    by 0x5D9A0A1: start_thread (in /usr/lib/libpthread-2.19.so)
==30824== 
==30824== 24 bytes in 3 blocks are definitely lost in loss record 837 of 1,853
==30824==    at 0x4C28730: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==30824==    by 0x60309B9: strdup (in /usr/lib/libc-2.19.so)
==30824==    by 0x8C89A74: orc_program_add_destination_full (orcprogram.c:399)
==30824==    by 0x8C848B6: orc_bytecode_parse_function (orcbytecode.c:431)
==30824==    by 0x8C896CB: orc_program_new_from_static_bytecode (orcprogram.c:145)
==30824==    by 0x880497B: video_orc_pack_I420 (tmp-orc.c:1112)
==30824==    by 0x87E70ED: pack_planar_420 (video-format.c:102)
==30824==    by 0x85CEAD9: convert_hline_generic (videotestsrc.c:1202)
==30824==    by 0x85CE6B9: videotestsrc_convert_tmpline (videotestsrc.c:275)
==30824==    by 0x85CF0D0: gst_video_test_src_smpte (videotestsrc.c:352)
==30824==    by 0x85CCF23: gst_video_test_src_fill (gstvideotestsrc.c:922)
==30824==    by 0x8A45832: gst_base_src_default_create (gstbasesrc.c:1473)
==30824==    by 0x8A483E4: gst_base_src_get_range (gstbasesrc.c:2447)
==30824==    by 0x8A49E0A: gst_base_src_loop (gstbasesrc.c:2721)
==30824==    by 0x4EC3258: gst_task_func (gsttask.c:319)
==30824==    by 0x58FB975: ??? (in /usr/lib/libglib-2.0.so.0.3800.2)
==30824==    by 0x58FAFB4: ??? (in /usr/lib/libglib-2.0.so.0.3800.2)
==30824==    by 0x5D9A0A1: start_thread (in /usr/lib/libpthread-2.19.so)
==30824== 
==30824== 40 bytes in 1 blocks are definitely lost in loss record 1,172 of 1,853
==30824==    at 0x4C28730: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==30824==    by 0x8C8968B: orc_program_new (orcprogram.c:37)
==30824==    by 0x8C896BD: orc_program_new_from_static_bytecode (orcprogram.c:144)
==30824==    by 0x85D100B: video_test_src_orc_splat_u32 (tmp-orc.c:194)
==30824==    by 0x85CF0B6: gst_video_test_src_smpte (videotestsrc.c:350)
==30824==    by 0x85CCF23: gst_video_test_src_fill (gstvideotestsrc.c:922)
==30824==    by 0x8A45832: gst_base_src_default_create (gstbasesrc.c:1473)
==30824==    by 0x8A483E4: gst_base_src_get_range (gstbasesrc.c:2447)
==30824==    by 0x8A49E0A: gst_base_src_loop (gstbasesrc.c:2721)
==30824==    by 0x4EC3258: gst_task_func (gsttask.c:319)
==30824==    by 0x58FB975: ??? (in /usr/lib/libglib-2.0.so.0.3800.2)
==30824==    by 0x58FAFB4: ??? (in /usr/lib/libglib-2.0.so.0.3800.2)
==30824==    by 0x5D9A0A1: start_thread (in /usr/lib/libpthread-2.19.so)
==30824== 
==30824== 40 bytes in 1 blocks are definitely lost in loss record 1,173 of 1,853
==30824==    at 0x4C28730: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==30824==    by 0x8C8968B: orc_program_new (orcprogram.c:37)
==30824==    by 0x8C896BD: orc_program_new_from_static_bytecode (orcprogram.c:144)
==30824==    by 0x880497B: video_orc_pack_I420 (tmp-orc.c:1112)
==30824==    by 0x87E70ED: pack_planar_420 (video-format.c:102)
==30824==    by 0x85CEAD9: convert_hline_generic (videotestsrc.c:1202)
==30824==    by 0x85CE6B9: videotestsrc_convert_tmpline (videotestsrc.c:275)
==30824==    by 0x85CF0D0: gst_video_test_src_smpte (videotestsrc.c:352)
==30824==    by 0x85CCF23: gst_video_test_src_fill (gstvideotestsrc.c:922)
==30824==    by 0x8A45832: gst_base_src_default_create (gstbasesrc.c:1473)
==30824==    by 0x8A483E4: gst_base_src_get_range (gstbasesrc.c:2447)
==30824==    by 0x8A49E0A: gst_base_src_loop (gstbasesrc.c:2721)
==30824==    by 0x4EC3258: gst_task_func (gsttask.c:319)
==30824==    by 0x58FB975: ??? (in /usr/lib/libglib-2.0.so.0.3800.2)
==30824==    by 0x58FAFB4: ??? (in /usr/lib/libglib-2.0.so.0.3800.2)
==30824==    by 0x5D9A0A1: start_thread (in /usr/lib/libpthread-2.19.so)
==30824== 


==30824== LEAK SUMMARY:
==30824==    definitely lost: 120 bytes in 7 blocks
==30824==    indirectly lost: 0 bytes in 0 blocks
==30824==      possibly lost: 322 bytes in 3 blocks
==30824==    still reachable: 97,681 bytes in 714 blocks
==30824==         suppressed: 381,682 bytes in 1,264 blocks
Comment 1 Nicolas Dufresne (ndufresne) 2014-03-03 18:18:33 UTC
These are no leaks, they are all static resources. They are allocated once for the lifetime of the application, we don't waste time freeing them, as they are normal system memory.

I've updated the titled, though did not have time to test it. What you need to do is run it again using the GStreamer suppression files, which should hide this. Would it be possible to test using the suppression file (from any report), common/gst.supp . If they don't get supressed, then this bug is valid, if they do, this bug is invalid.
Comment 2 Nicola 2014-03-03 18:21:50 UTC
I run valgrind using this alias:

alias vg_memcheck='G_SLICE=always-malloc G_DEBUG=gc-friendly GLIBCPP_FORCE_NEW=1 GLIBCXX_FORCE_NEW=1 valgrind --tool=memcheck --leak-check=full --leak-resolution=high --trace-children=yes --num-callers=20 -v --suppressions=/home/nicola/gst/master/gstreamer/common/gst.supp'

and the suppression file exists and point to today git master

ls -la /home/nicola/gst/master/gstreamer/common/gst.supp
-rw-r--r-- 1 nicola nicola 71840 29 gen 12.55 /home/nicola/gst/master/gstreamer/common/gst.supp
Comment 3 Nicolas Dufresne (ndufresne) 2014-03-03 19:33:55 UTC
Ok, then the supressions need to be updated.
Comment 4 Tim-Philipp Müller 2015-05-26 17:35:20 UTC
valgrind --suppressions=common/gst.supp --leak-check=full gst-launch-1.0 videotestsrc num-buffers=10 ! fakesink

and

gst-plugins-base/tests/check$ make elements/videotestsrc.valgrind

work fine for me, so I think this can be closed?
Comment 5 Nicola 2015-05-26 17:41:40 UTC
I confirm, works now, thanks