memory leak generated by audiotestsrc

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

memory leak generated by audiotestsrc

Charlie Laub

I have been doing some pipeline debugging and testing using gst-launch. I noticed that my gst-launch process was increasing its footprint by about 1 MB PER SECOND! I only spotted this initially when I was hearing some glitches in the audio (the pipeline is processing audio). I looked at my resource usage and noticed that all of the physical memory on the machine was being used. I killed the gstreamer process, restarted it, and looked at resource usage for all processes running on my system. That’s when the memory leak rate became very apparent.

 

My pipeline, which I will not bother to reproduce here, uses two audiotestsrc elements. After some experimentation, I found that when I removed these and instead sourced the data from an existing input via a tee the memory leak completely disappeared.

 

To give you some idea of the scope of the memory leak, the memory used by the process with the audiotestsrc elements removed is only 5.5 MB. The memory leak rate is ONE MB PER SECOND! Something is seriously wrong.

 

Gstreamer developers: check into this, s’il vous plait?

 

 

 

.


_______________________________________________
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 generated by audiotestsrc

Sean DuBois
On Tue, Feb 06, 2018 at 04:33:08PM -0800, Charlie Laub wrote:

> I have been doing some pipeline debugging and testing using gst-launch. I
> noticed that my gst-launch process was increasing its footprint by about 1
> MB PER SECOND! I only spotted this initially when I was hearing some
> glitches in the audio (the pipeline is processing audio). I looked at my
> resource usage and noticed that all of the physical memory on the machine
> was being used. I killed the gstreamer process, restarted it, and looked at
> resource usage for all processes running on my system. That's when the
> memory leak rate became very apparent.
>
>
>
> My pipeline, which I will not bother to reproduce here, uses two
> audiotestsrc elements. After some experimentation, I found that when I
> removed these and instead sourced the data from an existing input via a tee
> the memory leak completely disappeared.
>
>
>
> To give you some idea of the scope of the memory leak, the memory used by
> the process with the audiotestsrc elements removed is only 5.5 MB. The
> memory leak rate is ONE MB PER SECOND! Something is seriously wrong.
>
>
>
> Gstreamer developers: check into this, s'il vous plait?
>

Hey!

I tried a few simple pipelines with multiple audiotestsrces and was not
able to see any obvious leaks (Using 1.13.0 (GIT))

I would be happy to fix this if you can give me an exact version +
pipeline to reproduce.

thanks!
_______________________________________________
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 generated by audiotestsrc

Charlie Laub
In reply to this post by Charlie Laub

This is a follow up on my previous post about memory leaks that I have observed using gst-launch-1.0.

 

System:

Ubuntu 16.04

Asrock Q1900DC-ITX mother board

alsa src and sink are from/to onboard audio codec ALC892 via rear panel jacks

Gstreamer version: 1.8.3

 

Purpose of pipeline:

test how to incorporate LADSPA plugins (plugins require channels=1,format=F32LE data)

test how to assign channels via channel-mask

test using deinterleave, tee, and interleave for LADSPA processing

 

Intended behavior of this test pipeline:

2 (stereo audio) input channels are reassigned to some other channels in the 8 channel output stream

the other channels should be silent

 

Observed behavior:

At first I used audiotestsrc wave=silence to create silent channels. After I discovered the memory leak I instead tried the volume element with mute=true but this also produced a memory leak. As a workaround I used a LADSPA plugin that I wrote with the gain level set to -90dB and this did not leak. Needless to say, the memory leaks with audiotestsrc and volume should not be happening. Since leaking occurs without when there are no LADSPA plugins in the pipeline it does not seem to be related to these elements.

 

Example pipelines are provided below.

 

 

(1) THIS PIPELINE RESULTS IN MEMORY LEAK, LEAKRATE ~ 1MB/sec

 

gst-launch-1.0 -v \

alsasrc device="hw:1,0" ! audio/x-raw,format=S32LE,rate=44100 ! deinterleave name=d \

d.src_0 ! tee name=t0 \

d.src_1 ! tee name=t1 \

audiotestsrc wave=silence ! audio/x-raw,channels=1,format=S32LE,rate=44100 ! tee name=audio_silence \

audio_silence. ! queue ! audioconvert ! ladspa-acdf-so-acdf type=0 gain=-90 ! "audio/x-raw,channel-mask=(bitmask)0x4" ! i.sink_0   \

audio_silence. ! queue ! audioconvert ! ladspa-acdf-so-acdf type=0 gain=-90 ! "audio/x-raw,channel-mask=(bitmask)0x8" ! i.sink_1   \

audio_silence. ! queue ! audioconvert ! ladspa-acdf-so-acdf type=0 gain=-90 ! "audio/x-raw,channel-mask=(bitmask)0x1" ! i.sink_2   \

audio_silence. ! queue ! audioconvert ! ladspa-acdf-so-acdf type=0 gain=-90 ! "audio/x-raw,channel-mask=(bitmask)0x2" ! i.sink_3   \

t0. ! queue ! audioconvert ! ladspa-acdf-so-acdf type=0 gain=-20 ! ladspa-acdf-so-acdf type=0 gain=10 ! "audio/x-raw,channel-mask=(bitmask)0x400" ! i.sink_4   \

t1. ! queue ! audioconvert ! ladspa-acdf-so-acdf type=0 gain=-20 ! ladspa-acdf-so-acdf type=0 gain=10 ! "audio/x-raw,channel-mask=(bitmask)0x800" ! i.sink_5   \

audio_silence. ! queue ! audioconvert ! ladspa-acdf-so-acdf type=0 gain=-90 ! "audio/x-raw,channel-mask=(bitmask)0x10" ! i.sink_6   \

audio_silence. ! queue ! audioconvert ! ladspa-acdf-so-acdf type=0 gain=-90 ! "audio/x-raw,channel-mask=(bitmask)0x20" ! i.sink_7   \

interleave name=i ! audioconvert ! audio/x-raw,format=S32LE ! alsasink device="hw:1,0"

 

 

 

 

 

(2) THIS PIPELINE WITH LADSPA PLUGINS REMOVED ALSO RESULTS IN MEMORY LEAK, LEAKRATE ~ 1MB/sec

 

gst-launch-1.0 -v \

alsasrc device="hw:1,0" ! audio/x-raw,format=S32LE,rate=44100 ! deinterleave name=d \

d.src_0 ! tee name=t0 \

d.src_1 ! tee name=t1 \

audiotestsrc wave=silence ! audio/x-raw,channels=1,format=S32LE,rate=44100 ! tee name=audio_silence \

audio_silence. ! queue ! audioconvert ! "audio/x-raw,channel-mask=(bitmask)0x4" ! i.sink_0   \

audio_silence. ! queue ! audioconvert ! "audio/x-raw,channel-mask=(bitmask)0x8" ! i.sink_1   \

audio_silence. ! queue ! audioconvert ! "audio/x-raw,channel-mask=(bitmask)0x1" ! i.sink_2   \

audio_silence. ! queue ! audioconvert ! "audio/x-raw,channel-mask=(bitmask)0x2" ! i.sink_3   \

t0. ! queue ! audioconvert ! "audio/x-raw,channel-mask=(bitmask)0x400" ! i.sink_4   \

t1. ! queue ! audioconvert ! "audio/x-raw,channel-mask=(bitmask)0x800" ! i.sink_5   \

audio_silence. ! queue ! audioconvert ! "audio/x-raw,channel-mask=(bitmask)0x10" ! i.sink_6   \

audio_silence. ! queue ! audioconvert ! "audio/x-raw,channel-mask=(bitmask)0x20" ! i.sink_7   \

interleave name=i ! audioconvert ! audio/x-raw,format=S32LE ! alsasink device="hw:1,0"

 

 

 

 

 

(3) THIS WORKS WITHOUT MEMORY LEAK:

The only difference from the first example is that I replaced the audiotestsrc with a teed input channel

 

gst-launch-1.0 -v \

alsasrc device="hw:1,0" ! audio/x-raw,format=S32LE,rate=44100 ! deinterleave name=d \

d.src_0 ! tee name=t0 \

d.src_1 ! tee name=t1 \

t0. ! tee name=audio_silence \

audio_silence. ! queue ! audioconvert ! ladspa-acdf-so-acdf type=0 gain=-90 ! "audio/x-raw,channel-mask=(bitmask)0x4" ! i.sink_0   \

audio_silence. ! queue ! audioconvert ! ladspa-acdf-so-acdf type=0 gain=-90 ! "audio/x-raw,channel-mask=(bitmask)0x8" ! i.sink_1   \

audio_silence. ! queue ! audioconvert ! ladspa-acdf-so-acdf type=0 gain=-90 ! "audio/x-raw,channel-mask=(bitmask)0x1" ! i.sink_2   \

audio_silence. ! queue ! audioconvert ! ladspa-acdf-so-acdf type=0 gain=-90 ! "audio/x-raw,channel-mask=(bitmask)0x2" ! i.sink_3   \

t0. ! queue ! audioconvert ! ladspa-acdf-so-acdf type=0 gain=-20 ! ladspa-acdf-so-acdf type=0 gain=10 ! "audio/x-raw,channel-mask=(bitmask)0x400" ! i.sink_4   \

t1. ! queue ! audioconvert ! ladspa-acdf-so-acdf type=0 gain=-20 ! ladspa-acdf-so-acdf type=0 gain=10 ! "audio/x-raw,channel-mask=(bitmask)0x800" ! i.sink_5   \

audio_silence. ! queue ! audioconvert ! ladspa-acdf-so-acdf type=0 gain=-90 ! "audio/x-raw,channel-mask=(bitmask)0x10" ! i.sink_6   \

audio_silence. ! queue ! audioconvert ! ladspa-acdf-so-acdf type=0 gain=-90 ! "audio/x-raw,channel-mask=(bitmask)0x20" ! i.sink_7   \

interleave name=i ! audioconvert ! audio/x-raw,format=S32LE ! alsasink device="hw:1,0"

 

 

 

 

 

(4) USING VOLUME ELEMENT ALSO CREATES MEMORY LEAK, LEAKRATE ~ 1MB/sec

I took pipeline (3) above and inserted the volume element

Pipeline runs but leaks at same rate

 

gst-launch-1.0 -v \

alsasrc device="hw:1,0" ! audio/x-raw,format=S32LE,rate=44100 ! deinterleave name=d \

d.src_0 ! tee name=t0 \

d.src_1 ! tee name=t1 \

t0. ! volume mute=true ! tee name=audio_silence \

audio_silence. ! queue ! audioconvert ! ladspa-acdf-so-acdf type=0 gain=-90 ! "audio/x-raw,channel-mask=(bitmask)0x4" ! i.sink_0   \

audio_silence. ! queue ! audioconvert ! ladspa-acdf-so-acdf type=0 gain=-90 ! "audio/x-raw,channel-mask=(bitmask)0x8" ! i.sink_1   \

audio_silence. ! queue ! audioconvert ! ladspa-acdf-so-acdf type=0 gain=-90 ! "audio/x-raw,channel-mask=(bitmask)0x1" ! i.sink_2   \

audio_silence. ! queue ! audioconvert ! ladspa-acdf-so-acdf type=0 gain=-90 ! "audio/x-raw,channel-mask=(bitmask)0x2" ! i.sink_3   \

t0. ! queue ! audioconvert ! ladspa-acdf-so-acdf type=0 gain=-20 ! ladspa-acdf-so-acdf type=0 gain=10 ! "audio/x-raw,channel-mask=(bitmask)0x400" ! i.sink_4   \

t1. ! queue ! audioconvert ! ladspa-acdf-so-acdf type=0 gain=-20 ! ladspa-acdf-so-acdf type=0 gain=10 ! "audio/x-raw,channel-mask=(bitmask)0x800" ! i.sink_5   \

audio_silence. ! queue ! audioconvert ! ladspa-acdf-so-acdf type=0 gain=-90 ! "audio/x-raw,channel-mask=(bitmask)0x10" ! i.sink_6   \

audio_silence. ! queue ! audioconvert ! ladspa-acdf-so-acdf type=0 gain=-90 ! "audio/x-raw,channel-mask=(bitmask)0x20" ! i.sink_7   \

interleave name=i ! audioconvert ! audio/x-raw,format=S32LE ! alsasink device="hw:1,0"

 

 


_______________________________________________
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 generated by audiotestsrc

Sean DuBois
On Thu, Feb 08, 2018 at 10:27:52AM -0800, Charlie Laub wrote:

> This is a follow up on my previous post about memory leaks that I have
> observed using gst-launch-1.0.
>
>
>
> System:
>
> Ubuntu 16.04
>
> Asrock Q1900DC-ITX mother board
>
> alsa src and sink are from/to onboard audio codec ALC892 via rear panel
> jacks
>
> Gstreamer version: 1.8.3
>
>
>
> Purpose of pipeline:
>
> test how to incorporate LADSPA plugins (plugins require
> channels=1,format=F32LE data)
>
> test how to assign channels via channel-mask
>
> test using deinterleave, tee, and interleave for LADSPA processing
>
>
>
> Intended behavior of this test pipeline:
>
> 2 (stereo audio) input channels are reassigned to some other channels in the
> 8 channel output stream
>
> the other channels should be silent
>
>
>
> Observed behavior:
>
> At first I used audiotestsrc wave=silence to create silent channels. After I
> discovered the memory leak I instead tried the volume element with mute=true
> but this also produced a memory leak. As a workaround I used a LADSPA plugin
> that I wrote with the gain level set to -90dB and this did not leak.
> Needless to say, the memory leaks with audiotestsrc and volume should not be
> happening. Since leaking occurs without when there are no LADSPA plugins in
> the pipeline it does not seem to be related to these elements.
>
>
>
> Example pipelines are provided below.
>
>
>
>
>
> (1) THIS PIPELINE RESULTS IN MEMORY LEAK, LEAKRATE ~ 1MB/sec
>
>
>
> gst-launch-1.0 -v \
>
> alsasrc device="hw:1,0" ! audio/x-raw,format=S32LE,rate=44100 ! deinterleave
> name=d \
>
> d.src_0 ! tee name=t0 \
>
> d.src_1 ! tee name=t1 \
>
> audiotestsrc wave=silence ! audio/x-raw,channels=1,format=S32LE,rate=44100 !
> tee name=audio_silence \
>
> audio_silence. ! queue ! audioconvert ! ladspa-acdf-so-acdf type=0 gain=-90
> ! "audio/x-raw,channel-mask=(bitmask)0x4" ! i.sink_0   \
>
> audio_silence. ! queue ! audioconvert ! ladspa-acdf-so-acdf type=0 gain=-90
> ! "audio/x-raw,channel-mask=(bitmask)0x8" ! i.sink_1   \
>
> audio_silence. ! queue ! audioconvert ! ladspa-acdf-so-acdf type=0 gain=-90
> ! "audio/x-raw,channel-mask=(bitmask)0x1" ! i.sink_2   \
>
> audio_silence. ! queue ! audioconvert ! ladspa-acdf-so-acdf type=0 gain=-90
> ! "audio/x-raw,channel-mask=(bitmask)0x2" ! i.sink_3   \
>
> t0. ! queue ! audioconvert ! ladspa-acdf-so-acdf type=0 gain=-20 !
> ladspa-acdf-so-acdf type=0 gain=10 !
> "audio/x-raw,channel-mask=(bitmask)0x400" ! i.sink_4   \
>
> t1. ! queue ! audioconvert ! ladspa-acdf-so-acdf type=0 gain=-20 !
> ladspa-acdf-so-acdf type=0 gain=10 !
> "audio/x-raw,channel-mask=(bitmask)0x800" ! i.sink_5   \
>
> audio_silence. ! queue ! audioconvert ! ladspa-acdf-so-acdf type=0 gain=-90
> ! "audio/x-raw,channel-mask=(bitmask)0x10" ! i.sink_6   \
>
> audio_silence. ! queue ! audioconvert ! ladspa-acdf-so-acdf type=0 gain=-90
> ! "audio/x-raw,channel-mask=(bitmask)0x20" ! i.sink_7   \
>
> interleave name=i ! audioconvert ! audio/x-raw,format=S32LE ! alsasink
> device="hw:1,0"
>
>
>
>
>
>
>
>
>
>
>
> (2) THIS PIPELINE WITH LADSPA PLUGINS REMOVED ALSO RESULTS IN MEMORY LEAK,
> LEAKRATE ~ 1MB/sec
>
>
>
> gst-launch-1.0 -v \
>
> alsasrc device="hw:1,0" ! audio/x-raw,format=S32LE,rate=44100 ! deinterleave
> name=d \
>
> d.src_0 ! tee name=t0 \
>
> d.src_1 ! tee name=t1 \
>
> audiotestsrc wave=silence ! audio/x-raw,channels=1,format=S32LE,rate=44100 !
> tee name=audio_silence \
>
> audio_silence. ! queue ! audioconvert !
> "audio/x-raw,channel-mask=(bitmask)0x4" ! i.sink_0   \
>
> audio_silence. ! queue ! audioconvert !
> "audio/x-raw,channel-mask=(bitmask)0x8" ! i.sink_1   \
>
> audio_silence. ! queue ! audioconvert !
> "audio/x-raw,channel-mask=(bitmask)0x1" ! i.sink_2   \
>
> audio_silence. ! queue ! audioconvert !
> "audio/x-raw,channel-mask=(bitmask)0x2" ! i.sink_3   \
>
> t0. ! queue ! audioconvert ! "audio/x-raw,channel-mask=(bitmask)0x400" !
> i.sink_4   \
>
> t1. ! queue ! audioconvert ! "audio/x-raw,channel-mask=(bitmask)0x800" !
> i.sink_5   \
>
> audio_silence. ! queue ! audioconvert !
> "audio/x-raw,channel-mask=(bitmask)0x10" ! i.sink_6   \
>
> audio_silence. ! queue ! audioconvert !
> "audio/x-raw,channel-mask=(bitmask)0x20" ! i.sink_7   \
>
> interleave name=i ! audioconvert ! audio/x-raw,format=S32LE ! alsasink
> device="hw:1,0"
>
>
>
>
>
>
>
>
>
>
>
> (3) THIS WORKS WITHOUT MEMORY LEAK:
>
> The only difference from the first example is that I replaced the
> audiotestsrc with a teed input channel
>
>
>
> gst-launch-1.0 -v \
>
> alsasrc device="hw:1,0" ! audio/x-raw,format=S32LE,rate=44100 ! deinterleave
> name=d \
>
> d.src_0 ! tee name=t0 \
>
> d.src_1 ! tee name=t1 \
>
> t0. ! tee name=audio_silence \
>
> audio_silence. ! queue ! audioconvert ! ladspa-acdf-so-acdf type=0 gain=-90
> ! "audio/x-raw,channel-mask=(bitmask)0x4" ! i.sink_0   \
>
> audio_silence. ! queue ! audioconvert ! ladspa-acdf-so-acdf type=0 gain=-90
> ! "audio/x-raw,channel-mask=(bitmask)0x8" ! i.sink_1   \
>
> audio_silence. ! queue ! audioconvert ! ladspa-acdf-so-acdf type=0 gain=-90
> ! "audio/x-raw,channel-mask=(bitmask)0x1" ! i.sink_2   \
>
> audio_silence. ! queue ! audioconvert ! ladspa-acdf-so-acdf type=0 gain=-90
> ! "audio/x-raw,channel-mask=(bitmask)0x2" ! i.sink_3   \
>
> t0. ! queue ! audioconvert ! ladspa-acdf-so-acdf type=0 gain=-20 !
> ladspa-acdf-so-acdf type=0 gain=10 !
> "audio/x-raw,channel-mask=(bitmask)0x400" ! i.sink_4   \
>
> t1. ! queue ! audioconvert ! ladspa-acdf-so-acdf type=0 gain=-20 !
> ladspa-acdf-so-acdf type=0 gain=10 !
> "audio/x-raw,channel-mask=(bitmask)0x800" ! i.sink_5   \
>
> audio_silence. ! queue ! audioconvert ! ladspa-acdf-so-acdf type=0 gain=-90
> ! "audio/x-raw,channel-mask=(bitmask)0x10" ! i.sink_6   \
>
> audio_silence. ! queue ! audioconvert ! ladspa-acdf-so-acdf type=0 gain=-90
> ! "audio/x-raw,channel-mask=(bitmask)0x20" ! i.sink_7   \
>
> interleave name=i ! audioconvert ! audio/x-raw,format=S32LE ! alsasink
> device="hw:1,0"
>
>
>
>
>
>
>
>
>
>
>
> (4) USING VOLUME ELEMENT ALSO CREATES MEMORY LEAK, LEAKRATE ~ 1MB/sec
>
> I took pipeline (3) above and inserted the volume element
>
> Pipeline runs but leaks at same rate
>
>
>
> gst-launch-1.0 -v \
>
> alsasrc device="hw:1,0" ! audio/x-raw,format=S32LE,rate=44100 ! deinterleave
> name=d \
>
> d.src_0 ! tee name=t0 \
>
> d.src_1 ! tee name=t1 \
>
> t0. ! volume mute=true ! tee name=audio_silence \
>
> audio_silence. ! queue ! audioconvert ! ladspa-acdf-so-acdf type=0 gain=-90
> ! "audio/x-raw,channel-mask=(bitmask)0x4" ! i.sink_0   \
>
> audio_silence. ! queue ! audioconvert ! ladspa-acdf-so-acdf type=0 gain=-90
> ! "audio/x-raw,channel-mask=(bitmask)0x8" ! i.sink_1   \
>
> audio_silence. ! queue ! audioconvert ! ladspa-acdf-so-acdf type=0 gain=-90
> ! "audio/x-raw,channel-mask=(bitmask)0x1" ! i.sink_2   \
>
> audio_silence. ! queue ! audioconvert ! ladspa-acdf-so-acdf type=0 gain=-90
> ! "audio/x-raw,channel-mask=(bitmask)0x2" ! i.sink_3   \
>
> t0. ! queue ! audioconvert ! ladspa-acdf-so-acdf type=0 gain=-20 !
> ladspa-acdf-so-acdf type=0 gain=10 !
> "audio/x-raw,channel-mask=(bitmask)0x400" ! i.sink_4   \
>
> t1. ! queue ! audioconvert ! ladspa-acdf-so-acdf type=0 gain=-20 !
> ladspa-acdf-so-acdf type=0 gain=10 !
> "audio/x-raw,channel-mask=(bitmask)0x800" ! i.sink_5   \
>
> audio_silence. ! queue ! audioconvert ! ladspa-acdf-so-acdf type=0 gain=-90
> ! "audio/x-raw,channel-mask=(bitmask)0x10" ! i.sink_6   \
>
> audio_silence. ! queue ! audioconvert ! ladspa-acdf-so-acdf type=0 gain=-90
> ! "audio/x-raw,channel-mask=(bitmask)0x20" ! i.sink_7   \
>
> interleave name=i ! audioconvert ! audio/x-raw,format=S32LE ! alsasink
> device="hw:1,0"
>
>
>
>
>

> _______________________________________________
> gstreamer-devel mailing list
> [hidden email]
> https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Hey Charlie!
Sorry I responded to your email, but sbcglobal keeps bouncing me.

If you replace your alsasrc with an audiotestsrc (so two
audiotestsrc) does it still happen?

If you use a fakesink instead of an alsasink does it still happen?

Just trying to remove as much complexity as possible from the pipeline,
I tried really quickly with git but didn't see anything.

1.8.3 is getting old (March 2016) so hopefully has been fixed since then! I will get a docker up and grab
that tag this weekend. See if you can make it happen with just
audiotestsrc/fakesink makes it a lot easier to debug.

thanks
_______________________________________________
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 generated by audiotestsrc

Charlie Laub
In reply to this post by Charlie Laub
Hi Sean,

I experimented with the pipeline's source and sink elements like you suggested. I found some interesting behavior. First, for reference here is the pipeline that works without problems:

gst-launch-1.0 -v \
alsasrc device="hw:1,0" ! audio/x-raw,format=S32LE,rate=96000 ! deinterleave name=d \
d.src_0 ! tee name=t0 \
d.src_1 ! tee name=t1 \
t0. ! tee name=audio_silence \
audio_silence. ! queue ! audioconvert ! ladspa-acdf-so-acdf type=0 gain=-90 ! "audio/x-raw,channel-mask=(bitmask)0x4" ! i.sink_0   \
audio_silence. ! queue ! audioconvert ! ladspa-acdf-so-acdf type=0 gain=-90 ! "audio/x-raw,channel-mask=(bitmask)0x8" ! i.sink_1   \
audio_silence. ! queue ! audioconvert ! ladspa-acdf-so-acdf type=0 gain=-90 ! "audio/x-raw,channel-mask=(bitmask)0x1" ! i.sink_2   \
audio_silence. ! queue ! audioconvert ! ladspa-acdf-so-acdf type=0 gain=-90 ! "audio/x-raw,channel-mask=(bitmask)0x2" ! i.sink_3   \
t0. ! queue ! audioconvert ! ladspa-acdf-so-acdf type=0 gain=-20 ! ladspa-acdf-so-acdf type=0 gain=10 ! "audio/x-raw,channel-mask=(bitmask)0x400" ! i.sink_4   \
t1. ! queue ! audioconvert ! ladspa-acdf-so-acdf type=0 gain=-20 ! ladspa-acdf-so-acdf type=0 gain=10 ! "audio/x-raw,channel-mask=(bitmask)0x800" ! i.sink_5   \
audio_silence. ! queue ! audioconvert ! ladspa-acdf-so-acdf type=0 gain=-90 ! "audio/x-raw,channel-mask=(bitmask)0x10" ! i.sink_6   \
audio_silence. ! queue ! audioconvert ! ladspa-acdf-so-acdf type=0 gain=-90 ! "audio/x-raw,channel-mask=(bitmask)0x20" ! i.sink_7   \
interleave name=i ! audioconvert ! audio/x-raw,format=S32LE ! alsasink device="hw:1,0"


I modified the pipeline for testing as follows:

TEST 1.
source = audiotestsrc wave=silence
sink = fakesink
RESULT: Consumed about 50% CPU utilization (25x times higher than is should be) compared to the pipeline using alsasrc and alsasink and leaked memory but at a MUCH FASTER RATE than previously reported (maybe 25 times faster)? I have to quickly kill the process because after 10 seconds it is already using over 1GB of memory and climbing fast, e.g. 100+MB/sec!

TEST 2:
source = audiotestsrc
sink = fakesink
RESULT: Consumed about 50% CPU utilization (25x times higher than is should be) compared to the pipeline using alsasrc and alsasink but did NOT leak memory.

TEST 3.
source = audiotestsrc wave=silence
sink = alsasink device="null'
RESULT: More or less exactly the same as for TEST 1.

TEST 4.
source = audiotestsrc wave=silence
sink = alsasink device="hw:1,0'
RESULT: I set the alsasink to again point at my computer's onboard sound codec. This leaked memory at around 4-5MB per second, which is faster than what I originally reported with both alsa source and sinks in use. CPU utilization was normal (2%).

TEST 5.
source = audiotestsrc
sink = alsasink device="null'
RESULT: Similar to TEST 2 except that CPU utilization increased to 70+% with one core out of 4 saturated at 100% utilization. No memory leak.

TEST 6.
source = alsasrc device="hw:1,0"
sink = alsasink device="null" provide-clock=false
RESULT: Here I tried to force the pipeline to use the system clock or the source clock. This did not leak memory but pinned one CPU at 100% utilization and used a bit of another (28% overall CPU utilization).

My wild guesses about what is happening include:
A. Setting wave-silence causes memory leaks
B. When fakesink or alsa device=null is combined with audiotestsrc there is a problem with the clock for the pipeline and it is almost free running or the clock is 25 times faster than it should be. I have caps right after the source indicating the desired rate (96000 Hz), but maybe this is not working? The debug output shows rate=96000...

Thanks for looking into this.

-Charlie




_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel