Hi all,
I'm fronting a problem of memory leak (that i detect with valgrind test tool) on my app and after some time i discover that if i just init the gstreamer lib (with gst_init()) and after finalize it (sith gst_deinit()) the memory leak is the same. After test my app without gst_* calls, no memory leak is detected. So, after search on web, i found some people with the same problem and no solutions shown, how i see on topic below of gstreamer-devel (and some others) http://gstreamer-devel.966125.n4.nabble.com/quot-Possibly-lost-quot-memory-shown-by-valgrind-during-gst-init-check-td972463.html I must say that i set the env vars G_SLICE=always-malloc G_DEBUG=gc-friendly So, i'd like to know if it is really a know-bug or it's a wrong lib use of my part. If it's a using problem, someone has tips for solution? I really be grateful for some help/tips. -- Raul Holanda Cordeiro Celular: +55 (85) 8863-6877 Celular: +55 (85) 8805-3592 Skype: raulhcordeiro
_______________________________________________ gstreamer-devel mailing list [hidden email] http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel |
On Mon, 2011-04-04 at 13:54 -0300, raul cordeiro holanda wrote:
> I'm fronting a problem of memory leak (that i detect with valgrind > test tool) on my app and after some time i discover that > if i just init the gstreamer lib (with gst_init()) and after finalize > it (sith gst_deinit()) the memory leak is the same. After > test my app without gst_* calls, no memory leak is detected. So, after > search on web, i found some people with the same > problem and no solutions shown, how i see on topic below of > gstreamer-devel (and some others) > > http://gstreamer-devel.966125.n4.nabble.com/quot-Possibly-lost-quot-memory-shown-by-valgrind-during-gst-init-check-td972463.html > > I must say that i set the env vars > > G_SLICE=always-malloc > G_DEBUG=gc-friendly > > So, i'd like to know if it is really a know-bug or it's a wrong lib > use of my part. If it's a using problem, someone has > tips for solution? > > I really be grateful for some help/tips. My reply from back then is still true. gst_init() does a number of one-time allocations which gst_deinit() doesn't/can't clean up, esp. inside GObject. You may want to use GStreamer's gst.supp valgrind suppression file from the common module to suppress these kind of leaks, just like our own unit tests do when they run under valgrind. Cheers -Tim _______________________________________________ gstreamer-devel mailing list [hidden email] http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel |
In reply to this post by raul cordeiro holanda
>> I'm fronting a problem of memory leak (that i detect with valgrind >> test tool) on my app and after some time i discover that >> if i just init the gstreamer lib (with gst_init()) and after finalize >> it (sith gst_deinit()) the memory leak is the same. After >> test my app without gst_* calls, no memory leak is detected. So, after >> search on web, i found some people with the same >> problem and no solutions shown, how i see on topic below of >> gstreamer-devel (and some others) >> >> http://gstreamer-devel.966125.n4.nabble.com/quot-Possibly-lost-quot-memory-shown-by-valgrind-during-gst-init-check-td972463.html >> >> I must say that i set the env vars >> >> G_SLICE=always-malloc >> G_DEBUG=gc-friendly >> >> So, i'd like to know if it is really a know-bug or it's a wrong lib >> use of my part. If it's a using problem, someone has >> tips for solution? >> >> I really be grateful for some help/tips.Hi Tim, In advance, thanks for the fast answer. I understand your answer but in my tests, the memory leak has a variable size and according to your answer, the memory leak's size should be fixed. I run the same simple test many times and always a different size is show by valgrind. After see that, I try run my full app with pipelines and everything inside them. The memory leak continue growing and valgrind (already with gst.supp file of the gstreamer git tree) show me some others leaks, mainly on bus_* calls and plugin_* calls. is it too a normal behavior? My app make many pipelines and finish them with set_state(NULL) and with unref calls. Some others tips? Thanks in advance for some help! -- Raul Holanda Cordeiro Celular: +55 (85) 8863-6877 Celular: +55 (85) 8805-3592 Skype: raulhcordeiro _______________________________________________ gstreamer-devel mailing list [hidden email] http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel |
On Tue, 2011-04-05 at 11:32 -0300, raul cordeiro holanda wrote:
> After see that, I try run my full app with pipelines and everything > inside them. The memory leak continue growing and valgrind (already > with gst.supp file of the gstreamer git tree) show me some others > leaks, mainly on bus_* calls and plugin_* calls. is it too a normal > behavior? My app make many pipelines and finish them with > set_state(NULL) and with unref calls. It does not sound like normal behaviour, no. Hard to anything more specific without having a test case/program that reproduces the issue and the valgrind leak output. It could be a leak in your application or in some plugin or in GStreamer core. Cheers -Tim _______________________________________________ gstreamer-devel mailing list [hidden email] http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel |
In reply to this post by raul cordeiro holanda
>> After see that, I try run my full app with pipelines and everything >> inside them. The memory leak continue growing and valgrind (already >> with gst.supp file of the gstreamer git tree) show me some others >> leaks, mainly on bus_* calls and plugin_* calls. is it too a normal >> behavior? My app make many pipelines and finish them with >> set_state(NULL) and with unref calls. > > It does not sound like normal behaviour, no. > > Hard to anything more specific without having a test case/program that > reproduces the issue and the valgrind leak output. It could be a leak in > your application or in some plugin or in GStreamer core. > Cheers > -Tim Hi Tim, Again, thanks for the good help! I devel a simple example to show the leaks and attach it on email. the content is a .rar because i put a simple image - necessary to example run (my appsrc read it and push on pipeline) - the app.supp file; the valgrind output file generate after i run the example per 16h; a README file to help on procedure; and the most important - the makefile. The source is basically an appsrc to read image file and push it on pipeline periodically (1/fps). The pipeline encode the images and generate many videos of 1s for me do something on appsink. On example, i don't make nothing (just free the resources =). To don't stop the generation after each EOS send to pipeline by appsrc, i put a loop on main (my app do that too). To a good stop of app, just press Ctrl+C. Some help is appreciated! -- Raul Holanda Cordeiro Celular: +55 (85) 8863-6877 Celular: +55 (85) 8805-3592 Skype: raulhcordeiro _______________________________________________ gstreamer-devel mailing list [hidden email] http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel gstexample.tar.bz2 (34K) Download Attachment |
>>> After see that, I try run my full app with pipelines and everything
>>> inside them. The memory leak continue growing and valgrind (already >> It does not sound like normal behaviour, no.>>> with gst.supp file of the gstreamer git tree) show me some others >>> leaks, mainly on bus_* calls and plugin_* calls. is it too a normal >>> behavior? My app make many pipelines and finish them with >>> set_state(NULL) and with unref calls. >> >> >> Hard to anything more specific without having a test case/program that >> reproduces the issue and the valgrind leak output. It could be a leak in >> your application or in some plugin or in GStreamer core. > >> Cheers >> -Tim > Hi Tim, > > Again, thanks for the good help! > I devel a simple example to show the leaks and attach it on email. The content is a .rar > file because i put a simple image - necessary to example run (my appsrc read it and > push on pipeline) - the app.supp file; the valgrind output file generate after i run the > example per 16h; a README file to help on procedure; and the most important - the makefile. > The source is basically an appsrc to read image file and push it on pipeline periodically (1/fps). > The pipeline encode the images and generate many videos of 1s for me do something on appsink. > On example, i don't make nothing (just free the resources =). To don't stop the generation after > each EOS send to pipeline by appsrc, i put a loop on main (my app do that too). To a good stop of > app, just press Ctrl+C. > > Some help is appreciated! Sorry gyes, the file is a .tar.bz2 -- Raul Holanda Cordeiro Celular: +55 (85) 8863-6877 Celular: +55 (85) 8805-3592
Skype: raulhcordeiro _______________________________________________ gstreamer-devel mailing list [hidden email] http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel |
Free forum by Nabble | Edit this page |