Problem in getting File descriptor from pipeline

Keyur Patel keyur.patel at einfochips.com
Mon Jan 6 04:14:57 PST 2014


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.

To fix this bug apply attached fix to your gst-plugin-good version 0.10.31

Let me know in case you require further information.

Regards,
Keyur Patel

-----Original Message-----
From: gstreamer-devel-bounces at lists.freedesktop.org [mailto:gstreamer-devel-bounces at lists.freedesktop.org] On Behalf Of Sebastian Dröge
Sent: 06 January 2014 03:49
To: Discussion of the development of and with GStreamer
Subject: Re: Problem in getting File descriptor from pipeline

On Mo, 2014-01-06 at 15:41 +0530, Keyur Patel wrote:
> Hi,
> 
> In our embedded device when device goes in low memory state due to some operation in other application, we get error in allocation of buffer and two fds are created but due to error one fd which was due to "dup()" was unable to close automatically on releasing pipeline.
> 
> Hence application fd count is getting increasing more and more.
> 
> This is a bug in gst-plugin-good.
> 
> I need to release both fds in erroneous condition hence i required 2nd one.
> But its not possible to get 2nd fd (created by dup) at application level.
> 
> So due to that need to apply patch for plugin code.

Yes, that's something that needs to be fixed in gst-plugins-good. Can you debug the problem and provide a patch, or provide a testcase to reproduce it on another system?

Note that 0.10 is also no longer maintained, and this particular problem might also be fixed already in 1.x. There were many v4l2 related changes.


--
Sebastian Dröge, Centricular Ltd - http://www.centricular.com Expertise, Straight from the Source

*************************************************************************************************************************************************************
eInfochips Business Disclaimer : This e-mail message and all attachments transmitted with it are intended solely for the use of the addressee and may contain legally privileged and confidential information. If the reader of this message is not the intended recipient, or an employee or agent responsible for delivering this message to the intended recipient, you are hereby notified that any dissemination, distribution, copying, or other use of this message or its attachments is strictly prohibited. If you have received this message in error, please notify the sender immediately by replying to this message and please delete it from your computer. Any views expressed in this message are those of the individual sender unless otherwise stated. Company has taken enough precautions to prevent the spread of viruses. However the
  company accepts no liability for any damage caused by any virus transmitted by this email.
*************************************************************************************************************************************************************




*************************************************************************************************************************************************************
eInfochips Business Disclaimer : This e-mail message and all attachments transmitted with it are intended solely for the use of the addressee and may contain legally privileged and confidential information. If the reader of this message is not the intended recipient, or an employee or agent responsible for delivering this message to the intended recipient, you are hereby notified that any dissemination, distribution, copying, or other use of this message or its attachments is strictly prohibited. If you have received this message in error, please notify the sender immediately by replying to this message and please delete it from your computer. Any views expressed in this message are those of the individual sender unless otherwise stated. Company has taken enough precautions to prevent the spread of viruses. However the
  company accepts no liability for any damage caused by any virus transmitted by this email.
*************************************************************************************************************************************************************



---------------------------------------------------------------------------------------------
Notice: 
This message has been scanned by Trend Micro Mail Security scanner and is believed to be clean
---------------------------------------------------------------------------------------------
-------------- next part --------------
A non-text attachment was scrubbed...
Name: gst-plugins-good-0.10.31.patch
Type: application/octet-stream
Size: 1626 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20140106/51559338/attachment.obj>


More information about the gstreamer-devel mailing list