Problem in getting File descriptor from pipeline

Sebastian Dröge sebastian at centricular.com
Mon Jan 6 06:26:42 PST 2014


On Mo, 2014-01-06 at 17:44 +0530, Keyur Patel wrote:
> Hi,
> 
> Please find attached patch with version.
> 
> This bug is available in latest version code as well. As i have checked for gst-plugin-good code, To close dup-fd is not handled.
> 
> To reproduce bug on arm board do below steps.
> 1) make application which continuously write a file with large chunk and put system on low RAM(memory) state.
> 2) now write simple application with pipeline as i mentioned in previous mail. And continuous try to change state to play to null and null to play.
> 3) print fds of 2nd step application from its code when changing pipeline state.
> 4) In normal case , you will get 2 consecutive  fd are open during play and during null they 2 are freed.
> 	But in low memory case first fd is closed after null state but 2nd one remains open, when you again play another 2 fds (TOTAL 3) shall be created. Hence chain continues.
> 
> Its very critical issue, as embedded system can go to low memory state at any time.

Your patch is not correct as it would cause the fd to be closed multiple
times. The correct place for closing the fd is the finalize function of
the buffer pool, where it is already closed.

So the problem in your case seems to be that the buffer pool is never
released. Can you confirm that? If that's the case you'll have to find
the reason why it is leaked.

-- 
Sebastian Dröge, Centricular Ltd - http://www.centricular.com
Expertise, Straight from the Source
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 966 bytes
Desc: This is a digitally signed message part
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20140106/3db730e6/attachment.pgp>


More information about the gstreamer-devel mailing list