Memory Leak?

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

Memory Leak?

killerrats
This post was updated on .
I was recording with this pipeline for more than 3 days. At the end of the
third day the memory was crazy big. it was above 200 mb in memory. Pipeline:

gst-launch-1.0 -e rtspsrc location=[IP] name=source ! rtph264depay !
h264parse ! mux.video splitmuxsink max-size-bytes=10485760 max-files=10240
muxer=avimux location=video%06d.avi name=mux source. ! rtpmp4gdepay !
aacparse ! mux.audio_0

I put together an application that uses the same pipeline the difference is that I checked the flow of the
 elements through the splitmuxsink to filesink and flows fine. It also is setting the next filename using the
format-location. For some reason still has the same problem. that one went up to 300mb of memory.

One thread here was saying to use async-handling=true. I haven't tried that
yet because well it will be several days before I get to see if it works or
not. Anyone know?



-----
------------------------------
Gstreamer 1.12.4
------------------------------
Windows
--
Sent from: http://gstreamer-devel.966125.n4.nabble.com/
_______________________________________________
gstreamer-devel mailing list
gstreamer-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
------------------------------
Gstreamer 1.14.1
------------------------------
Windows
Reply | Threaded
Open this post in threaded view
|

Re: Memory Leak?

rland
killerrats wrote
> I was recording with this pipeline for more than 3 days. At the end of the
> third day the memory was crazy big. it was above 200 mb in memory.
> Pipeline:
>
> gst-launch-1.0 -e rtspsrc location=[IP] name=source ! rtph264depay !
> h264parse ! mux.video splitmuxsink max-size-bytes=10485760 max-files=10240
> muxer=avimux location=video%06d.avi name=mux source. ! rtpmp4gdepay !
> aacparse ! mux.audio_0

You can run valgrind to check where
there may be memory leak´╝înote that
pay attention to the "definitely lost" parts in summary. :)
Like this:
valgrind -v --tool=memcheck  --track-fds=yes  --leak-check=full
--show-reachable=yes --time-stamp=yes --undef-value-errors=no
--malloc-fill=0xc --free-fill=0xd --freelist-vol=100000000
--trace-children=yes --num-callers=50
--suppressions=gstreamer-1.0-1.14.0/common/gst.supp  --log-file=valgrind_gst
gst-launch-1.0 -e rtspsrc location=[IP] name=source ! rtph264depay !
h264parse ! mux.video splitmuxsink max-size-bytes=10485760 max-files=10240
muxer=avimux location=video%06d.avi name=mux source. ! rtpmp4gdepay !
aacparse ! mux.audio_0





--
Sent from: http://gstreamer-devel.966125.n4.nabble.com/
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: Memory Leak?

killerrats
I have windows that i'm using it on. but I did find a alternative which is
"very sleepy cs" and 14 day trial "Deleaker". They seem to work pretty well.



-----
------------------------------
Gstreamer 1.12.4
------------------------------
Windows
--
Sent from: http://gstreamer-devel.966125.n4.nabble.com/
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
------------------------------
Gstreamer 1.14.1
------------------------------
Windows
Reply | Threaded
Open this post in threaded view
|

Re: Memory Leak?

killerrats
I found another program.  Process Explore
<https://download.cnet.com/Process-Explorer/3000-2094_4-10223605.html>  
that will tell me quite a bit of information. I found interesting that in
the beginning it showed 259 handles where active and then it increased as it
went along. It came back down to 259 not too long after. I have already left
for two days now and the handles have increased and never came back down to
259. Its now at 273 and my memory is from 15 and increased to 18 megabytes.
By tomorrow it probably will increase in memory because like always on the
third day.

<http://gstreamer-devel.966125.n4.nabble.com/file/t377034/RecordingProgress06-12-2018-01-57-PM.jpg>



-----
------------------------------
Gstreamer 1.12.4
------------------------------
Windows
--
Sent from: http://gstreamer-devel.966125.n4.nabble.com/
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
------------------------------
Gstreamer 1.14.1
------------------------------
Windows
Reply | Threaded
Open this post in threaded view
|

Re: Memory Leak?

killerrats
This post was updated on .
Well increased 2 days later. this is a program I did my own console
application. I found out that the code I was using was 2016 source code on a
1.12.4 gstreamer.

The only thing I did was edit the splitmuxsink element. Got rid of the
second signal for format-location-full then did a couple of signals in the
filesink. Nothing that will effect the program that much.

gstsplitmuxsink.c

<http://gstreamer-devel.966125.n4.nabble.com/file/t377034/RecordingProgress06-14-2018-09-30-AM.jpg



-----
------------------------------
Gstreamer 1.12.4
------------------------------
Windows
--
Sent from: http://gstreamer-devel.966125.n4.nabble.com/
_______________________________________________
gstreamer-devel mailing list
gstreamer-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
------------------------------
Gstreamer 1.14.1
------------------------------
Windows
Reply | Threaded
Open this post in threaded view
|

Re: Memory Leak?

killerrats
I upgraded to 1.14.1 and used the command line gst-launch that I used in the
first post. It did the same thing as before. it got up to 2k files out of
10k files. doesn't seem to quit out or anything. The handles didn't increase
this time.

gst-launch-1.0 -e rtspsrc location=[IP] name=source ! rtph264depay !
h264parse ! mux.video splitmuxsink async-handling=true
max-size-bytes=10485760 max-files=10240 muxer=avimux location=video%06d.avi
name=mux source. ! rtpmp4gdepay ! aacparse ! mux.audio_0

I used software verify memory validator and here is of a report from memory.
it took 4 1/2 days or so to get to this point. I can't seem to figure out
why?

gst_launch_10_mem_06_18_18
<http://www.planetkorey.com/tmp/gst_launch_10_mem.html>  



-----
------------------------------
Gstreamer 1.12.4
------------------------------
Windows
--
Sent from: http://gstreamer-devel.966125.n4.nabble.com/
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
------------------------------
Gstreamer 1.14.1
------------------------------
Windows
Reply | Threaded
Open this post in threaded view
|

Re: Memory Leak?

killerrats
This post was updated on .
So I did another test using the following pipeline. I added the tee for video
and audio side and queue after the tee to connect to the splitmuxsink.

gst-launch-1.0 --gst-debug=3 -e rtspsrc location=[IP] name=source !
rtpjitterbuffer ! rtph264depay ! h264parse ! tee name=vtee ! queue
max-size-buffers=50 ! mux.video splitmuxsink async-handling=true
max-size-bytes=10485760 max-files=360 muxer=avimux
location=D:/VideoStorageSplit2/video%06d.avi name=mux source. !
rtpjitterbuffer ! rtpmp4gdepay ! aacparse ! tee name=atee ! queue
max-size-buffers=50 ! mux.audio_0

*my application:*
specified buffers in queues' has internal flow error
not specifying the buffers just keeps going.
this is using the same way as above not a edited version of splitmuxsink and filesink I did earlier.
<http://gstreamer-devel.966125.n4.nabble.com/file/t377034/GstreamerRecordPipeline.png

*command line:*
specifying the buffers in queues' has timeout but maybe the same for
internal flow error
not having the buffers keeps going.

*Overall:*
haven't tried on command line adding the tee with queues' and not specifying
the buffers.



-----
------------------------------
Gstreamer 1.12.4
------------------------------
Windows
--
Sent from: http://gstreamer-devel.966125.n4.nabble.com/
_______________________________________________
gstreamer-devel mailing list
gstreamer-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
------------------------------
Gstreamer 1.14.1
------------------------------
Windows